carl
24.04
Computer ARithmetic Library
|
Allows to print carl data structures in SMTLIB syntax. More...
#include <SMTLIBStream.h>
Public Member Functions | |
void | comment (const std::string &c) |
Writes a comment. More... | |
void | declare (Logic l) |
Declare a logic via set-logic . More... | |
void | declare (Sort s) |
Declare a sort via declare-sort . More... | |
void | declare (UninterpretedFunction uf) |
Declare a fresh function via declare-fun . More... | |
void | declare (Variable v) |
Declare a fresh variable via declare-fun . More... | |
void | declare (BVVariable v) |
Declare a bitvector variable via declare-fun . More... | |
void | declare (UVariable v) |
Declare an uninterpreted variable via declare-fun . More... | |
void | declare (const std::set< UninterpretedFunction > &ufs) |
Declare a set of functions. More... | |
void | declare (const carlVariables &vars) |
Declare a set of variables. More... | |
void | declare (const std::set< BVVariable > &bvvs) |
Declare a set of bitvector variables. More... | |
void | declare (const std::set< UVariable > &uvs) |
Declare a set of uninterpreted variables. More... | |
void | initialize (Logic l, const carlVariables &vars, const std::set< UninterpretedFunction > &ufs={}, const std::set< BVVariable > &bvvs={}, const std::set< UVariable > &uvs={}) |
Generic initializer including the logic, a set of variables and a set of functions. More... | |
template<typename Pol > | |
void | initialize (Logic l, std::initializer_list< Formula< Pol >> formulas) |
Generic initializer including the logic and variables and functions from a set of formulas. More... | |
void | setInfo (const std::string &name, const std::string &value) |
Set information via set-info . More... | |
void | setOption (const std::string &name, const std::string &value) |
Set option via set-option . More... | |
template<typename Pol > | |
void | assertFormula (const Formula< Pol > &formula) |
Assert a formula via assert . More... | |
template<typename Pol > | |
void | minimize (const Pol &objective) |
Minimize an objective via custom minimize . More... | |
void | checkSat () |
Check satisfiability via check-sat . More... | |
void | getAssertions () |
Print assertions via get-assertions . More... | |
void | getModel () |
Print model via get-model . More... | |
void | echo (const std::string &str) |
Echo via echo . More... | |
void | reset () |
Reset via reset . More... | |
void | exit () |
Exit via exit . More... | |
template<typename T > | |
SMTLIBStream & | operator<< (T &&t) |
Write some data to this stream. More... | |
SMTLIBStream & | operator<< (std::ostream &(*os)(std::ostream &)) |
Write io operators (like std::endl ) directly to the underlying stream. More... | |
auto | str () const |
Return the written data as a string. More... | |
auto | content () const |
Return the underlying stream buffer. More... | |
Private Member Functions | |
void | write (const mpz_class &n) |
void | write (const mpq_class &n) |
template<typename Pol > | |
void | write (const Constraint< Pol > &c) |
template<typename Pol > | |
void | write (const VariableComparison< Pol > &c) |
template<typename Pol > | |
void | write (const Formula< Pol > &f) |
template<typename Rational , typename Poly > | |
void | write (const Model< Rational, Poly > &model) |
template<typename Rational > | |
void | write (const IntRepRealAlgebraicNumber< Rational > &ran) |
template<typename Rational , typename Poly > | |
void | write (const ModelValue< Rational, Poly > &mv) |
void | write (const Monomial::Arg &m) |
void | write (const Monomial::Content::value_type &m) |
void | write (const Monomial &m) |
template<typename Coeff > | |
void | write (const MultivariatePolynomial< Coeff > &mp) |
void | write (Relation r) |
template<typename Coeff > | |
void | write (const Term< Coeff > &t) |
void | write (const UEquality &ueq) |
void | write (const UFInstance &ufi) |
template<typename Coeff > | |
void | write (const UnivariatePolynomial< Coeff > &up) |
void | write (const UTerm &t) |
void | write (const Variable &v) |
void | write (const VariableType &vt) |
void | write (const bool b) |
template<typename T > | |
void | write (T &&t) |
Private Attributes | |
std::stringstream | mStream |
Allows to print carl data structures in SMTLIB syntax.
Definition at line 28 of file SMTLIBStream.h.
|
inline |
Assert a formula via assert
.
Definition at line 409 of file SMTLIBStream.h.
|
inline |
Check satisfiability via check-sat
.
Definition at line 420 of file SMTLIBStream.h.
|
inline |
Writes a comment.
Definition at line 305 of file SMTLIBStream.h.
|
inline |
Return the underlying stream buffer.
Definition at line 468 of file SMTLIBStream.h.
|
inline |
Declare a bitvector variable via declare-fun
.
Definition at line 331 of file SMTLIBStream.h.
|
inline |
Declare a set of variables.
Definition at line 345 of file SMTLIBStream.h.
|
inline |
Declare a set of bitvector variables.
Definition at line 351 of file SMTLIBStream.h.
|
inline |
Declare a set of functions.
Definition at line 339 of file SMTLIBStream.h.
|
inline |
Declare a set of uninterpreted variables.
Definition at line 357 of file SMTLIBStream.h.
|
inline |
Declare a logic via set-logic
.
Definition at line 309 of file SMTLIBStream.h.
|
inline |
Declare a sort via declare-sort
.
Definition at line 313 of file SMTLIBStream.h.
|
inline |
Declare a fresh function via declare-fun
.
Definition at line 317 of file SMTLIBStream.h.
|
inline |
Declare an uninterpreted variable via declare-fun
.
Definition at line 335 of file SMTLIBStream.h.
|
inline |
Declare a fresh variable via declare-fun
.
Definition at line 327 of file SMTLIBStream.h.
|
inline |
Echo via echo
.
Definition at line 435 of file SMTLIBStream.h.
|
inline |
Exit via exit
.
Definition at line 445 of file SMTLIBStream.h.
|
inline |
Print assertions via get-assertions
.
Definition at line 425 of file SMTLIBStream.h.
|
inline |
Print model via get-model
.
Definition at line 430 of file SMTLIBStream.h.
|
inline |
Generic initializer including the logic, a set of variables and a set of functions.
Definition at line 363 of file SMTLIBStream.h.
|
inline |
Generic initializer including the logic and variables and functions from a set of formulas.
Definition at line 383 of file SMTLIBStream.h.
|
inline |
Minimize an objective via custom minimize
.
Definition at line 415 of file SMTLIBStream.h.
|
inline |
Write io operators (like std::endl
) directly to the underlying stream.
Definition at line 457 of file SMTLIBStream.h.
|
inline |
Write some data to this stream.
Definition at line 451 of file SMTLIBStream.h.
|
inline |
Reset via reset
.
Definition at line 440 of file SMTLIBStream.h.
|
inline |
Set information via set-info
.
Definition at line 398 of file SMTLIBStream.h.
|
inline |
Set option via set-option
.
Definition at line 403 of file SMTLIBStream.h.
|
inline |
Return the written data as a string.
Definition at line 463 of file SMTLIBStream.h.
|
inlineprivate |
Definition at line 293 of file SMTLIBStream.h.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Definition at line 178 of file SMTLIBStream.h.
|
inlineprivate |
Definition at line 182 of file SMTLIBStream.h.
|
inlineprivate |
|
inlineprivate |
Definition at line 32 of file SMTLIBStream.h.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Definition at line 282 of file SMTLIBStream.h.
|
inlineprivate |
Definition at line 217 of file SMTLIBStream.h.
|
inlineprivate |
Definition at line 299 of file SMTLIBStream.h.
|
private |
Definition at line 30 of file SMTLIBStream.h.