Frame v0.9.0
Frame v0.9.0 brings a lot of exciting additions to the Frame language, adding both power and standardization to the notation. In addition, the transpiler now can read from stdin as well as still accepting file paths as in the past. This enables improved CI/CD processes involving Frame.
New Language Features
Note: The new language features are currently only supported in Golang. Other languages will be supported in coming releases.
- Compartments - v0.9 formalizes the idea of state closures called Compartments. Compartments are data structures that hold a state's local data as well as other metadata enabling new advanced features like Event Forwarding (see below).
- Deferred transitions - deferred transitions address challenges with the previous approach of executing a transition immediately when called. Each immediate transition makes a function call and under certain situations, can blow up the stack if too many occur before returning to the caller. Deferred transitions avoid this situation and enable Frame controllers to make any number of sequential transitions. This architecture change enables Frame controllers to be launched as background daemons that run indefinitely until stopped as well as to be used to solve iterative problems.
- System parameters - system parameters enable initializing the system in a more standardized, flexible and direct manner. This includes syntax for setting the start state parameters, the start state's enter parameters as well as override domain variable initialization. This change normalizes the start state to behave like all other states in the machine.
- Event forwarding - event forwarding syntax enables passing events from one state to another. This capability enables system designers to easily receive events in one state and forward them on to other states that can handle them appropriately.
- Persistance - A new system attribute enables code generation for Marshaling and Unmarshaling system data as JSON.
Stdin support
The CLI has been updated to support stdin:
framec -language rust < HelloWorld.frm > HelloWorld.rs
or
cat HellowWorld.frm | framec -language golang > HellowWorld.go