vanrein / perpetuum

Generating event-triggered code from Petri nets [C and Erlang]
Other
5 stars 1 forks source link

Transitions hint other transitions. #6

Open vanrein opened 6 years ago

vanrein commented 6 years ago

This is an auto-trigger capability, and may be centered around numbered hints that end up in flags carried around the loop; the loop can (if hints exist, and Colour changed since the last attempt) fold over the transmap to process those that are hinted, and to collect new hints. (One bit can hint that something was done at all.)

Application-driven hints can be returned as {retry,Hint(s)} and processed upon later process_hints() invocation, or automatically retried for asynchronous signals (without EventData).

The big thing about hints is how they shall be configured; it requires application logic; this is not available to the compiler, but it is during indstantiation.

Note that hints in no way undermine Petri Net semantics, where transitions may fire at random. The hint behaviour can be manually crafted by sending signals from transition callbacks to the application logic.

vanrein commented 6 years ago

One thing that appears to be useful, as we find during the KXOVER field test, is to provide the application logic for a transition with transitions to trigger on success and failure. This might be specified in a separate simple CSV table (and produced in a spreadsheet or editor).