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

Static states #219

Open
frame-lang opened this issue Feb 15, 2024 · 0 comments
Open

Static states #219

frame-lang opened this issue Feb 15, 2024 · 0 comments
Assignees

Comments

@frame-lang
Copy link
Owner

Currently, all state compartments are regenerated. Develop syntax and semantics around the idea of a singleton (static) version of a state.

fn main {
    var sm:# = #TransitionSm()

    sm.transit()

}

#StaticStates

    // note - there is only ever one 
    // static state for a particualar 
    // state, whether implicit or declared.

    -interface-

    e1
    e2
    e3 

    -machine-

    $S0

        |e1|
            // transition to a declared static state
            -> $!S1 ^

    $!S1

        // implicit static S2.
        |e2| -> $!S2 ^
        // new instance of $S2
        |e3| -> $S2 ^

    $S2

    $S3 
        // transition to the implicit static
        // S2 state
        |e2| -> $!S2 ^ 
       
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant