Expand description
Conflict-free traffic-signal PHASE DESIGNER (certified SAT synthesis).
Grouping intersection movements into green phases so no two conflicting movements ever share
a phase is exactly graph k-colouring — a SAT problem. We encode it as a boolean ProofExpr
and discharge it with the project’s own certified solver (logicaffeine_proof::sat), never Z3:
- a feasible plan is a SAT model (a witness that is trivially re-checkable), and
- the claim “fewer phases is impossible” is a
prove_unsatRefutedresult, which is RUP-certified — so the minimality of the plan is certified, not merely asserted.
The English frontend is a focused grammar (“X conflicts with Y, Z and …”) rather than the general FOL pipeline, so the designer is robust independent of that surface.
Structs§
- Intersection
- An intersection: a set of movements and the pairs that may not be green together.
- Phase
Plan - A synthesized signal plan: each movement assigned to a green phase.
Functions§
- design_
from_ spec - Parse an English spec into an
Intersection, then design its minimal plan. - design_
phase_ plan - Design the minimal-phase conflict-free plan for an intersection, or
Noneif it has no movements. - is_
valid_ coloring - Re-check that a plan is a genuine conflict-free colouring (used by tests and as a guard).
- parse_
intersection - Parse a focused English spec into an
Intersection.