unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: Guile Users' Mailing List <guile-user@gnu.org>
Subject: [ANN] Guile-SMC 0.5.2 released
Date: Fri, 02 Sep 2022 08:43:39 +0300	[thread overview]
Message-ID: <87czcewctw.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4651 bytes --]

Hello Guilers,

I'm pleased to announce Guile State Machine Compiler (Guile-SMC), version
0.5.2:
  https://github.com/artyom-poptsov/guile-smc/releases/tag/v0.5.2

There were some nasty bugs in the 0.5.1 so this is a bugfix release.


* 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
diagrams. [1]

Some of the key features:
- A transition table can be verified and checked for dead-ends and
  infinite loops.
- 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
  independent.
- 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

--8<---------------cut here---------------start------------->8---
* Version 0.5.2 (2022-09-02)
** Bugfixes
*** =smc context=: Add missing =(smc core config)= to the FSM context
Add missing =(smc core config)= to the FSM context generated by =smc context=
command.
*** =smc compile=: Copy =(smc core config)= when standalone-copy target is used
Copy =(smc core config)= when =guile-standalone-copy= compiler target is used
with =smc compile= command.
--8<---------------cut here---------------end--------------->8---

As this is a bugfix release, most of the changelog is the same as for
0.5.0 -> 0.5.1 update:

--8<---------------cut here---------------start------------->8---
* Version 0.5.1 (2022-09-02)
** Fix =log= core binding shadowing by =(smc core log)=
** Allow to set the log driver in Guile-SMC CLI.
See the =--help= for each =smc= action for the description of the new command
line options.

Implemented log drivers are: =syslog=, =file= and =null=.
** =stderr= logging now works with any log driver
Updated =(smc core log)= API now allows to use =stderr= logging with any other
driver.  That is, Guile-SMC will log messages to the =stderr= even for =none=
driver is set after =log-use-stderr!= is called with =#t=.

The =stderr= logging can be disabled by calling =log-use-stderr!= with =#f= as
the argument.
** PNG parser example now uses =null= log driver
That should make building in isolated/restricted environments (like in Guix)
easier.
** Guile-SMC tests now uses file log driver
Each test suite now logs to a file named =<test-suite-name>-smc.log= in the
=tests= directory.
** Update the Texinfo documentation
--8<---------------cut here---------------end--------------->8---


* 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
  networking applications.

Any help with this list will be appreciated, and new ideas are welcome!


* Usage examples

I wrote an INI[2] format parser to test the foundation ideas behind
Guile-SMC from the practical perspective:
  https://github.com/artyom-poptsov/guile-ini


Happy hacking,

- Artyom

References:
1: https://plantuml.com/state-diagram
2: https://en.wikipedia.org/wiki/INI_file


-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

                 reply	other threads:[~2022-09-02  5:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czcewctw.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).