ordinary_machine_declaration.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.7/ordinary_machine_declaration.bend as Ordinary_machine_declaration
8 imports
import Base import ./machine_world.bend as MW import ./machine.bend as M import ./world.bend as W import ./inspector.bend as I import ./check.bend as K import ./capabilities.bend as Cap import ./inspector_machine_projection.bend as P
Types
type Declaration source · line 16 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-R:Type -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> Data
Closed ordinary declaration. Names never grant authority; K and the operational slot lens remain nominal/static. No Resource identity is fabricated for a machine. Schema/token/slot-indexed machine declaration. Printable names are metadata, never world or machine authority. Vocabulary optionally carries ordered Data values for description, without restricting queue membership. Contracts and consumers: docs/parity/machines.md.
Declaration@-S:Data -> @-Token:Data -> @-V:Data -> @-R:Type -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @name:String -> Declaration<S, Token, V, R, take>
Vocabulary@-S:Data -> @-Token:Data -> @-V:Data -> @-R:Type -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @name:String -> @values:List<&2, V> -> Declaration<S, Token, V, R, take>
Templates
template name source · line 20 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-R:Type -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @declaration:Declaration<S, Token, V, R, take> -> String
Return the authored machine name without reading its runtime slot.
template declared source · line 29 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-R:Type -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @name:String -> @values:List<&2, V> -> Declaration<S, Token, V, R, take>
One ordinary declaration retains its finite ordered values. This is descriptive, not a queue membership restriction; legacy arbitrary V declarations stay valid. Declare a machine with an ordered descriptive vocabulary. Values are not an exhaustive runtime validation rule; the V type and slot operations govern accepted requests. Does not initialize a machine or register a system.
template values source · line 33 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-R:Type -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @declaration:Declaration<S, Token, V, R, take> -> Maybe<&2, List<&2, V>>
Return Some ordered descriptive values for Vocabulary, or None for the legacy Declaration variant. Neither result reads current state or queued work.
template inspect source · line 40 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @-declaration:Declaration<S, Token, V, R, take> -> 0x7e321819d0ff210531780719c7674cef/capabilities.ValueRead<0x7e321819d0ff210531780719c7674cef/inspector.Frame<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, Token, V>>
Build a read-only Inspector capability for this machine current view. Retains the nominal slot lens; the declaration name grants no authority. Does not execute inspection or advance registered system/transition readers.
template condition source · line 44 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @-declaration:Declaration<S, Token, V, R, take> -> 0x7e321819d0ff210531780719c7674cef/capabilities.ValueRead<0x7e321819d0ff210531780719c7674cef/check.Frame<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, Token, V>>
Build a Check capability for this machine current view using the same nominal slot lens. Provides no transition write operations or reader cursor.
template availability source · line 48 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @name:String -> @observed:Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>) -> Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, List<&2, String>)
Preflight consults the actual nominal slot and preserves the arbitrary World.
template required source · line 55 · raw
@-S:Data -> @-Token:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take:(@_:R -> Pair(R, 0x7e321819d0ff210531780719c7674cef/machine.Slot<S, Token, V>)) -> @-declaration:Declaration<S, Token, V, R, take> -> @world:0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E> -> Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, List<&2, String>)
Inspect actual machine-slot availability while returning the world owner. Missing yields the declared name in a one-element list; present yields []. Does not create or initialize the slot, run handlers or apply queued state.
template get source · line 59 · raw
@-H:Type -> @-S:Data -> @-Token:Data -> @-V:Data -> @-cap:0x7e321819d0ff210531780719c7674cef/capabilities.ValueRead<H, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, Token, V>> -> @owner:H -> Pair(H, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, Token, V>)
Read CurrentView through an existing typed read capability and return its affine owner. Missing state remains explicit; no live machine alias escapes.
template compared source · line 61 · raw
@-H:Type -> @-S:Data -> @-Token:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @value:V -> @observed:Pair(H, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, Token, V>) -> Pair(H, Bool)
template matches source · line 67 · raw
@-H:Type -> @-S:Data -> @-Token:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @-cap:0x7e321819d0ff210531780719c7674cef/capabilities.ValueRead<H, 0x7e321819d0ff210531780719c7674cef/machine.CurrentView<S, Token, V>> -> @owner:H -> @value:V -> Pair(H, Bool)
Compare an observed current state with a Data value using the supplied closed equality function. Returns owner and Bool; missing state is false. Does not inspect queued targets, consume a cursor or schedule a transition.