[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ANN] Guile-SMC 0.5.0 released
Artyom V. Poptsov
[ANN] Guile-SMC 0.5.0 released
Tue, 23 Aug 2022 09:05:37 +0300
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
I'm pleased to announce Guile State Machine Compiler (Guile-SMC), version
* What is Guile-SMC?
Guile-SMC is a state machine compiler that allows to describe finite
state machines (FSMs) in Scheme in terms of transition tables. It is
capable to generate such transition tables from a PlantUML state
Some of the key features:
- A transition table can be verified and checked for dead-ends and
- Guile-SMC FSMs gather statistics when they run (steps/transitions);
the statistics can be used can be used to compare/analyze FSMs..
- There's an FSM profiler that runs on FSMs trace logs. The profiler
output shows how much time the FSM spends in each state. This can be
useful for optimization.
- The state machine compiler supports three "targets" for compilation: a
regular Guile target where the output FSM depends on Guile-SMC;
"guile-standalone" target that produce an FSM that does not depend on
Guile-SMC; "guile-standalone-copy" where all the required parts of
Guile-SMC are copied alongside with the output FSM to make the code
- Guile-SMC allows to run a FSM on-the-fly with a single "smc run"
command -- see the docs and the examples for more information.
Guile-SMC comes with a Scheme program called 'smc' -- a state machine
compiler itself. It produces a Scheme code for an FSM from the PlantUML
format. This tool is meant to be called on a PlantUML file when a
program with a FSM is being built (for example, from a Makefile.)
I'm hoping that it will ease the burden of writing format parsers and
other useful GNU Guile libraries for the community.
* User-visible changes
* Version 0.5.0 (2022-08-23)
** Compiler changes
*** =guile-standalone=: Add missing dependency for the target code
*** =guile-standalone=: API change: Target now produces =fsm-run!= procedure
Guile-SMC now generates =fsm-run!= procedure when =guile-standalone= target is
set to provide the same API as for other targets.
*** =guile-standalone=: Improve the output code layout
Code from different modules now separated by section headers.
** core: API change: =(smc core stack)= is removed
** =smc context=: API change: Implement intermediate contexts
Now =smc context= allows to generate intermediate contexts that can be used
from custom contexts. Intermediate contexts can be used to implement some
custom code (e.g. user contexts) that is indifferent to target compiler.
** =smc context=: Allow to read input from a provided file
=smc context= now can read the input PlantUML data from a provided file.
** =smc profile=: Fix the help message
** =smc run=
*** Ensure that the =context-thunk= is a procedure with zero parameters
*** debug mode: Now print stats for both parent and child FSMs
*** Improve help messages
** Update the Texinfo documentation
* Some ideas for the future development
- Write a PlantUML generator that take a <fsm> instance and produces a
PlantUML state diagram.
- Add support for other output languages (e.g. C, Common Lisp, ...)
- Expand the suite of FSM contexts for FSM of different domains. That
is, there's already "char-context" for text processing FSMs and we can
add "binary" context, for example. Or "network" context for writing
Any help with this list will be appreciated, and new ideas are welcome!
* Usage examples
I wrote an INI format parser to test the foundation ideas behind
Guile-SMC from the practical perspective:
The new Guile-INI release will follow soon, with the changes needed to
work with Guile-SMC 0.5.0.
Artyom "avp" Poptsov <email@example.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
Description: PGP signature
|[Prev in Thread]
||[Next in Thread]|
- [ANN] Guile-SMC 0.5.0 released,
Artyom V. Poptsov <=