This is the Draft 0.1 language specification. Its conformance requirements include targets beyond the current implementation, such as complete static typing and resource bounds. The execution contracts describe the guarantees implemented today.
Machine
A machine is a labeled record: The symbols name the following components:- is the diagnostic machine name and MUST NOT affect behavior.
- is an immutable finite map of constants. Its values MUST be serializable DSL values.
-
is a finite map from field names to
(type, initial-expression). - is a finite map from command names to command definitions.
- is a finite map from public result names to expressions.
- is an optional Boolean completion predicate.
- is an ordered finite sequence of close effects.
- is the manifest of exact registered algorithm names and versions.
Worked example: the activity-poll machine
For the activity poll, the labeled machine components are approximately: The poll has no completion predicate, close effects, or registered algorithms. Those empty components remain part of the machine shape, making serialization and validation uniform across simple and complex machines.Values
DSL values are:State
A state is a finite map containing exactly the machine’s declared fields. A state is valid when every field value recursively satisfies its declared type. The initial state is obtained by evaluating field initial expressions in field declaration order. An initial expression MAY read constants and previously initialized fields. It MUST NOT read inputs, viewer context, or lexical locals. For the poll: After Amina’s first accepted vote, a later snapshot may be:SharedState and scope
ASharedState space is a finite map from machine names to machine instances:
A SharedStateMap is a map from scope keys to spaces:
Selecting an absent scope MAY create a space from the map’s declared initial
definition. Scope creation MUST be atomic and deterministic.
Machines in different scopes have no implicit access to each other’s state.
Machines in one space also have no cross-machine access unless an explicit,
typed capability is introduced by a future DSL version.
