tiny.smt.Expr
Defined in term.
One term: a tag naming its operator and a payload holding its operands.
API (49)
Fields and members
Public fields and members.
addand_applyarray_selectarray_storebitvecboolbvaddbvandbvashrbvconcatbvextractbvlshrbvmulbvnotbvorbvrotlbvrotrbvsaddobvsdivbvshlbvsignextbvslebvsltbvsmodbvsmulobvsrembvssubobvsubbvuaddobvudivbvulebvultbvumulobvurembvxorbvzeroextdistincteqgegtimpliesintleltmulnotor_symbol
Source
Source: lib/smt/src/term.zig:200
zig
/// One term: a tag naming its operator and a payload holding its operands. Code that walks a/// formula switches on it, as the encoder and the SMT-LIB writer do for every term. The `Context`/// stores one per term, and a term's index is its position in that table. A tag named after an/// SMT-LIB operator reads and writes as that operator, and each tag whose name differs gives its/// SMT-LIB spelling. The bit-vector encoder refuses the integer tags (`int`, `add`, `mul`, `le`,/// `lt`, `ge`, `gt`) and `distinct` with `UnsupportedTerm`.pub const Expr = union(enum) { /// A named constant, with its name and sort as the payload. The encoder gives it fresh /// variables, one per bit. symbol: SymbolExpr, /// A function application, with the function and its arguments as the payload. Its sort is the /// function's result sort. apply: ApplyExpr, /// A Boolean constant. SMT-LIB writes it `true` or `false`. bool: bool, /// An integer constant, a signed 128-bit value. The bit-vector encoder refuses it. int: i128, /// A bit-vector constant, with its value and width as the payload. SMT-LIB writes it /// `(_ bvV W)`. bitvec: BitVecExpr, /// The negation of one Boolean operand. not: Term, /// The conjunction of any number of Boolean operands. With no operands it is true. SMT-LIB /// writes it `and`. and_: []const Term, /// The disjunction of any number of Boolean operands. With no operands it is false. SMT-LIB /// writes it `or`. or_: []const Term, /// `lhs` implies `rhs`, both Boolean. SMT-LIB writes it `=>`. implies: BinaryOperands, /// `lhs` equals `rhs`, a Boolean term over two operands of one sort. Two arrays are equal when /// every cell is equal. SMT-LIB writes it `=`. eq: BinaryOperands, /// True when all operands differ from one another, over operands of one sort. The bit-vector /// encoder refuses it. distinct: []const Term, /// The integer sum of any number of integer operands. SMT-LIB writes it `+`. The bit-vector /// encoder refuses it. add: []const Term, /// The integer product of any number of integer operands. SMT-LIB writes it `*`. The bit-vector /// encoder refuses it. mul: []const Term, /// `lhs` is at most `rhs`, as integers. SMT-LIB writes it `<=`. The bit-vector encoder refuses /// it. le: BinaryOperands, /// `lhs` is less than `rhs`, as integers. SMT-LIB writes it `<`. The bit-vector encoder refuses /// it. lt: BinaryOperands, /// `lhs` is at least `rhs`, as integers. SMT-LIB writes it `>=`. The bit-vector encoder refuses /// it. ge: BinaryOperands, /// `lhs` is greater than `rhs`, as integers. SMT-LIB writes it `>`. The bit-vector encoder /// refuses it. gt: BinaryOperands, /// `lhs` is at most `rhs`, as unsigned bit-vectors of one width. bvule: BinaryOperands, /// `lhs` is less than `rhs`, as unsigned bit-vectors of one width. bvult: BinaryOperands, /// `lhs` is at most `rhs`, as two's-complement bit-vectors of one width. bvsle: BinaryOperands, /// `lhs` is less than `rhs`, as two's-complement bit-vectors of one width. bvslt: BinaryOperands, /// True when the unsigned sum of `lhs` and `rhs` does not fit their width. bvuaddo: BinaryOperands, /// True when the two's-complement sum of `lhs` and `rhs` does not fit their width: both have /// one sign and the sum has the other. bvsaddo: BinaryOperands, /// True when the two's-complement difference `lhs` minus `rhs` does not fit their width. bvssubo: BinaryOperands, /// True when the unsigned product of `lhs` and `rhs` does not fit their width. bvumulo: BinaryOperands, /// True when the two's-complement product of `lhs` and `rhs` does not fit their width. bvsmulo: BinaryOperands, /// The bitwise complement of one bit-vector operand, of the same width. bvnot: Term, /// The bitwise and of two bit-vectors of one width. bvand: BinaryOperands, /// The bitwise or of two bit-vectors of one width. bvor: BinaryOperands, /// The bitwise exclusive or of two bit-vectors of one width. bvxor: BinaryOperands, /// `lhs` shifted toward its most significant bit by the value of `rhs`, with zeros shifted in, /// over two bit-vectors of one width. A shift amount at or above the width gives zero. bvshl: BinaryOperands, /// `lhs` shifted toward its least significant bit by the value of `rhs`, with zeros shifted in. /// A shift amount at or above the width gives zero. bvlshr: BinaryOperands, /// `lhs` shifted toward its least significant bit by the value of `rhs`, with copies of its /// sign bit shifted in. A shift amount at or above the width fills every bit with the sign bit. bvashr: BinaryOperands, /// The unsigned quotient of `lhs` by `rhs`, rounded down. Division by zero gives all ones. bvudiv: BinaryOperands, /// The unsigned remainder of `lhs` by `rhs`. The remainder by zero is `lhs`. bvurem: BinaryOperands, /// The two's-complement quotient of `lhs` by `rhs`, rounded toward zero. Division by zero gives /// 1 for a negative `lhs` and all ones otherwise. bvsdiv: BinaryOperands, /// The two's-complement remainder of `lhs` by `rhs`, with the sign of `lhs`. The remainder by /// zero is `lhs`. bvsrem: BinaryOperands, /// The two's-complement modulo of `lhs` by `rhs`, with the sign of `rhs`. The modulo by zero is /// `lhs`. bvsmod: BinaryOperands, /// The element of an array at an index, a bit-vector of the element width. The index has the /// array's index width. SMT-LIB writes it `select`. array_select: ArraySelectExpr, /// An array equal to its operand everywhere except at one index, which holds the new element. /// The term's sort is the operand's array sort. SMT-LIB writes it `store`. array_store: ArrayStoreExpr, /// The bits of `lhs` above the bits of `rhs`, one bit-vector as wide as the two together. /// SMT-LIB writes it `concat`. bvconcat: BinaryOperands, /// The bits from position `high` down to position `low` of one bit-vector, both included, so /// the result has `high - low + 1` bits. SMT-LIB writes it `((_ extract high low) x)`. bvextract: BitVecExtractExpr, /// A bit-vector widened by `extra` zero bits above its most significant bit. SMT-LIB writes it /// `((_ zero_extend extra) x)`. bvzeroext: BitVecExtendExpr, /// A bit-vector widened by `extra` copies of its sign bit. SMT-LIB writes it /// `((_ sign_extend extra) x)`. bvsignext: BitVecExtendExpr, /// A bit-vector rotated toward its most significant bit by a fixed number of positions, with /// the top bits wrapping to the bottom. SMT-LIB writes it `((_ rotate_left amount) x)`. bvrotl: BitVecRotateExpr, /// A bit-vector rotated toward its least significant bit by a fixed number of positions, with /// the bottom bits wrapping to the top. SMT-LIB writes it `((_ rotate_right amount) x)`. bvrotr: BitVecRotateExpr, /// The sum of two bit-vectors of one width, modulo 2 to the power of the width. bvadd: BinaryOperands, /// The difference `lhs` minus `rhs` of two bit-vectors of one width, modulo 2 to the power of /// the width. bvsub: BinaryOperands, /// The product of two bit-vectors of one width, modulo 2 to the power of the width. bvmul: BinaryOperands,};Source: lib/smt/src/root.zig:119
zig
pub const Expr = term.Expr;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 49 |
| Version | 26.7.0 |
| Revision | daab053ee433 |