In progress
Circus Model Checking & Refinement
Model checking and refinement verification for Circus, the state-rich process algebra combining Z and CSP.
State of the art & contributions
Circus unifies the state-based specification language Z with the process algebra CSP, so a single model captures both data and concurrency. Model checking such state-rich specifications is harder than checking either formalism alone: the state part must be reasoned about symbolically while the process part explores behaviour.
This work contributes a route from Circus specification to verified refinement that links the two worlds:
- a frontend that parses and type-checks Circus (and ISO-Z) specifications;
- a solver-backed checker that reasons about the state part with SMT, alongside explicit-state process exploration;
- FDR-style refinement checking over traces and failures-divergences;
- mechanised proofs that support the refinement claims rather than trusting the checker alone.
The combination of state-based modelling with process-algebraic refinement — and replaying proofs alongside the checks — is the focus of the research.
Architecture
The tool is a three-part pipeline:
- Haskell frontend — reads LaTeX Circus specifications, converts the markup to Unicode, lexes and parses into a concrete syntax tree, runs the syntactic transformations, then type-checks the specification and applies the semantic transformation.
- Serialized AST — the type-checked tree is emitted as text. This textual contract is the only interface between the two halves, so each side can be developed and tested independently.
- C++/Z3 checker — re-parses the serialized tree, translates state and actions into Z3 terms (sets as Boolean arrays, relations as store chains, free types as enumeration sorts), and provides explicit-state model checking, animation, and trace / failures-divergences refinement.

What it can do
- Parse and type-check Circus and ISO-Z specifications.
- Model-check specifications, including deadlock, invariant and divergence checks.
- Animate processes by stepping through executions.
- Check trace and failures-divergences refinement between a specification and an implementation.
- Replay mechanised proofs that certify refinement claims.
The current case study verifies the stepwise Fire Control System refinement chain from Oliveira’s PhD thesis.
How to use it
The frontend and checker are driven from the command line:
ParseCircus spec.tex -s 0x20 # parse, type-check and print the type-checked tree
circusmc --modelcheck … # model checking (deadlock, invariant, divergence)
circusmc --refine spec impl … # trace / failures-divergences refinement
circusmc --animate … # step through executions
The refinement mode is the central verification question: does an implementation refine a specification in the traces and failures-divergences models?