Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Multi-stage flip-flop?

by RonW (Parson)
on Dec 11, 2014 at 18:34 UTC ( [id://1110088]=note: print w/replies, xml ) Need Help??


in reply to Re: Multi-stage flip-flop?
in thread Multi-stage flip-flop?

Relevant to sundialsvc4's comment "based only upon what it sees and upon the value of variables whose values can easily be printed", many textual state machine description syntaxes do not declare an explicit state variable.

For example, in some dialects of Scheme, this:

(define mystm (automaton init [init : (a -> slurp)] [slurp : (b -> done) (* -> slurp)] [done : success] ) )

defines a state machine equivalent to a Perl flip-flop. ("success" resets the state machine and returns true to the parent task.)

In cond0 .. cond1 the states are anonymous, but cond0 is the "event" instigating the transition from the initial "inactive" state to the "active" state and cond1 is the event instigating the transition back to "inactive".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110088]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-16 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found