Preprocessor constant representing status parse error.
See also
Preprocessor constant representing status satisfiable.
Preprocessor constant representing status unknown.
Preprocessor constant representing status unsatisfiable.
Create bit vector addition.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector addition with the same bit width as the operands. |
Create a bit vector and.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Create a function application on function n_fun with arguments arg_nodes.
Parameters: |
|
---|---|
Returns: | Function application on function n_fun with arguments arg_nodes. |
See also
Create a one-dimensional bit vector array of size 2^index_width with elements of bit width elem_width.
An array variable’s symbol is used as a simple means of identification, either when printing a model via boolector_print_model(), or generating file dumps via boolector_dump_btor(), boolector_dump_smt1(), and boolector_dump_smt2(). A symbol must be unique but may be NULL in case that no symbol should be assigned.
Parameters: |
|
---|---|
Returns: | Bit vector array of size 2^index_width with elements of bit width elem_width, and symbol symbol. |
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 boolector_array() with the same arguments will return a fresh array variable.
Generate a model for an array expression.
If boolector_sat() has returned BOOLECTOR_SAT and model generation has been enabled. The function creates and stores the array of indices into indices and the array of corresponding values into values. The number size of indices resp. values is stored into size. The array model simply inspects the set of reads rho, which is associated with each array expression. See our publication Lemmas on Demand for Lambdas for details. At indices that do not occur in the model, it is assumed that the array stores a globally unique default value, for example 0. The bit vector assignments to the indices and values have to be freed by boolector_free_bv_assignment(). Furthermore, the user has to free the array of indices and the array of values, respectively of size size.
Parameters: |
|
---|
See also
boolector_set_opt() for enabling model generation.
Add a constraint.
Use this function to assert node. Added constraints can not be deleted anymore. After node has been asserted, it can be safely released by boolector_release().
Parameters: |
|
---|
Add an assumption.
Use this function to assume node. You must enable Boolector’s incremental usage via boolector_set_opt() before you can add assumptions. In contrast to assertions added via boolector_assert(), assumptions are discarded after each call to boolector_sat(). Assumptions and assertions are logically combined via Boolean and. Assumption handling in Boolector is analogous to assumptions in MiniSAT.
Parameters: |
|
---|
Create bit vector sort of bit width width.
Parameters: |
|
---|---|
Returns: | Bit vector sort of bit width width. |
Note
Currently, sorts in Boolector are used for uninterpreted functions, only.
See also
Create Boolean sort.
Parameters: |
|
---|---|
Returns: | Sort of type Boolean. |
See also
Generate an assignment string for bit vector expression if boolector_sat() has returned BOOLECTOR_SAT and model generation has been enabled.
The expression can be an arbitrary bit vector expression which occurs in an assertion or current assumption. The assignment string has to be freed by boolector_free_bv_assignment().
Parameters: |
|
---|---|
Returns: | String representing a satisfying assignment to bit vector variables and a consistent assignment for arbitrary bit vector expressions. Each character of the string can be 0, 1 or x. The latter represents that the corresponding bit can be assigned arbitrarily. |
See also
boolector_set_opt() for enabling model generation.
Clone an instance of Boolector.
The resulting Boolector instance is an exact copy of given Boolector instance btor. Consequently, in a clone and its parent, nodes with the same id correspond to each other. Use boolector_match_node() to match corresponding nodes.
Parameters: |
|
---|---|
Returns: | The exact (but disjunct) copy of the Boolector instance btor. |
Note
If Lingeling is used as SAT solver, Boolector can be cloned at any time, since Lingeling also supports cloning. However, if you use boolector_clone() with MiniSAT or PicoSAT (no cloning support), Boolector can only be cloned prior to the first boolector_sat() call.
Create the concatenation of two bit vectors.
Parameters: |
|
---|---|
Returns: | Bit vector with the bit width bit width of n0 + bit width of n1. |
Create an if-then-else.
If condition n_cond is true, then n_then is returned, else n_else is returned. Nodes n_then and n_else must be either both arrays or both bit vectors.
Parameters: |
|
---|---|
Returns: | Either n_then or n_else. |
Create bit vector constant representing the bit vector bits.
Parameters: |
|
---|---|
Returns: | Bit vector constant with bit width strlen (bits). |
Copy expression (increments reference counter).
Parameters: |
|
---|---|
Returns: | Node node with reference counter incremented. |
Create bit vector expression that decrements bit vector node by one.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as node decremented by one. |
Delete a boolector instance and free its resources.
Parameters: |
|
---|
Note
Expressions that have not been released properly will not be deleted from memory. Use boolector_get_refs() to debug reference counting. You can also set option auto_cleanup via boolector_set_opt() in order to do the cleanup automatically.
Dump formula to file in BTOR format.
Parameters: |
|
---|
Dump formula to file in BTOR 2.0 format.
Parameters: |
|
---|
Recursively dump node to file in BTOR format.
Parameters: |
|
---|
Dump formula to file in SMT-LIB v1 format.
Parameters: |
|
---|
Recursively dump node to file in SMT-LIB v1 format.
Parameters: |
|
---|
Dumps formula to file in SMT-LIB v2 format.
Parameters: |
|
---|
Recursively dump node to file in SMT-LIB v2 format.
Parameters: |
|
---|
Create bit vector or array equality.
Both operands are either bit vectors with the same bit width or arrays of the same type.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Determine if assumption node 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.
Parameters: |
|
---|---|
Returns: | 1 if assumption is failed, and 0 otherwise. |
See also
Create bit vector constant zero with bit width one.
Parameters: |
|
---|---|
Returns: | Bit vector constant zero with bit width one. |
Get the name of the first option in Boolector’s option list.
Given a Boolector instance btor, you can use this in combination with boolector_next_opt() in order to iterate over Boolector options as follows:
for (s = boolector_first_opt (btor); s; s = boolector_next_opt (btor, s)) {...}
Parameters: |
|
---|---|
Returns: | Name of the first option in Boolector’s option list. |
Free an assignment string for arrays of bit vectors.
Parameters: |
|
---|
See also
Free an assignment string for bit vectors.
Parameters: |
|
---|
See also
Free assignment strings for uninterpreted functions.
Parameters: |
|
---|
See also
Create a function with body node parameterized over parameters param_nodes.
This kind of node is similar to macros in the SMT-LIB standard 2.0. Note that as soon as a parameter is bound to a function, it can not be reused in other functions. Call a function via boolector_apply().
Parameters: |
|
---|---|
Returns: | Function over parameterized expression node. |
See also
Create function sort.
Parameters: |
|
---|---|
Returns: | Function sort which maps given domain to given codomain. |
Note
Currently, sorts in Boolector are used for uninterpreted functions, only.
See also
Check if sorts of given arguments matches the function signature.
Parameters: |
|
---|---|
Returns: | -1 if all sorts are correct, otherwise it returns the position of the incorrect argument. |
Get the bit vector of a constant node as a bit string.
Parameters: |
|
---|---|
Returns: | String representing the bits of node. |
Return the Boolector instance to which node belongs.
Parameters: |
|
---|---|
Returns: | Boolector instance. |
Get the arity of function node.
Parameters: |
|
---|---|
Returns: | Arity of node. |
Get the id of a given node.
Parameters: |
|
---|---|
Returns: | Id of node. |
Get the bit width of indices of n_array.
Parameters: |
|
---|---|
Returns: | Bit width of indices of n_array |
Get the description of an option.
Parameters: |
|
---|---|
Returns: | Description of name. |
Get the default value of an option.
Parameters: |
|
---|---|
Returns: | Default value of name. |
Get the max value of an option.
Parameters: |
|
---|---|
Returns: | Max value of name. |
Get the min value of an option.
Parameters: |
|
---|---|
Returns: | Min value of name. |
Get the short name of an option.
Parameters: |
|
---|---|
Returns: | Short name of name. |
Get the current value of an option.
Parameters: |
|
---|---|
Returns: | Current value of name. |
Get the number of external references to the boolector library.
Internally, Boolector manages an expression DAG with reference counting. Use boolector_release() to properly release an expression. Before you finally call boolector_delete(), boolector_get_refs() should return 0.
Parameters: |
|
---|---|
Returns: | Number of external references owned by the user. |
Get the symbol of an expression.
Parameters: |
|
---|---|
Returns: | Symbol of expression. |
Return API trace file.
Parameters: |
|
---|---|
Returns: | API trace output file. |
Get the bit width of an expression.
If the expression is an array, it returns the bit width of the array elements. If the expression is a function, it returns the bit width of the function’s return value.
Parameters: |
|
---|---|
Returns: | Bit width of node. |
Create Boolean equivalence.
The parameters n0 and n1 must have bit width one.
Parameters: |
|
---|---|
Returns: | Equivalence n0 <=> n1 with bit width one. |
Create boolean implication.
The parameters n0 and n1 must have bit width one.
Parameters: |
|
---|---|
Returns: | Implication n0 => n1 with bit width one. |
Create bit vector expression that increments bit vector node by one.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as node incremented by one. |
Create bit vector constant representing the signed integer i with bit width width.
The constant is obtained by either truncating bits or by signed extension (padding with ones).
Parameters: |
|
---|---|
Returns: | Bit vector constant with bit width width. |
Determine if given node is an array node.
Parameters: |
|
---|---|
Returns: | True if node is an array, and false otherwise. |
Determine if expression is an array variable.
Parameters: |
|
---|---|
Returns: | True if node is an array variable, and false otherwise. |
Determine if given parameter node is bound by a function.
Parameters: |
|
---|---|
Returns: | True if node is bound, and false otherwise. |
Determine if given node is a constant node.
Parameters: |
|
---|---|
Returns: | True if node is a constant, and false otherwise. |
Determine if n0 and n1 have the same sort or not.
Parameters: |
|
---|---|
Returns: | True if n0 and n1 have the same sort, and false otherwise. |
Determine if given node is a function node.
Parameters: |
|
---|---|
Returns: | True if node is a function, and false otherwise. |
Determine if given node is a parameter node.
Parameters: |
|
---|---|
Returns: | True if node is a parameter, and false otherwise. |
Determine if given node is a bit vector variable.
Parameters: |
|
---|---|
Returns: | True if node is a bit vector variable, and false otherwise. |
Solve an input formula and limit the search by the number of lemmas generated and the number of conflicts encountered by the underlying SAT solver.
An input formula is defined by constraints added via boolector_assert(). You can guide the search for a solution to an input formula by making assumptions via boolector_assume().
If you want to call this function multiple times then you must enable Boolector’s incremental usage mode via boolector_set_opt() before. Otherwise, this function can only be called once.
Parameters: |
|
---|---|
Returns: | BOOLECTOR_SAT if the input formula is satisfiable (under possibly given assumptions), BOOLECTOR_UNSAT if the instance is unsatisfiable, and BOOLECTOR_UNKNOWN if the instance could not be solved within given limits. |
Retrieve the node belonging to Boolector instance btor that matches given BoolectorNode node by id. This is intended to be used for handling expressions of a cloned instance (boolector_clone()).
Parameters: |
|
---|---|
Returns: | The Boolector node that matches given node in Boolector instance btor by id. |
Note
Matching a node against another increases the reference count of the returned match, which must therefore be released appropriately (boolector_release()). Only nodes created before the boolector_clone() call can be matched.
Retrieve the node belonging to Boolector instance btor that matches given id.
Parameters: |
|
---|---|
Returns: | The Boolector node that matches given node in Boolector instance btor by id. |
Note
Matching a node against another increases the reference count of the returned match, which must therefore be released appropriately (boolector_release()).
Create a bitvector multiplication.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector multiplication with the same bit width as the operands. |
Create a bit vector nand.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Create bit vector or array inequality.
Both operands are either bit vectors with the same bit width or arrays of the same type.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create the two’s complement of bit vector node.
Parameters: |
|
---|---|
Returns: | Bit vector representing the two’s complement of node with the same bit width as node. |
Create a new instance of Boolector.
Returns: | New Boolector instance. |
---|
Given current option name, get the name of the next option in Boolector’s option list.
Given a Boolector instance btor, you can use this in combination with boolector_first_opt() in order to iterate over Boolector options as follows:
for (s = boolector_first_opt (btor); s; s = boolector_next_opt (btor, s)) {...}
Parameters: |
|
---|---|
Returns: | Name of the next option in Boolector’s option list, or 0 if no such next option does exist. |
Create a bit vector nor.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Create the one’s complement of bit vector node.
Parameters: |
|
---|---|
Returns: | Bit vector representing the one’s complement of node with the same bit width as node. |
Create bit vector constant one with bit width width.
Parameters: |
|
---|---|
Returns: | Bit vector constant one with bit width width. |
Create bit vector constant with bit width width, where each bit is set to one.
Parameters: |
|
---|---|
Returns: | Bit vector constant -1 with bit width width. |
Create a bit vector or.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Create function parameter.
This kind of node is used to create parameterized expressions, which are used to create functions. Once a parameter is bound to a function, it cannot be re-used in other functions.
Parameters: |
|
---|---|
Returns: | Parameter expression with bit width width and symbol symbol. |
See also
Parse input file.
Input file format may be either BTOR, SMT-LIB v1, or SMT-LIB v2, the file type is detected automatically. If the parser encounters an error, an explanation of that error is stored in error_msg. If the input file specifies a (known) status of the input formula (either sat or unsat), that status is stored in status. All output (from commands like e.g. ‘check-sat’ in SMT-LIB v2) is printed to outfile.
Parameters: |
|
---|---|
Returns: | In the incremental case (right now SMT-LIB v1 only) the function returns either BOOLECTOR_SAT, BOOLECTOR_UNSAT or BOOLECTOR_UNKNOWN, otherwise it always returns BOOLECTOR_UNKNOWN. If a parse error occurs the function returns BOOLECTOR_PARSE_ERROR. |
Parse input file in BTOR format.
See boolector_parse().
Parameters: |
|
---|---|
Returns: | BOOLECTOR_UNKNOWN or BOOLECTOR_PARSE_ERROR if a parse error occurred. |
Parse input file in SMT-LIB v1 format.
See boolector_parse().
Parameters: |
|
---|---|
Returns: | In the incremental case (right now SMT-LIB v1 only) the function returns either BOOLECTOR_SAT, BOOLECTOR_UNSAT or BOOLECTOR_UNKNOWN, otherwise it always returns BOOLECTOR_UNKNOWN. If a parse error occurs the function returns BOOLECTOR_PARSE_ERROR. |
Parse input file in SMT-LIB v2 format. See boolector_parse().
Parameters: |
|
---|---|
Returns: | BOOLECTOR_UNKNOWN or BOOLECTOR_PARSE_ERROR if a parse error occurred. |
Print model to output file. This function prints the model for all inputs to the output file file. Supported output formats for the model to be printed are:
btor
Use boolector’s own output format for printing models.
:c:func:`boolector_print_model` (btor, "btor", stdout);
A possible model would be:
2 00000100 x
3 00010101 y
4[00] 01 A
where the first column indicates the id of an input, the second column its assignment, and the third column its name (or symbol), if any. Note that in case that an input is an uninterpreted function or an array variable, values in square brackets indicate parameter resp. index values.
smt2
Use SMT-LIB v2 format for printing models.
:c:func:`boolector_print_model` (btor, "smt2", stdout);
A possible model would be:
(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: |
|
---|
Print statistics.
Parameters: |
|
---|
Create a read on array n_array at position n_index.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the elements of n_array. |
Create and reduction of node node.
All bits of node are combined by a Boolean and.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create or reduction of node node.
All bits of node node are combined by a Boolean or.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create xor reduction of node node.
All bits of node are combined by a Boolean xor.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Release expression (decrements reference counter).
Parameters: |
|
---|
Release all expressions and sorts.
Parameters: |
|
---|
See also
Release sort (decrements reference counter).
Parameters: |
|
---|
Reset statistics (time statistics not included).
Parameters: |
|
---|
Reset time statistics.
Parameters: |
|
---|
Create a rotate left.
Given bit vector node n1, the value it represents is the number of bits by which node n0 is rotated to the left.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as n0. |
Create a rotate right.
Given bit vector node n1, the value it represents is the number of bits by which node n0 is rotated to the right.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as n0. |
Create a signed bit vector addition overflow detection.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the addition of n0 and n1 overflows in case both operands are treated signed. |
Solve an input formula.
An input formula is defined by constraints added via boolector_assert(). You can guide the search for a solution to an input formula by making assumptions via boolector_assume(). Note that assertions and assumptions are combined by boolean and.
If you want to call this function multiple times, you must enable Boolector’s incremental usage mode via boolector_set_opt() before. Otherwise, this function may only be called once.
Parameters: |
|
---|---|
Returns: | BOOLECTOR_SAT if the instance is satisfiable and BOOLECTOR_UNSAT if the instance is unsatisfiable. |
Create signed division.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
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 boolector_udiv().
Create a signed bit vector division overflow detection.
The parameters n0 and n1 must have the same bit width. An overflow can happen if n0 represents INT_MIN and n1 represents -1.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the division of n0 and n1 overflows in case both operands are treated signed. |
Note
Unsigned division cannot overflow.
Set a verbosity message prefix.
Parameters: |
|
---|
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.
Currently, we support Lingeling, PicoSAT, and MiniSAT as string value of solver (case insensitive). This is however only possible if the corresponding solvers were enabled at compile time. Call this function after boolector_new().
Parameters: |
|
---|---|
Returns: | Non-zero value if setting the SAT solver was successful. |
Use Lingeling as SAT solver.
This function is only available if Lingeling was enabled at compile time. Call this function after boolector_new().
Parameters: |
|
---|---|
Returns: | Non-zero value if setting the SAT solver was successful. |
Use MiniSAT as SAT solver.
This function is only available if MiniSAT was enabled at compile time. Call this function after boolector_new().
Parameters: |
|
---|---|
Returns: | Non-zero value if setting the SAT solver was successful. |
Use PicoSAT as SAT solver.
This function is only available if PicoSAT was enabled at compile time. Call this function after boolector_new().
Parameters: |
|
---|---|
Returns: | Non-zero value if setting the SAT solver was successful. |
Set the symbol of an expression.
Expression must be either an array or bit vector variable, a parameter, or an uninterpreted function).
Parameters: |
|
---|
Set a termination callback.
param btor: Boolector instance. param fun: The termination callback function. param state: The argument to the termination callback function.
See also
Set the output API trace file and enable API tracing.
Parameters: |
|
---|
Note
The API trace output file can also be set via the environment variable BTORAPITRACE=<filename>.
Create signed extension.
The bit vector node is padded with width bits where the value depends on the value of the most significant bit of node n.
Parameters: |
|
---|---|
Returns: | A bit vector extended by width bits. |
Create a signed greater than.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create a signed greater than or equal.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Simplify current input formula.
Parameters: |
|
---|---|
Returns: | BOOLECTOR_SAT if the input formula was simplified to true, BOOLECTOR_UNSAT if it was simplified to false, and BOOLECTOR_UNKNOWN otherwise. |
Note
Each call to boolector_sat() simplifies the input formula as a preprocessing step.
Create a bit vector slice of node from index upper to index lower.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width upper - lower + 1. |
Create a logical shift left.
Given node n1, the value it represents is the number of zeroes shifted into node n0 from the right.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as n0. |
Create a signed less than.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create a signed less than or equal.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create a, signed remainder where its sign matches the sign of the divisor.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Note
If n1 is zero, the behavior of this function depends on boolector_urem().
Create signed multiplication overflow detection.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the multiplication of n0 and n1 overflows in case both operands are treated signed. |
Create an arithmetic shift right.
Analogously to boolector_srl(), but whether zeroes or ones are shifted in depends on the most significant bit of n0.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as n0. |
Create a signed remainder.
The parameters n0 and n1 must have the same bit width. If n1 is zero, then the result is n0.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Note
Analogously to boolector_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 n1 is zero, the result depends on boolector_urem().
Create a logical shift right.
Given node n1, the value it represents is the number of zeroes shifted into node n0 from the left.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as n0 and n1. |
Create a signed bit vector subtraction overflow detection.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the subtraction of n0 and n1 overflows in case both operands are treated signed. |
Create a bit vector subtraction.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Determine if a given Boolector instance has been terminated (and or terminate Boolector) via the previously configured termination callback function.
Parameters: |
|
---|---|
Returns: | True if Boolector is terminated, and false otherwise. |
See also
Create constant true. This is represented by the bit vector constant one with bit width one.
Parameters: |
|
---|---|
Returns: | Bit vector constant one with bit width one. |
Create an unsigned bit vector addition overflow detection.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the addition of n0 and n1 overflows in case both operands are treated unsigned. |
Create unsigned division.
The parameters n0 and n1 must have the same bit width. If n1 is zero, then the result is -1.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Note
The behavior that division by zero returns -1 does not exactly comply with the SMT-LIB standard 1.2 and 2.0 where division by zero is handled as uninterpreted function. Our semantics are motivated by real circuits where division by zero cannot be uninterpreted and of course returns a result.
Create unsigned extension.
The bit vector node is padded with width * zeroes.
Parameters: |
|
---|---|
Returns: | A bit vector extended by width zeroes. |
Create an uninterpreted function with sort sort and symbol symbol. btor Boolector instance.
An uninterpreted function’s symbol is used as a simple means of identification, either when printing a model via boolector_print_model(), or generating file dumps via boolector_dump_btor(), boolector_dump_smt1(), and boolector_dump_smt2(). A symbol must be unique but may be NULL in case that no symbol should be assigned.
Parameters: |
|
---|---|
Returns: | Uninterpreted function of sort sort and symbol symbol. |
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.
See also
Generate a model for an uninterpreted function. The function creates and stores the assignments of the function’s arguments to array args and the function’s return values to array values. Arrays args and values represent assignment pairs of arguments and values, i.e., instantiating a function with args[i] yields value values[i]. For functions with arity > 1 args[i] contains a space separated string of argument assignments, where the order of the assignment strings corresponds to the order of the function’s arguments.
Parameters: |
|
---|
Note
This function can only be called if boolector_sat() returned BOOLECTOR_SAT and model generation was enabled.
See also
boolector_set_opt() for enabling model generation
Create an unsigned greater than.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create an unsigned greater than or equal.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create an unsigned less than.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create an unsigned less than or equal.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one. |
Create an unsigned bit vector multiplication overflow detection.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the multiplication of n0 and n1 overflows in case both operands are treated unsigned. |
Create bit vector constant representing the unsigned integer u with bit width width.
The constant is obtained by either truncating bits or by unsigned extension (padding with zeroes).
Parameters: |
|
---|---|
Returns: | Bit vector constant with bit width width. |
Create an unsigned remainder.
The parameters n0 and n1 must have the same bit width. If n1 is zero, then the result is n0.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Note
As in boolector_udiv() the behavior if n1 is zero, does not exactly comply with the SMT-LIB standard 1.2 and 2.0 where the result is handled as uninterpreted function. Our semantics are motivated by real circuits, where results can not be uninterpreted.
Create an unsigned bit vector subtraction overflow detection.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with bit width one, which indicates if the subtraction of n0 and n1 overflows in case both operands are treated unsigned. |
Create a bit vector variable with bit width width and symbol symbol.
A variable’s symbol is used as a simple means of identification, either when printing a model via boolector_print_model(), or generating file dumps via boolector_dump_btor(), boolector_dump_smt1(), and boolector_dump_smt2(). A symbol must be unique but may be NULL in case that no symbol should be assigned.
Parameters: |
|
---|---|
Returns: | Bit vector variable with bit width width and symbol symbol. |
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 n_array at position n_index with value n_value.
The array is updated at exactly one position, all other elements remain unchanged. The bit width of n_index must be the same as the bit width of the indices of n_array. The bit width of n_value must be the same as the bit width of the elements of n_array.
Parameters: |
|
---|---|
Returns: | An array where the value at index n_index has been updated with n_value. |
Create a bit vector xnor.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Create a bit vector xor.
The parameters n0 and n1 must have the same bit width.
Parameters: |
|
---|---|
Returns: | Bit vector with the same bit width as the operands. |
Create bit vector constant zero with bit width width.
Parameters: |
|
---|---|
Returns: | Bit vector constant zero with bit width width. |
Deprecated since version 2.0.
Enable incremental usage.
Parameters: |
|
---|
Note
This function is deprecated, use boolector_set_opt() with incremental=1 instead.
See also
Deprecated since version 2.0.
Enable model generation.
Parameters: |
|
---|
Note
This function is deprecated, use boolector_set_opt() with model_gen=1 instead.
See also
Deprecated since version 2.0.
Enable model generation for all reads.
Parameters: |
|
---|
Note
This function is deprecated, use boolector_set_opt() with model_gen=2 instead.
See also
Deprecated since version 2.0.
Get the symbol of a variable.
Parameters: |
|
---|---|
Returns: | Symbol of variable. |
Note
This function is deprecated, use boolector_get_symbol() instead.
See also
Deprecated since version 2.0.
Set log level.
Parameters: |
|
---|
Note
This function is deprecated, use boolector_set_opt() with loglevel=<val> instead.
Deprecated since version 2.0.
Set the rewrite level of the rewriting engine.
Parameters: |
|
---|
Note
This function is deprecated use boolector_set_opt() with rewrite_level=<val> instead.
See also
Deprecated since version 2.0.
Set level of verbosity.
Parameters: |
|
---|
Note
This function is deprecated, use boolector_set_opt() with verbosity=<val> instead.
See also