SMT Programming & Examples

How SatIR transforms free-text eligibility criteria into solver-executable SMT programs through incremental orchestration — and a worked model-checking example.


Incremental SMT Programming
Rather than generating a complete eligibility program in one shot, SatIR builds it requirement by requirement — validating each fragment before committing it.

Why incremental? Direct one-shot translation from free-text to a full SMT program is brittle: variables get redeclared inconsistently, qualifiers are dropped or attached to the wrong concept, polarity is inverted, and the result may be syntactically valid but semantically wrong. By translating one requirement at a time, failures are localized, and the current symbolic state guides future decisions.

Incremental SMT programming workflow
Fig. — Incremental SMT programming workflow. For each requirement, SatIR prepares symbolic ingredients (canonical entities, free entities, qualifiers), identifies reusable variables, introduces new variables from three sources (demographic, canonical medical, free), translates to SMT-LIB, validates the fragment, and commits only if it passes all checks.

The incremental driver separates five distinct subproblems for each requirement:

01
Symbol reuse identification
02
Qualifier–qualified linking
03
Variable construction
04
Local SMT translation
05
Validation & commit
Three Sources of Variables
New variables are drawn from three sources, reflecting a principled boundary between canonical and open-world content.
DEMOGRAPHIC

Age, sex, pregnancy status — standardized template variables.

CANONICAL MEDICAL

Grounded to SNOMED CT with qualifiers — the ontology-aware backbone.

FREE VARIABLES

Clinically meaningful content that can't be canonicalized — conservative, open-world.

Validation as feedback. After each fragment is generated, SatIR checks it with the SMT solver immediately. If it introduces a parse error, sort mismatch, or contradiction, the fragment is rolled back and retried with feedback. A separate semantic verifier catches subtler errors like polarity inversions and dropped qualifiers. The solver becomes an active feedback source during synthesis, not just a final execution engine.