13 case FormulaType::BOOL:
14 vars.add(f.boolean());
16 case FormulaType::CONSTRAINT:
17 carl::variables(f.constraint(), vars);
19 case FormulaType::VARCOMPARE:
20 carl::variables(f.variable_comparison(), vars);
22 case FormulaType::VARASSIGN:
23 carl::variables(f.variable_assignment(), vars);
25 case FormulaType::BITVECTOR:
26 f.bv_constraint().gatherVariables(vars);
28 case FormulaType::UEQ:
29 f.u_equality().gatherVariables(vars);
31 case FormulaType::EXISTS:
32 case FormulaType::FORALL:
33 vars.add(f.quantified_variables().begin(),f.quantified_variables().end());
41 template<
typename Pol>
46 f.u_equality().gatherUFs(ufs);
52 template<
typename Pol>
57 f.u_equality().gatherUVariables(uvs);
63 template<
typename Pol>
68 f.bv_constraint().gatherBVVariables(bvvs);
78 template<
typename Pol>
83 case FormulaType::CONSTRAINT:
84 constraints.push_back(f.constraint());
96 template<
typename Pol>
101 case FormulaType::CONSTRAINT:
102 constraints.push_back(f);
carl is the main namespace for the library.
carlVariables uninterpreted_variables(const T &t)
void uninterpreted_functions(const Formula< Pol > &f, std::set< UninterpretedFunction > &ufs)
carlVariables bitvector_variables(const T &t)
void visit(const Formula< Pol > &formula, Visitor func)
Recursively calls func on every subformula.
void arithmetic_constraints(const Formula< Pol > &f, std::vector< Constraint< Pol >> &constraints)
Collects all constraint occurring in this formula.
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
Represent a polynomial (in)equality against zero.
Represent an SMT formula, which can be an atom for some background theory or a boolean combination of...