Module uvls::smt

source Β·
Expand description

Implements the semantic analysis using Z3

SMT semantic analysis with Z3, communication with the solver happens over stdio and SMT-LIB2. While the performance is worse than linking with Z3, we are solver independent and don’t have to interact with any C-Bindings. UVL is translated directly into SMT-LIB, both attributes and features are treated as free variables. The rest is encoded in named asserts, this allows to get a accurate unsat core. Eg. each attribute is restricted with an assert that allows it to either be its defined value or 0 depending on the parent feature value. Using functions might be more efficient, but this way we can reconfigure and detect if an attribute value contributes to the unsat core. Variables are named as v{n} where n is an index into a lookup table of UVL ModuleSymbols Asserts are encoded similarly as a{n} where n is and index into a list of naming information that links uvl expression to asserts.

Re-exportsΒ§

ModulesΒ§

  • parse πŸ”’
    Turn smt-lib strings to rust. (currently incomplete)

StructsΒ§

EnumsΒ§

FunctionsΒ§