Module Symbol
Kind's symbols
The term representation is modeled after the SMTLIB 2.0 standard and the symbols are a subset of the symbols defined in the SMTLIB theories Core and Reals_Ints with the addition of uninterpreted symbols.
Most symbols are variadic and associativity is to be understood as defined in the SMTLIB standard:
`TRUEnullary: Boolean true value`FALSEnullary: Boolean false value`NOTunary: Boolean negation`IMPLIESvariadic, right-associative: Boolean implication`ANDvariadic, left-associative: Boolean conjunction`ORvariadic, left-associative: Boolean disjunction`XORvariadic, left-associative: Boolean exclusice disjunction`EQvariadic, chainable: equality between terms`DISTINCTvariadic, pairwise: distict predicate on terms`ITEternary: if-then-else`NUMERAL inullary: integer numeral`DECIMAL fnullary: floating-point decimal`UBV bnullary: constant unsigned bitvector`BV bnullary: consant bitvector`MINUSvariadic, left-associative: difference or a unary negation`PLUSvariadic, left-associative: sum`TIMESvariadic, left-associative: product`DIVvariadic, left-associative: real quotient`INTDIVvariadic, left-associative: integer quotient`MODbinary: modulus`ABSunary: absolute value`LEQchainable: less than or equal relation`LTchainable: less than relation`GEQchainable: greater than or equal relation`GTchainable: greater than relation`TO_REALunary: conversion to a real number`TO_INTunary: conversion to an integer number`IS_INTunary: real is an integer`DIVISIBLE nunary: divisibilibty by n`BVNOTunary: bit-wise negation`BVNEGunary: arithmetic negation (unary)`BVANDbinary: bit-wise conjunction`BVORbinary: bit-wise disjunction`BVADDbinary: signed bitvector sum`BVSUBbinary: signed bitvector difference`BVMULbinary: arithmetic multiplication`BVUDIVbinary: arithmetic integer division`BVSDIVbinary: arithmetic integer signed division`BVUREMbinary: arithmetic remainder`BVSREMbinary: arithmetic signed remainder`BVSHLbinary: logical shift left`BVLSHRbinary: logical shift right`BVASHRbinary: arithmetic shift right`BVULTbinary: arithmetic comparision less than`BVULEbinary: arithmetic comparision less than or equal to`BVUGTbinary: arithmetic comparision greater than`BVUGEbinary: arithmetic comparision greater than or equal to`BVSLTsigned binary: arithmetic comparision less than`BVSLEsigned binary: arithmetic comparision less than or equal to`BVSGTsigned binary: arithmetic comparision greater than`BVSGEsigned binary: arithmetic comparision greater than or equal to`BVEXTRACT (i, j)unary: extract subsequence from bitvector`BVCONCATbinary: concatenation of bitvectors`BVSIGNEXT iunary: sign extension of bitvectors`SELECTbinary: selection from array`STOREternary: update of an array
A chainable symbol is to be read as the conjunction of successive pairs, for example (<= 1 2 3) is equivalent to (and (<= 1 2)
(<= 2 3)). A pairwise symbol is to be read as the conjunction of each pair of arguments, for example (distinct a b c) is (and
(distinct a b) (distinct a c) (distinct b c)).
In addition to these interpreted symbols we use the following symbols
`UF uvariadic: uninterpreted symbol
Symbols are hashconsed so that we can rely on physical equality for comparison, however, as of now there are no useful properties to be stored alongside symbols. In particular the `NUMERAL i, `DECIMAL f and `SYM (s, t) symbols need to be hashconsed for physical equality.
- author
- Christoph Sticksel, Arjun Viswanathan
Types and hash-consing
type interpreted_symbol=[|`TRUEBoolean true value (nullary)
|`FALSEBoolean false value (nullary)
|`NOTBoolean negation (unary)
|`IMPLIESBoolean implication (right-associative)
|`ANDBoolean conjunction (left-associative)
|`ORBoolean disjunction (left-associative)
|`XORBoolean exclusive disjunction (left-associative)
|`EQEquality between terms (chainable)
|`DISTINCTPairwise distinct predicate (chainable)
|`ITEIf-then-else (ternary)
|`NUMERAL of Numeral.tInfinite precision integer numeral (nullary)
|`DECIMAL of Decimal.tinfinite precision floating-point decimal (nullary)
|`UBV of Bitvector.tConstant unsigned bitvector
|`BV of Bitvector.tConstant bitvector
|`MINUSDifference or unary negation (left-associative)
|`PLUSSum (left-associative)
|`TIMESProduct (left-associative)
|`DIVReal quotient (left-associative)
|`INTDIVInteger quotient (left-associative)
|`MODModulus (binary)
|`ABSAbsolute value (unary)
|`LEQLess than or equal relation (chainable)
|`LTLess than relation (chainable)
|`GEQGreater than or equal relation (chainable)
|`GTGreater than relation (chainable)
|`TO_REALConversion to a floating-point decimal (unary)
|`TO_INTConversion to an unsigned integer numeral (unary)
|`TO_UINT8Conversion to an unsigned integer8 numeral (unary)
|`TO_UINT16Conversion to an unsigned integer16 numeral (unary)
|`TO_UINT32Conversion to an unsigned integer32 numeral (unary)
|`TO_UINT64Conversion to an unsigned integer64 numeral (unary)
|`TO_INT8Conversion to an integer8 numeral (unary)
|`TO_INT16Conversion to an integer16 numeral (unary)
|`TO_INT32Conversion to an integer32 numeral (unary)
|`TO_INT64Conversion to an integer64 numeral (unary)
|`BV2NATConversion from bitvector to a natural number
|`IS_INTReal is an integer (unary)
|`DIVISIBLE of Numeral.tDivisible by
n(unary)|`BVNOTBit-wise negation (unary)
|`BVNEGArithmetic negation (unary)
|`BVANDBit-wise conjunction (binary)
|`BVORBit-wise disjunction (binary)
|`BVADDSigned bitvector sum (binary)
|`BVSUBSigned bitvector difference (binary)
|`BVMULArithmetic multiplication (binary)
|`BVUDIVArithmetic integer division (binary)
|`BVSDIVArithmetic integer signed division (binary)
|`BVUREMArithmetic remainder (binary)
|`BVSREMArithmetic signed remainder (binary)
|`BVSHLLogical shift left (binary)
|`BVLSHRLogical shift right (binary)
|`BVASHRArithmetic shift right (binary)
|`BVULT|`BVULE|`BVUGT|`BVUGE|`BVSLT|`BVSLE|`BVSGT|`BVSGE|`BVEXTRACT of Numeral.t * Numeral.tExtract subsequence from bitvector (unary)
|`BVCONCATConcatenation of bitvectors (binary)
|`BVSIGNEXT of Numeral.tSign extension of bitvector (unary)
|`SELECT of Type.t|`STOREUpdate of an array (ternary)
]The interpreted symbols
type symbol=[|interpreted_symbol|`UF of UfSymbol.tUninterpreted symbol (fixed arity)
]Adding uninterpreted function symbols separately for conversions from expressions in the SMT solver interface
Hashtables, maps and sets
val hash_symbol : t -> intHashing function on symbols
module SymbolHashtbl : Stdlib.Hashtbl.S with type SymbolHashtbl.key = tHash table over symbols
Constructor
Static symbols
val s_true : tConstant Boolean value symbol
val s_false : tConstant Boolean value symbol
val s_not : tConstant negation symbol
val s_and : tConstant conjunction symbol
val s_or : tConstant disjunction symbol
val s_implies : tConstant implication symbol
val s_ite : tConstant ite symbol
val s_eq : tConstant equality symbol
val s_geq : tConstant greater than or equal symbol
val s_leq : tConstant less than or equal symbol
val s_gt : tConstant greater than symbol
val s_lt : tConstant less than symbol
val s_mod : tConstant modulus operator symbol
val s_plus : tConstant plus operator symbol
val s_minus : tConstant minus operator symbol
val s_times : tConstant times operator symbol
val s_div : tConstant division operator symbol
val s_store : tarray store symbol
Accessors functions
val is_numeral : t -> boolReturn true if the symbol is a numeral
val is_decimal : t -> boolReturn true if the symbol is a decimal
val is_bitvector : t -> boolReturn true if the symbol is a bitvector
val is_ubitvector : t -> boolReturn true if the symbol is an unsigned bitvector
val is_ubv8 : t -> boolReturn true if the symbol is an unsigned bitvector of size 8
val is_ubv16 : t -> boolReturn true if the symbol is an unsigned bitvector of size 16
val is_ubv32 : t -> boolReturn true if the symbol is an unsigned bitvector of size 32
val is_ubv64 : t -> boolReturn true if the symbol is an unsigned bitvector of size 64
val is_bv8 : t -> boolReturn true if the symbol is a bitvector of size 8
val is_bv16 : t -> boolReturn true if the symbol is a bitvector of size 16
val is_bv32 : t -> boolReturn true if the symbol is a bitvector of size 32
val is_bv64 : t -> boolReturn true if the symbol is a bitvector of size 64
val is_to_uint8 : t -> boolReturn true if the symbol is a touint8
val is_to_uint16 : t -> boolReturn true if the symbol is a touint16
val is_to_uint32 : t -> boolReturn true if the symbol is a touint32
val is_to_uint64 : t -> boolReturn true if the symbol is a touint64
val is_to_int8 : t -> boolReturn true if the symbol is a toint8
val is_to_int16 : t -> boolReturn true if the symbol is a toint16
val is_to_int32 : t -> boolReturn true if the symbol is a toint32
val is_to_int64 : t -> boolReturn true if the symbol is a toint64
val is_select : t -> boolReturn true if the symbol is select from array
val is_divisible : t -> boolReturn true if the symbol is the divisible function
val is_bool : t -> boolReturn true if the symbol is
`TRUEor`FALSE
val is_ite : t -> boolReturn true if the symbol is
`ITE
val bitvector_of_symbol : t -> Bitvector.tReturn the bitvector in a
`BV _symbol
val ubitvector_of_symbol : t -> Bitvector.tReturn the ubitvector in a
`UBV _symbol
val bool_of_symbol : t -> boolReturn
truefor the`TRUEsymbol andfalsefor the`FALSEsymbol
val is_uf : t -> boolReturn true if the symbol is uninterpreted
val uf_of_symbol : t -> UfSymbol.tReturn the uninterpreted symbol of a symbol
Pretty-printing
val pp_print_symbol : Stdlib.Format.formatter -> t -> unitPretty-print a symbol
val string_of_symbol : t -> stringReturn a string representation of a symbol
val string_of_symbol_node : symbol -> stringReturn a string representation of a symbol