include "primitives.alh"
include "modelling.alh"

Composite schedule {
    {Contains} Success success {}
    {Contains} ForAll print_tokens {
        LHS {
            Pre_PetriNet/Place {
                label = "0"
            }
        }
        RHS {
            Post_PetriNet/Place {
                label = "0"
                action = $
                    Void function action(model : Element, name : String, mapping : Element):
                        output((cast_value(read_attribute(model, name, "name")) + " --> ") + cast_value(read_attribute(model, name, "tokens")))
                        return!
                    $
            }
        }
    }
}
OnSuccess (print_tokens, success) {}
OnFailure (print_tokens, success) {}
Initial (schedule, print_tokens) {}
