class main(model.Module): c1 = model.Var(model.Range(0, 2)) c2 = model.Var(model.Range(0, 2)) INIT = [c1 == 0, c2 == 0] TRANS = [model.Next(c1) == (c1 + 1) % 2, model.Next(c2) == (c2 + 1) % 2]
class main(model.Module): c1 = model.Var(model.Range(0, 2)) VAR = collections.OrderedDict((("c2", "0..2"),)) INIT = [c1 == 0, model.Identifier("c2") == 0] TRANS = [model.Next(c1) == (c1 + 1) % 2, model.Next("c2") == (model.Identifier("c2") + 1) % 2]
class main(model.Module): c1 = model.Identifier("c1") c2 = model.Identifier("c2") VAR = collections.OrderedDict(((c1, model.Range(0,2)), (c2, model.Range(0,2)))) INIT = [c1 == 0, c2 == 0] TRANS = [model.Next(c1) == (c1 + 1) % 2, model.Next(c2) == (c2 + 1) % 2]
class main(model.Module): J = model.Var(model.Boolean(), "J") K = model.Var(model.Boolean(), "K") Q = model.Var(model.Boolean(), "Q") INIT = [(Q == model.Falseexp())] ASSIGN = {model.Next(Q): model.Case(((J & K, ~Q), (J, model.Trueexp()), (K, model.Falseexp()), (model.Trueexp(), Q)))}