Skip to main content

Module classify_into_lia

Module classify_into_lia 

Source
Expand description

This module contains the logic to transform a general boolean expression over variables into a super::LIAVariableConstraint.

The conversion generally works as described in ../general_to_lia.rs.

This module implements the logic that after successfully splitting the expression into pairs of atoms and rational factors, brings all variables to the left and collects all parameter factor pairs and constants on the right.

Then the module converts them into the appropriate LIAVariableConstraint type, i.e., either a SingleAtomConstraint, SumAtomConstraint or ComparisonConstraint.

Functionsยง

combine_pair_iterators ๐Ÿ”’
Combine two iterators over pairs of tuples over (T, Fraction) into a single map from T to Fraction, where all entries from negated_it are inserted negated
split_pairs_into_atom_and_threshold ๐Ÿ”’
This function is designed to rewrite an comparison expression into a form where the returned HashMap<T, Fraction> forms the new lhs of the equation and the returned threshold is the right hand side of the equation