Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing state machines (step 2) #41

Open
clayrat opened this issue Sep 12, 2019 · 2 comments
Open

Executing state machines (step 2) #41

clayrat opened this issue Sep 12, 2019 · 2 comments

Comments

@clayrat
Copy link
Member

clayrat commented Sep 12, 2019

# run a bunch of steps in one go
./exec --fsm ./myProcess.fsm
    --ffiMap ./myProcess.ffiMap 
    --types ./myProcess.tdefs # we don't have this, _but_ it's doable
    --firingSequence ./myFiringSequence.txt

contents of myFiringSequence.txt: suppose the type of transition “0” = boolean
the text between () = serialized terms of the corresponding typedef

0 (true)
1 ()
2 ()
2 (12)
3 ()
1 ()
4 ()

what to do with this “messageData”? very simple, just pass it to the FFI
(right now, the format is text based, s-expr), but in the future it will be some for of binary data, CBOR, or cap-n-proto

possible FFI call

  • printHello : () -> IO () ~ prints ‘hello’
  • printNumber : Nat -> IO () ~ print ‘nr = »nat«’
  • printBoolean : Bool -> IO () ~ print ‘bool = …’

f : A -> B, X is the typedef label on f
then, ffi call type = X * A -> B

@clayrat
Copy link
Member Author

clayrat commented Oct 3, 2019

We've decided to try adding the FFI support to the "computer" approach to skip reimplementing things twice.

@clayrat
Copy link
Member Author

clayrat commented Oct 24, 2019

We probably want to decouple transitions number and terms, a-la Marco's Cadiz talk example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant