Collaborative multitasking with Arduino (the Generino project)

Hello.

I would like to share with the Arduino community the "Generino" project, a event-based state-machines code generator designed for Arduino.

Event-based state-machines are a programming model that allows the implementation of collaborative multitasking programs.
Collaborative multitasking means that multiple logical processes are executing at the same time, but they are actually executed by a single CPU one by one; each process must execute its code as soon as possible and release control to the next process.
This is what we need as soon as we do something as simple as having two blinking leds at different rates, or multiple buttons and output devices or any other Arduino project that is not doing something really trivial.

Although state-machines can be implemented in C++, it is not so easy.
Generino adds to C++ the syntax to explicitly declare states, events, timers and channels to connect events providers with consumers: thanks to this, creating multitasking project becomes much easier.

Generino will compile into an C++ .INO standard sketch, that can then be compiled and downloaded directly to Arduino using the normal IDE.
C++ code can be integrated directly in the Generino sources to access any existing Arduino library.
Furthermore, library state-machines can be imported and used: for example, a state-machine handling a button or a rotary encoder with debouncing, can be simply included and used.

The Generino code generator source files are distributed under GPL-v3 and they can be dowloaded at the Generino website. They are written in FCL (FormalCapture Language), a language designed explicitly to develop code generators.

Generino website with downloads, libraries and documentation is: http://generino.cc

Comments and suggestions are welcome.

Cheers
Davide