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.6.2 released
Date: Fri, 11 Aug 2023 12:32:56 +0300	[thread overview]
Message-ID: <87350prkjb.fsf@gmail.com> (raw)

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

Hello Guilers,

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

This release fixes some new-found bugs, namely in the state-machine
profiler.  Also now it's possible to specify "pre-action" and
"post-action" procedures in PlantUML "legend" block.

Please see the list of notable changes below.

Guile-SMC 0.6.2 is backward-compatible with 0.6.0 and 0.6.1.


* 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-SMC allows to run a FSM on-the-fly with a single "smc run"
  command -- see the docs and the examples for more information.
- Common context code for parsers that work with characters or bytes.
  This includes special data structures to provide memory for FSMs
  (although it is not required to use them; FSMs can use custom
  procedures and data structures.)

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.6.2 (2023-08-11)
** Bugfixes
*** =(smc context functional char)=: =pre-action= now always returns context
The procedure would return an undefined value when the input character is an
EOF object.  Now =pre-action= procedure always returns a context instance.

Also now the procedure handles cases when the input character is equal to
=#f=.
*** =(smc trace-context)=: Fix timestamp calculation
Procedures from the module now ensure that timestamps are always have positive
values.  When a negative value is detected then an error is issued.
*** =(smc cli command-profile)=: Fix time calculation
The profiler would fail to calculate correct time ranges.  Now the time is
calculated properly.
*** =(smc context oop generic)=: Add missing =(smc core log)= import
** Allow to set the FSM pre- and post-action in a PlantUML "legend" block
Guile-SMC now allows to set the pre/post actions for an FSM in the PlantUML "legend" block.
#+BEGIN_EXAMPLE plantuml
legend
pre-action:  custom-pre-action
post-action: custom-post-action
endlegend
#+END_EXAMPLE
** Add missing procedures for the =<fsm>= to get/set pre/post actions
Now the =(smc fsm)= module provides procedures to get and set pre- and post-actions.
** =(smc core log)= now registers the default logger
=(smc core log)= now registers the default logger under the name "guile-smc".
** =(smc core log)=: New procedure: =smc-log-default-logger=
This procedure allows to get the default logger instance.
** Update the documentation
--8<---------------cut here---------------end--------------->8---


* Usage examples

- Guile-INI -- INI[2] format parser:
  https://github.com/artyom-poptsov/guile-ics
- Guile-ICS -- iCalendar (RFC 5545) and vCard (RFC 6350) parser:
  https://github.com/artyom-poptsov/guile-ics
- Guile-PNG -- Pure Scheme Portable Network Graphics (PNG, RFC 2083)
  library:
  https://github.com/artyom-poptsov/guile-png

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:[~2023-08-11  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  9:32 Artyom V. Poptsov [this message]
2023-08-11  9:52 ` [ANN] Guile-SMC 0.6.2 released Dr. Arne Babenhauserheide
2023-08-11 10:20   ` Artyom V. Poptsov
2023-08-11 11:57     ` Dr. Arne Babenhauserheide
2023-08-11 12:42       ` Artyom V. Poptsov

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=87350prkjb.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).