diff --git a/solver/src/model/lang/sym.rs b/solver/src/model/lang/sym.rs index 5056435c..f4a89af8 100644 --- a/solver/src/model/lang/sym.rs +++ b/solver/src/model/lang/sym.rs @@ -64,6 +64,13 @@ impl SAtom { SAtom::Cst(s) => IAtom::new(IVar::ZERO, usize::from(s.sym) as IntCst), } } + + pub fn variable(&self) -> VarRef { + match self { + SAtom::Var(v) => v.var, + SAtom::Cst(_) => VarRef::ZERO, + } + } } impl From for VarRef {