Fri Jun 27 09:55:47 EDT 2014
State machine compiler
- In deeply embedded applications, there is no dynamic creation of
state machines. This is important for architectures such as PIC
where memory indirection is very expensive as compared to flat
memory access. Optimize for static state machines.
- Language-wise, there are a couple of levels:
- pure functions + recursion
- blocking imperative procedures: explicit dynamic yield/suspend
- non-blocking imperative event handlers (e.g. object or case statement)
- The most useful transformation is that from blocking procedures to
non-blocking event handlers state machines. The essential operation
is to capture the current environment into an object.
- To tackle this problem: start with a scheme compiler, and perform
the continuation capture operation at yield. This needs:
- begin (imperative sequencing)
I started working on this before. Where's that code?