Bases: builtins.object
The class representing a Boolector instance.
Create a bit vector addition.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an addition as follows (see Python Operator Overloading):
bvadd = a + b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a bit vector and.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an and as follows (see Python Operator Overloading):
bvand = a & b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a function application on function fun with arguments args (see Automatic Constant Conversion).
It is also possible to create a function application as follows (see Python Operator Overloading):
app = fun(arg_0, ..., arg_n)
Parameters: |
|
---|---|
Returns: | A function application on function fun with arguments args. |
Return type: |
Create a one-dimensional bit vector array variable of size 2**index_width with elements of bit width elem_width.
An array variable’s symbol is used as a simple means of identfication, either when printing a model via Print_model(), or generating file dumps via Dump(). A symbol must be unique but may be None in case that no symbol should be assigned.
Parameters: |
|
---|---|
Returns: | An array variable of size 2**index_width with elements of bit width elem_width. |
Return type: |
Note
In contrast to composite expressions, which are maintained uniquely w.r.t. to their kind, inputs (and consequently, bit width), array variables are not. Hence, each call to this function returns a fresh bit vector array variable.
Add a constraint.
Use this function to assert node n. Added constraints can not be removed.
Parameters: | n (BoolectorNode) – Bit vector expression with bit width 1. |
---|
Add an assumption.
Use this function to assume node n. You must enable Boolector’s incremental usage via Set_opt() before you can add assumptions. In contrast to assertions added via Assert(), assumptions are discarded after each call to Sat(). Assumptions and assertions are logicall combined via Boolean and. Assumption handling in Boolector is analogous to assumptions in MiniSAT.
Parameters: | n (BoolectorNode) – Bit vector expression with bit width 1. |
---|
Create bit vector sort of bit width width.
Currently, sorts in Boolector are used for uninterpreted functions, only.
See UF().
Parameters: | width (int) – Bit width. |
---|---|
Returns: | Bit vector sort of bit width width. |
Return type: | BoolectorSort |
Create Boolean sort.
Currently, sorts in Boolector are used for uninterpreted functions, only.
See UF().
Returns: | Sort of type Boolean. |
---|---|
Return type: | BoolectorSort |
Clone an instance of Boolector.
The resulting Boolector instance is an exact (but disjunct) copy of its parent instance. Consequently, in a clone and its parent, nodes with the same id correspond to each other. Use Match() to match corresponding nodes.
Returns: | The exact (but disjunct) copy of a Boolector instance. |
---|---|
Return type: | Boolector |
Create the concatenation of two bit vectors.
Parameters: |
|
---|---|
Returns: | A bit vector node with bitwidth bit width of a + bit width of b. |
Return type: |
Create an if-then-else.
If condition cond is true, then a is returned, else b is returned. a and b must be either both arrays or both bit vectors (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | Either a or b. |
Return type: |
Create a bit vector constant of value c and bit width width.
Parameters: |
|
---|---|
Returns: | A bit vector constant of value c and bit width width. |
Return type: |
Note
Parameter width is only required if c is an integer.
Create a bit vector expression that decrements bit vector n by one.
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | A bit vector with the same bit width as n, decremented by one. |
Return type: | BoolectorNode |
Dump input formula to output file.
Parameters: |
|
---|
Create a bit vector or array equality.
Parameters a and b are either bit vectors with the same bit width, or arrays of the same type (see Automatic Constant Conversion).
It is also possible to create an equality as follows (see Python Operator Overloading):
eq = a == b
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Determine if assumption n is a failed assumption.
Failed assumptions are those assumptions, that force an input formula to become unsatisfiable. Failed assumptions handling in Boolector is analogous to failed assumptions in MiniSAT.
See Assume().
Parameters: | n (BoolectorNode) – Bit vector expression with bit width 1. |
---|---|
Returns: | True if assumption is failed, and false otherwise. |
Return type: | int |
Create a function with function body body, parameterized over params.
This kind of node is similar to macros in the SMT-LIB v2 standard.
Parameters: |
|
---|---|
Returns: | A function over parameterized expression body. |
Return type: |
Note
As soon as a parameter is bound to a function, it can not be reused in other functions. Call a function via Apply().
Create function sort.
Currently, sorts in Boolector are used for uninterpreted functions, only.
See UF().
Parameters: |
|
---|---|
Returns: | Function sort, which maps domain to codomain. |
Return type: |
Get the Boolector option with name opt.
For a list of all available options, see Set_opt().
Parameters: | opt (str) – Option name. |
---|---|
Returns: | Option with name opt. |
Return type: | BoolectorOpt |
Create a Boolean equivalence.
Parameters a and b must have bit width one (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A Boolean equivalence a <=> b. |
Return type: |
Create a Boolean implication.
Parameters a and b must have bit width one (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A Boolean implication a => b. |
Return type: |
Create a bit vector expression that increments bit vector n by one.
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | A bit vector with the same bit width as n, incremented by one. |
Return type: | BoolectorNode |
Retrieve the node matching given node n by id.
This is intended to be used for handling expressions of a cloned instance (see Clone()).
E.g.,
btor = Boolector()
v = btor.Var(16, "x")
clone = btor.Clone()
v_cloned = clone.Match(v)
Parameters: | n (BoolectorNode) – Boolector node. |
---|---|
Returns: | The Boolector node that matches given node n by id. |
Return type: | BoolectorNode |
Note
Only nodes created before the Clone() call can be matched.
Create a bit vector multiplication.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create a multiplication as follows (see Python Operator Overloading):
bvmul = a * b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a bit vector nand.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a bit vector or array inequality.
Parameters a and b are either bit vectors with the same bit width, or arrays of the same type (see Automatic Constant Conversion).
It is also possible to create an inequality as follows (see Python Operator Overloading):
ne = a != b
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create the two’s complement of bit vector node n.
It is also possible to create the two’s complement as follows (see Python Operator Overloading):
bvneg = -n
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | The two’s complement of bit vector node n. |
Return type: | BoolectorNode |
Create a bit vector nor.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create the one’s complement of bit vector node n.
It is also possible to create the one’s complement as follows (see Python Operator Overloading):
bvnot = ~n
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | The one’s complement of bit vector node n. |
Return type: | BoolectorNode |
Get a BoolectorOptions iterator.
E.g.,
btor = Boolector()
options = btor.Options()
for o in options:
# do something
Returns: | An iterator to iterate over all Boolector options. |
---|---|
Return type: | BoolectorOptions |
Create a bit vector or.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an or as follows (see Python Operator Overloading):
bvor = a | b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a function parameter with bit width width.
This kind of node is used to create parameterized expressions, which in turn are used to create functions. Once a parameter is bound to a function, it cannot be reused in other functions.
Parameters: | |
---|---|
Returns: | A function parameter with bit width width. |
Return type: |
Parse input file.
Input file format may be either BTOR, SMT-LIB v1, or SMT-LIB v2, the file type is detected automatically.
E.g.,
btor = Boolector()
(result, status, error_msg) = btor.Parse("example.btor")
Parameters: | infile (str) – Input file name. |
---|---|
Returns: | A tuple (result, status, error_msg), where return value result indicates an error (PARSE_ERROR) if any, and else denotes the satisfiability result (SAT or UNSAT) in the incremental case, and UNKNOWN otherwise. Return value status indicates a (known) status (SAT or UNSAT) as specified in the input file. In case of an error, an explanation of that error is stored in error_msg. |
Print model to output file.
Supported model formats are Boolector’s own model format (“btor”) and SMT-LIB v2 (“smt2”).
This function prints the model for all inputs to output file outfile, e.g.:
btor.Print_model()
A possible model would be:
2 00000100 x
3 00010101 y
4[00] 01 A
which in this case prints the assignments of array variable A, and bit vector variables x and y. For bit vector variables, the first column indicates the id of an input, the second column its assignment, and the third column its name (symbol), if any. Array variable A, on the other hand, has id 4, is an array with index and element bit width of 2, and its value at index 0 is 1.
The corresponding model in SMT-LIB v2 format would be:
btor.Print_model(format="smt2")
(model
(define-fun x () (_ BitVec 8) #b00000100)
(define-fun y () (_ BitVec 8) #b00010101)
(define-fun y (
(y_x0 (_ BitVec 2)))
(ite (= y_x0 #b00) #b01
#00))
)
Parameters: |
|
---|
Create a read on array a at position b (see Automatic Constant Conversion).
It is also possible to create a read as follows (see Python Operator Overloading):
read = a[b]
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bitwidth as the elements of array a. |
Return type: |
Create an and reduction of node n.
All bits of node n are combined by an Boolean and.
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | The and reduction of node n. |
Return type: | BoolectorNode |
Create an or reduction of node n.
All bits of node n are combined by an Boolean or.
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | The or reduction of node n. |
Return type: | BoolectorNode |
Create an xor reduction of node n.
All bits of node n are combined by an Boolean xor.
Parameters: | n (BoolectorNode) – A bit vector node. |
---|---|
Returns: | The xor reduction of node n. |
Return type: | BoolectorNode |
Create a rotate left.
Given bit vector node b, the value it represents is the number of bits by which node a is rotated to the left (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a. |
Return type: |
Create a rotate right.
Given bit vector node b, the value it represents is the number of bits by which node a is rotated to the right (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a. |
Return type: |
Create a signed bit vector addition overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the addition of a and b overflows in case both operands are treated as signed. |
Return type: |
Solve an input formula.
An input formula is defined by constraints added via Assert(). You can guide the search for a solution to an input formula by making assumptions via Assume().
If you want to call this function multiple times, you must enable Boolector’s incremental usage mode via Set_opt(). Otherwise, this function may only be called once.
You can limit the search by the number of lemmas generated (lod_limit) and the number of conflicts encountered by the underlying SAT solver (sat_limit).
Parameters: | |
---|---|
Returns: | SAT if the input formula is satisfiable (under possibly given assumptions), UNSAT if it is unsatisfiable, and UNKNOWN if the instance could not be solved within given limits. |
Note
Assertions and assumptions are combined via Boolean and.
See also
Create a signed bit vector division.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Note
Signed division is expressed by means of unsigned division, where either node is normalized in case that its sign bit is 1. If the sign bits of a and b do not match, two’s complement is performed on the result of the previous unsigned division. Hence, the behavior in case of a division by zero depends on Udiv().
Create a signed bit vector division overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion). An overflow can occur if a represents INT_MIN and b represents -1.
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the division of a and b overflows in case both operands are treated as signed. |
Return type: |
Note
Unsigned bit vector division does not overflow.
Set option.
List of available options:
model_gen
incremental
incremental_all
incremental_in_depth
incremental_look_ahead
incremental_interval
input_format
output_number_format
output_format
rewrite_level
rewrite_level_pbr
beta_reduce_all
Enable (value: 1) or disable (value: 0) the eager elimination of lambda expressions via beta reduction.
probe_beta_reduce_all
Enable (value: 1) or disable (value: 0) probing of beta_reduce_all until a given lemmas on demand (pbr_lod_limit) or SAT conflicts limit (pbra_sat_limit).
pbra_lod_limit
Set lemmas on demand limit for probe_beta_reduce_all.
pbra_sat_limit
Set SAT conflicts limit for probe_beta_reduce_all.
pbra_ops_factor
Set factor by which the size of the beta reduced formula may be greater than the original formula (for probe_beta_reduce_all).
dual_prop
Enable (value: 1) or disable (value: 0) dual propagation optimization.
just
Enable (value: 1) or disable (value: 0) justification optimization.
ucopt
Enable (value: 1) or disable (value: 0) unconstrained optimization.
lazy_synthesize
Enable (value: 1) or disable (value: 0) lazy synthesis of bit vector expressions.
eliminate_slices
Enable (value: 1) or disable (value: 0) slice elimination on bit vector variables.
pretty_print
Enable (value: 1) or disable (value: 0) pretty printing when dumping.
verbosity
Set the level of verbosity.
Parameters: |
---|
Set the SAT solver to use.
E.g.,
btor = Boolector()
btor.Set_sat_solver("MiniSAT")
Option clone enables non-incremental SAT solver usage (for every SAT call) by means of internal SAT solver cloning. Use this option with caution (might have a positive or negative impact on overall performance).
Parameters: | |
---|---|
Returns: | True if setting the SAT solver was successful and False otherwise. |
Return type: | bool |
Note
Parameters optstr and clone are currently only supported by Lingeling.
Set a termination callback function.
Use this function to force Boolector to prematurely terminate if callback function fun returns True. Arguments args to fun may be passed as a single Python object (in case that fun takes only one argument), a tuple, or a list of arguments.
E.g.,
import time
def fun1 (arg):
# timeout after 1 sec.
return time.time() - arg > 1.0
def fun2 (arg0, arg1):
# do something and return True/False
...
btor = Boolector()
btor.Set_term(fun1, time.time())
btor.Set_term(fun1, (time.time(),))
btor.Set_term(fun1, [time.time()])
btor.Set_term(fun2, (arg0, arg1))
btor.Set_term(run2, [arg0, arg1])
Parameters: |
|
---|
Create signed extension.
Bit vector node n is padded with width bits, where the padded value depends on the value of the most significant bit of node n.
Parameters: |
|
---|---|
Returns: | A bit vector extended by width bits. |
Return type: |
Create a signed greater than.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create a signed greater than or equal.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Simplify current input formula.
Returns: | SAT if the input formula was simplified to true, UNSAT if it was simplified to false, and UNKNOWN, otherwise. |
---|
Note
Each call to Sat() simplifies the input formula as a preprocessing step.
Create a bit vector slice of node n from index upper to index lower.
It is also possible to use Python slices on bit vectors as follows:
n[upper:lower] # creates slice with upper limit 'upper' and lower limit 'lower'
n[upper:] # creates slice with upper limit 'upper' and lower limit 0
n[:lower] # creates slice with upper limit 'n.width - 1' and lower limit 'lower'
n[:] # creates copy of node 'n'
Parameters: |
|
---|---|
Returns: | A Bit vector with bit width upper - lower + 1. |
Return type: |
Create a logical shift left.
Given bit vector node b, the value it represents is the number of zeroes shifted into node a from the right (see Automatic Constant Conversion).
It is also possible to create a logical shift left as follows (see Python Operator Overloading):
bvshl = a << b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a. |
Return type: |
Create a signed less than.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create a signed less than or equal.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create a signed remainder where its sign matches the sign of the divisor.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
If b is zero, the result depends on Urem().
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a signed bit vector multiplication overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the multiplication of a and b overflows in case both operands are treated as signed. |
Return type: |
Create an arithmetic shift right.
Analogously to Srl(), but whether zeroes or ones are shifted in depends on the most significant bit of node a (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a. |
Return type: |
Create a signed remainder.
Parameters a and b must have the same bit width (see Automatic Constant Conversion). If b is 0, the result of the unsigned remainder is a. If b is 0, the result of the unsigned remainder is a.
Analogously to Sdiv(), the signed remainder is expressed by means of the unsigned remainder, where either node is normalized in case that its sign bit is 1. Hence, in case that b is zero, the result depends on Urem().
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a logical shift right.
Given bit vector node b, the value it represents is the number of zeroes shifted into node a from the left (see Automatic Constant Conversion).
It is also possible to create a logical shift right as follows (see Python Operator Overloading):
bvshr = a >> b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a. |
Return type: |
Create a signed bit vector subtraction overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the subtraction of a and b overflows in case both operands are treated as signed. |
Return type: |
Create a bit vector subtraction.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create a subtraction as follows (see Python Operator Overloading):
bvsub = a - b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Determine if Boolector has been terminated (and/or terminate Boolector) via the previously configured termination callback function.
See Set_term().
:return True if termination condition is fulfilled, else False. :rtype: bool
Create an uninterpreted function with sort sort and symbol symbol.
An uninterpreted function’s symbol is used as a simple means of identification, either when printing a model via Print_model(), or generating file dumps via Dump(). A symbol must be unique but may be None in case that no symbol should be assigned.
Parameters: |
|
---|---|
Returns: | A function over parameterized expression body. |
Return type: |
Note
In contrast to composite expressions, which are maintained uniquely w.r.t. to their kind, inputs (and consequently, bit width), uninterpreted functions are not. Hence, each call to this function returns a fresh uninterpreted function.
Create an unsigned bit vector addition overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the addition of a and b overflows in case both operands are treated as unsigned. |
Return type: |
Create an unsigned bit vector division.
Parameters a and b must have the same bit width (see Automatic Constant Conversion). If a is 0, the division’s result is -1.
It is also possible to create an unsigned division as follows (see Python Operator Overloading):
bvudiv = a / b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Note
This behavior (division by zero returns -1) does not exactly comply with the SMT-LIB v1 and v2 standards, where division by zero is handled as an uninterpreted function. Our semantics are motivated by real circuits where division by zero cannot be uninterpreted and consequently returns a result.
Create unsigned extension.
Bit vector node n is padded with width zeroes.
Parameters: |
|
---|---|
Returns: | A bit vector extended by width zeroes. |
Return type: |
Create an unsigned greater than.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an unsigned greater than as follows (see Python Operator Overloading):
ugt = a > b
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create an unsigned greater than or equal.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an unsigned greater than or equal as follows (see Python Operator Overloading):
ugte = a >= b
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create an unsigned less than.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an unsigned less than as follows (see Python Operator Overloading):
lt = a < b
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create an unsigned less than or equal.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an unsigned less than or equal as follows (see Python Operator Overloading):
lte = a <= b
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one. |
Return type: |
Create an unsigned bit vector multiplication overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the multiplication of a and b overflows in case both operands are treated as unsigned. |
Return type: |
Create an unsigned remainder.
Parameters a and b must have the same bit width (see Automatic Constant Conversion). If b is 0, the result of the unsigned remainder is a.
It is also possible to create an unsigned remainder as follows (see Python Operator Overloading):
bvurem = a % b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Note
As in Udiv(), the behavior if b is 0 does not exactly comply to the SMT-LIB v1 and v2 standards, where the result ist handled as uninterpreted function. Our semantics are motivated by real circuits, where result can not be uninterpreted.
Create an unsigned bit vector subtraction overflow detection.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with bit width one, which indicates if the subtraction of a and b overflows in case both operands are treated as unsigned. |
Return type: |
Create a bit vector variable with bit width width.
A variable’s symbol is used as a simple means of identification, either when printing a model via Print_model(), or generating file dumps via Dump(). A symbol must be unique but may be None in case that no symbol should be assigned.
Parameters: | |
---|---|
Returns: | A bit vector variable with bit width width. |
Return type: |
Note
In contrast to composite expressions, which are maintained uniquely w.r.t. to their kind, inputs (and consequently, bit width), variables are not. Hence, each call to this function returns a fresh bit vector variable.
Create a write on array array at position index with value value (see Automatic Constant Conversion).
The array is updated at exactly one position, all other elements remain unchanged. The bit width of index must be the same as the bit width of the indices of array. The bit width of value must be the same as the bit width of the elements of array.
Parameters: |
|
---|---|
Returns: | An array where the value at index has been updated with value. |
Return type: |
Create a bit vector xnor.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Create a bit vector xor.
Parameters a and b must have the same bit width (see Automatic Constant Conversion).
It is also possible to create an xor as follows (see Python Operator Overloading):
bvxor = a ^ b
Parameters: |
|
---|---|
Returns: | A bit vector node with the same bit width as a and b. |
Return type: |
Bases: boolector.BoolectorNode
The class representing a Boolector array node.
The bit with of the Boolector array node indices.
Bases: boolector.BoolectorNode
The class representing a Boolector bit vector node.
Bases: boolector.BoolectorBVNode
The class representing Boolector constant nodes.
The bit string of a Boolector constant node.
Bases: builtins.Exception
The class representing a Boolector exception.
Bases: boolector.BoolectorNode
The class representing a Boolector function node.
The arity of a Boolector function node.
Bases: builtins.object
The class representing a Boolector node.
Dump node to output file.
Parameters: |
|
---|
The assignment of a Boolector node.
May be queried only after a preceding call to Sat() returned SAT.
If the queried node is a bit vector, its assignment is represented as string. If it is an array, its assignment is represented as a list of tuples (index, value). If it is a function, its assignment is represented as a list of tuples (arg_0, ..., arg_n, value).
The symbol of a Boolector node.
A node’s symbol is used as a simple means of identfication, either when printing a model via Print_model(), or generating file dumps via Dump().
The bit width of a Boolector node.
If the node is an array, this indicates the bit width of the array elements. If the node is a function, this indicates the bit with of the function’s return value.
Bases: builtins.object
The class representing a Boolector option.
The description of a Boolector option.
The default value of a Boolector option.
The long name of a Boolector option.
The maximum value of a Boolector option.
The minimum value of a Boolector option.
The short name of a Boolector option.
The current value of a Boolector option.
Bases: builtins.object
The class representing a Boolector option iterator (see Options()).
Bases: builtins.object
The class representing a Boolector sort.