Installation
pip install speclogicianGetting started
SpecLogician stores an evolving State made of StateInstances. Each change creates a new instance, and you can inspect the history.
This guide uses the CLI style you’ve been building:
speclogician ch ...for applying typed changesspeclogician view ...for inspecting the state
1) Define a base model (state/action)
You start by defining what a state and action look like.
speclogician ch base-edit --src "type state = int\ntype action = int"This makes the “shape of the world” explicit and stable.
2) Add predicates
Predicates describe properties of state or action. They’re used by scenarios.
speclogician ch pred-add --pred-type state --pred-name pred_eq_ten --pred-src "s = 10"
speclogician ch pred-add --pred-type action --pred-name act_gt_state --pred-src "a > s"3) Add transitions
Scenarios are local, declarative behavior slices.
speclogician ch scenario-add sc1 --given pred_eq_ten --when act_gt_state --then step14) Add scenarios
Add a scenario (given/when/then)
speclogician ch scenario-add sc1 --given pred_eq_ten --when act_gt_state --then step15) Inspect what you built
speclogician view domain
speclogician view scenarios
speclogician view spec
speclogician view instancesThat’s it: you now have an incremental formal model that can grow by small, typed edits.