spock-cli 0.9.0

A modern, statically typed, natively compiled model checking and proof language
// A counter whose declared range its steps leave, to check how a range check is reported.

struct State {
    x: 0..3,
}

impl State {
    action init() -> State {
        State { x: 0 }
    }

    action next(self) -> State {
        Self { ..self, x: self.x + 1 }
    }
}

model m {
    init = State::init;
    next = State::next;
}