fsm

State Machine Framework for JBoss/Java?

We are developing an application that involves a lot of different tests where each test lead the users to a number of steps. We are thinking of using a state machine framework to capture the states/transitions out of the code. We are also thinking of using rule engine to supplement on the rules. Anyone has experience with any state ma...

Implementing event conditions in a C++ state machine

I'm using an hierarchical FSM for an embedded C++ application interface. I'd like to use small functions to determine whether certain inter-state events can be triggered, as well as use them to effect changes in the database: however, making a new class with different event functions for each state is daunting, as well as setting pointer...

RE -> FSM generator?

Given a regular expression, I'm looking for a package which will dynamically generate the code for a finite state machine that implements the RE. C/C++ and Python preferred, but other languages are of interest as well. ...

Short example of regular expression converted to a state machine?

In the Stack Overflow podcast #36 (http://blog.stackoverflow.com/2009/01/podcast-36/), this opinion was expressed: Once you understand how easy it is to set up a state machine, you’ll never try to use a regular expression inappropriately ever again. I've done a bunch of searching. I've found some academic papers and other complicated e...

Validating a finite state machine (using AASM) on Rails.

I'm using AASM by Rubyist to build a 4-step wizard for an AR object. According to the state of the object, there are different validations that need to be done. What is the smartest way to validate an object according to it's state on a certain transition? ...

FSM data structure design

Hi Folks, I want to write an FSM which starts with an idle state and moves from one state to another based on some event. I am not familiar with coding of FSM and google didn't help. Appreciate if someone could post the C data structure that could be used for the same. Thanks, syuga2012 ...

implementing a state machine using the "yield" keyword

Is it feasible to use the yield keyword to implement a simple state machine as shown here. To me it looks like the C# compiler has done the hard work for you as it internally implements a state machine to make the yield statement work. Can you piggy-back on top of the work the compiler is already doing and get it to implement most of th...

General proof of equivalence of two FSMs in finite time?

Does a general proof exist for the equivalence of two (deterministic) finite state machines that always takes finite time? That is, given two FSMs, can you prove that given the same inputs they will always produce the same outputs without actually needing to execute the FSMs (which could be non-terminating?). If such a proof does exist, ...

Does C# include finite state machines?

I've recently read about the boost::statechart library (finite state machines) and I loved the concept. Does C# have a similar mechanism ? Or can it be implemented using a specific design pattern? ...

Graphical Finite State Machine Editor

I am looking for a sophisticated graphical FSM editor that can export a model in a well-documented output format, like SCXML or similar. Can anybody recommend me a tool? ...

Finite State Machine and inter-FSM signaling

Recommendations for languages with native (so no FSM generation tools) support for state machine development and execution and passing of messages/signals. This is for telecoms, e.g implementation of FSMs of this level of complexity. I have considered Erlang, but would love some feedback, suggestions, pointer to tutorials, alternatives,...

How to Build finite state machine that show modulus 4 in binary

Can someone show me how to build a finite state machine that shows modulus 4 in binary? ...

Python graceful fail on int() call?

I have to make a rudimentary FSM in a class, and am writing it in Python. The assignment requires we read the transitions for the machine from a text file. So for example, a FSM with 3 states, each of which have 2 possible transitions, with possible inputs 'a' and 'b', wolud have a text file that looks like this: 2 # first li...

How to connect two state circles with an arrow in tkinter?

I am currently writing a fsm editor with tkinter. But, I stuck on connecting two states. I have two questions: 1) How can make the transition arrow growable according to mouse movement? 2) How can I stick the starting point of the arrow on a state and the end point of the arrow on another state? PS. Do you think the documentation of t...

Need help with C++ templates

I'm fairly sure this is a template question, since I can't seem to solve it any other way - but non-template solutions are also welcome. A Finite State Machine has a number of program States and each state can react to a number of Events. So, I want to define classes for Event, State and FSM. FSM has a collection (probably vector, migh...

Python state-machine design

Related to this SO question (C state-machine design), could you SO folks share with me (and the community!) your Python state-machine design techniques? Update3: At the moment, I am going for an engine based on the following: class TrackInfoHandler(object): def __init__(self): self._state="begin" self._acc="" #...

How to design this particular finite state machine?

Hey peeps, I am trying to get my head around how to design the following system, which I think can be defined as a finite state machine: Say we have a pile of 16 building blocks (towers, walls, gates) together forming a castle. The player can drag the blocks to 16 places on a floorplan and if done right they will see the whole castle....

Why is {a^nb^n | n >= 0} not regular?

In a CS course I'm taking there is an example of a language that is not regular: {a^nb^n | n >= 0} I can understand that it is not regular since no Finite State Automaton/Machine can be written that validates and accepts this input since it lacks a memory component. (Please correct me if I'm wrong) The wikipedia entry on Regular Lang...

debugging finite state machine spell checker code

I need someone to debug the lines of c++ code I wrote below so it can run. It is intended to spell check the word "and" using state to state transition. #include<iostream> #include<string> using namespace std; string in_str; int n; void spell_check() { int i; FILE *in_file; while (!EOF(in_file)) { fsca...

Finite State Machine Spellchecker

Possible Duplicate: debugging finite state machine spell checker code I would love to have a debugged copy of the finite state machine code below. I tried debugging but could not, all the machine has to do is to spell check the word "and",an equivalent program using case is welcomed. #include<cstdlib> #include<stdio.h> #inclu...