liveBook · Manning

Ship model

As explained in Functional Design and Architecture: Examples in Haskell

A ship model is a domain model representing the ship's control network scheme and hardware descriptors.

A ship model turns a complex control problem into an explicit domain representation: it records the ship’s control network scheme and hardware descriptors so automatic-control logic can use them alongside retrospective and current data. section 3.2.2

The model sits within an application architecture that separates responsibilities:

  • Control intelligence consumes the ship model while handling functions such as rotation correction and life-support control. section 3.2.2
  • Interoperability connects logic control with other subsystems through approaches such as functional reactive programming, streams, and raw I/O. section 3.2.2
  • Logic-control scripts can define both real subsystem interfaces and the properties of simulated ship actors. section 8.1.1

In simulation, the ship model becomes a virtual reality. Independent actors communicate through an abstract request-and-response protocol, while the hidden simulator orchestrates their lifetimes and interactions. The same embedded domain-specific scripts can be transformed into a simulator model, a process described as compilation. section 8.1.1

From control script to virtual ship

A script written for a real subsystem can specify an actor’s behavior in the simulator without separate simulation-only logic. The simulator supplies the environment; the actor remains unaware of it and communicates through the shared protocol. section 8.1.1

Figure 8.2 Real environment and virtual environment

Compare the real environment with the virtual environment that turns the ship model into a simulation. section 8.1.1

Figure 8.3 Compilation from logic control scripts to specific environments

Trace how logic-control scripts become models for specific execution environments. section 8.1.1

How Functional Design and Architecture: Examples in Haskell covers it

How deep it goes
Defines the model’s contents and extends it into virtual reality, while deferring detailed simulator implementation.
Examples
Uses control-network schemes, hardware descriptors, virtual spaceship actors, communication protocols, and reusable control scripts.
What you can do after
Understand how one domain model can support real subsystem control and a corresponding actor-based simulation.
How it connects
Connects control intelligence, interoperability, logic-control scripts, actors, protocols, and domain-specific languages.

This explainer was generated by Manning's knowledge graph from the text of Functional Design and Architecture: Examples in Haskell. The section links point to the parts of the book it draws on.