time¶
Automatically imports an ordered Time signature to your spec.
Warning
Time internally uses the ordering module. This means that the signature is forced to be exact.
See also
Module ordering
Macros¶
-
let
dynamic[x]¶ Arguments: - x (sig) – any signature.
Expands to: x one -> Timedynamiccan be used as part of a signature definition:open util/time abstract sig Color {} one sig Red, Green, Yellow extends Color {} sig Light { , state: dynamic[Color] }
At every
Time, everyLightwill have exactly one color.
-
let
dynamicSet[x]¶ Arguments: - x (sig) – any signature.
Expands to: x -> TimeEquivalent to
dynamic, except that any number of elements can belong to any given time:open util/time sig Keys {} one sig Keyboard { pressed: dynamicSet[Keys] }