description | HLA macros to make executable FSM language |
owner | chris.brody@gmail.com |
last change | Wed, 16 Apr 2008 22:13:11 +0000 (17 00:13 +0200) |
URL | git://repo.or.cz/hlafsm.git |
https://repo.or.cz/hlafsm.git | |
push URL | ssh://repo.or.cz/hlafsm.git |
https://repo.or.cz/hlafsm.git (learn more) | |
bundle info | hlafsm.git downloadable bundles |
content tags |
This is currently a pre-alpha, experimental project to use the macro facility of the High Level Assember (HLA) to make an easy-to-use Finite State Machine (FSM) language.
License: Public domain. Other licenses are under consideration for countries that do not recognize the meaning of "public domain".
Note:If you find this project useful, and especially if you have any suggestions for improvement, I would appreciate a note with your feedback to: chris.brody@gmail.com
Rationale: The FSM is one of the hardest constructs to support in traditional, existing programming languages. A better solution is to use some form of an extensible programming language that allows such a construct to be defined at a higher level. The HLA provides a sufficient macro facility to support the extensible language required for the FSM construct.
WARNING: This is currently at an experimental stage-the design is subject to change without guarantee of backwards compatibility. Preservation of backwards compatibility will come when this project reaches a stable release stage.
fsm_start ( fsm, smtpfsm_advance, "smtpfsm_advance" )
init_state ( STATE_INIT )
state ( STATE_HELO )
state ( STATE_MAIL )
state ( STATE_RCPT )
state ( STATE_DATA )
state ( STATE_QUIT )
event ( EVENT_HELO )
event ( EVENT_MAIL )
event ( EVENT_QUIT )
event ( EVENT_RCPT )
event ( EVENT_DATA )
event ( EVENT_END_DATA )
fsm_advance
tr ( STATE_INIT, EVENT_HELO, STATE_HELO, helo_enter )
tr ( STATE_HELO, EVENT_MAIL, STATE_MAIL, mail_enter )
tr2( STATE_HELO, EVENT_QUIT, STATE_QUIT, quit_callback )
tr ( STATE_MAIL, EVENT_RCPT, STATE_RCPT, rcpt_enter )
tr2( STATE_MAIL, EVENT_QUIT, STATE_QUIT, quit_callback )
tr ( STATE_RCPT, EVENT_DATA, STATE_DATA, data_enter )
tr2( STATE_RCPT, EVENT_QUIT, STATE_QUIT, quit_callback )
tr ( STATE_DATA, EVENT_END_DATA, STATE_MAIL, mail_enter )
end_fsm;
Note: Knowledge of HLA, eventxx, and libevent are assumed for those interested in building and running the SMTP test.
Please note that a very limited subset of SMTP is supported, i.e. no SSL or security checking, no special EHLO features, etc. In addition, the SMTP test is listening to port 5525, not 25.
2008-04-16 | Chris Brody | Graphviz presentation of SMTP test FSMmaster | commitcommitdifftreesnapshot (tar.gz zip) |
2008-04-16 | Chris Brody | Modify HLA FSM to generate graphviz output | commitcommitdifftreesnapshot (tar.gz zip) |
2008-04-16 | Chris Brody | Prepare hlafsm for graphviz generation | commitcommitdifftreesnapshot (tar.gz zip) |
2008-04-16 | Chris Brody | Update smtp test program for repo.or.cz/w/ioevent.git | commitcommitdifftreesnapshot (tar.gz zip) |
2008-04-07 | Chris Brody | Initial version of HLA FSM from hla-test in git://repo... | commitcommitdifftreesnapshot (tar.gz zip) |
16 years ago | master | logtree |