19#include "dlinear/parser/smt2/Sort.h"
20#include "dlinear/symbolic/literal.h"
21#include "dlinear/symbolic/symbolic.h"
36 enum class Type { EXPRESSION, FORMULA };
53 Term &operator=(
const Term &) =
default;
61 [[nodiscard]] Type
type()
const;
94 std::variant<Expression, Formula>
term_;
97std::ostream &operator<<(std::ostream &os,
const Term &t);
101#ifdef DLINEAR_INCLUDE_FMT
103#include "dlinear/util/logging.h"
Represents a symbolic form of an expression.
Represents a symbolic variable.
Type
Supported types of symbolic variables.
Generic term that can be either an expression or a formula.
void Check(Sort s) const
Check if this term can be matched with s.
Expression & m_expression()
Get read-write access to the expression of the term.
Formula & m_formula()
Get read-write access to the formula of the term.
Type type() const
Get read-only access to the type of the term.
Term()
Construct a new term object.
Term Substitute(const Variable &v, const Term &t)
Create a new Term with substitutes the variable v in this term with t.
std::variant< Expression, Formula > term_
Expression or formula stored by the term.
const Formula & formula() const
Get read-only access to the formula of the term.
const Expression & expression() const
Get read-only access to the expression of the term.
Namespace for the SMT2 parser of the dlinear library.