Page
Library
Module
Module type
Parameter
Class
Class type
Source
Bitwuzla_cSourceThis is a straight one to one binding of the Bitwuzla C API.
The Bitwuzla solver.
create t create a new Bitwuzla instance.
The returned instance can be deleted earlier via delete.
delete t delete a Bitwuzla instance.
The given instance must have been created via create.
reset t reset a Bitwuzla instance.
This deletes the given instance and creates a new instance in place. The given instance must have been created via create.
All sorts and terms associated with the given instance are released and thus invalidated.
terminate t if termination callback function has been configured via set_termination_callback, call this termination function.
A termination callback cookie
set_termination_callback t f a configure a termination callback function.
The state a of the callback can be retrieved via get_termination_callback_state.
get_termination_callback_state c get the state of the termination callback function.
The returned object representing the state of the callback corresponds to the state a configured as argument to the callback function via set_termination_callback.
type opt = | EngineConfigure the solver engine.
Values:
"aigprop": The propagation-based local search QF_BV engine that operates on the bit-blasted formula (the AIG circuit layer)."fun" [default]: The default engine for all combinations of QF_AUFBVFP, uses lemmas on demand for QF_AUFBVFP, and eager bit-blasting (optionally with local searchin a sequential portfolio) for QF_BV."prop": The propagation-based local search QF_BV engine."sls": The stochastic local search QF_BV engine."quant": The quantifier engine.| Exit_codesUse non-zero exit codes for sat and unsat results.
When enabled, use Bitwuzla exit codes When disabled, return 0 on success (sat, unsat, unknown), and a non-zero exit code otherwise.
Values:
1: enable [default]0: disable| Input_formatConfigure input file format.
If unspecified, Bitwuzla will autodetect the input file format.
Values:
"none" [default]: Auto-detect input file format."btor": BTOR format"btor2": BTOR2 format"smt2": SMT-LIB v2 format| IncrementalIncremental solving.
Values:
1: enable0: disable [default]Enabling this option turns off some optimization techniques. Enabling/disabling incremental solving after bitwuzla_check_sat() has been called is not supported. This option cannot be enabled in combination with option Pp_unconstrained_optimization.
| LoglevelLog level.
Values:
0).| Output_formatConfigure output number format for bit-vector values.
If unspecified, Bitwuzla will use BTOR format.
Values:
"aiger": AIGER ascii format"aigerbin": AIGER binary format"btor" [default]: BTOR format"smt2": SMT-LIB v2 format| Output_number_formatConfigure output number format for bit-vector values.
If unspecified, Bitwuzla will use binary representation.
Values:
"bin" [default]: Binary number format."hex": Hexadecimal number format."dec": Decimal number format.| Pretty_printPretty printing.
Values:
1: enable [default]0: disable| Print_dimacsPrint DIMACS.
Print the CNF sent to the SAT solver in DIMACS format to stdout.
Values:
1: enable0: disable [default]| Produce_modelsModel generation.
Values:
1: enable, generate model for assertions only2: enable, generate model for all created terms0: disable [default]This option cannot be enabled in combination with option Pp_unconstrained_optimization.
| Produce_unsat_coresUnsat core generation.
Values:
1: enable0: disable [default]| SeedSeed for random number generator.
Values:
0).| VerbosityVerbosity level.
Values:
0).| Pp_ackermann| Pp_beta_reduce| Pp_eliminate_extracts| Pp_eliminate_ites| Pp_extract_lambdas| Pp_merge_lambdas| Pp_nondestr_subst| Pp_normalize_add| Pp_skeleton_preproc| Pp_unconstrained_optimization| Pp_var_subst| Rw_extract_arith| Rw_level| Rw_normalize| Rw_normalize_add| Rw_simplify_constraints| Rw_slt| Rw_sort_aig| Rw_sort_aigvec| Rw_sort_exp| Fun_dual_prop| Fun_dual_prop_qsort| Fun_eager_lemmas| Fun_lazy_synthesize| Fun_just| Fun_just_heuristic| Fun_preprop| Fun_presls| Fun_store_lambdas| Sls_just| Sls_move_gw| Sls_move_inc_move_test| Sls_move_prop| Sls_move_prop_force_rw| Sls_move_prop_nprops| Sls_move_prop_nslss| Sls_move_rand_all| Sls_move_rand_range| Sls_move_rand_walk| Sls_move_range| Sls_move_segment| Sls_prob_move_rand_walk| Sls_nflips| Sls_strategy| Sls_use_restarts| Sls_use_bandit| Prop_ashr| Prop_const_bits| Prop_const_domains| Prop_entailed| Prop_flip_cond_const_delta| Prop_flip_cond_const_npathsel| Prop_infer_ineq_bounds| Prop_no_move_on_conflict| Prop_nprops| Prop_nupdates| Prop_path_sel| Prop_prob_fallback_random_value| Prop_prob_and_flip| Prop_prob_eq_flip| Prop_prob_flip_cond| Prop_prob_flip_cond_const| Prop_prob_random_input| Prop_prob_slice_flip| Prop_prob_slice_keep_dc| Prop_prob_use_inv_value| Prop_use_bandit| Prop_use_inv_lt_concat| Prop_use_restarts| Prop_sext| Prop_skip_no_progress| Prop_xor| Aigprop_nprops| Aigprop_use_bandit| Aigprop_use_restarts| Quant_cer| Quant_der| Quant_dual_solver| Quant_miniscope| Quant_synth| Quant_fixsynth| Quant_synth_ite_complete| Quant_synth_limit| Quant_synth_qi| Check_model| Check_unconstrained| Check_unsat_assumptions| Declsort_bv_witdh| Parse_interactive| Sat_engine_cadical_freezeThe options supported by Bitwuzla.
set_option_str t option value set option value for string options.
get_option_str t option get the current value of an option as a string if option can be configured via a string value.
A Bitwuzla sort.
mk_array_sort t index element create an array sort.
mk_bool_sort t create a Boolean sort.
A Boolean sort is a bit-vector sort of size 1.
mk_fp_sort t exp_size sig_size create a floating-point sort of given exponent and significand size.
mk_fun_sort t domain codomain create a function sort.
sort_dump sort format pp print sort.
bv_get_size sort get the size of a bit-vector sort.
Requires that given sort is a bit-vector sort.
sort_fp_get_exp_size sort get the exponent size of a floating-point sort.
Requires that given sort is a floating-point sort.
sort_fp_get_sig_size sort get the significand size of a floating-point sort.
Requires that given sort is a floating-point sort.
sort_array_get_index sort get the index sort of an array sort.
Requires that given sort is an array sort.
sort_array_get_element sort get the element sort of an array sort.
Requires that given sort is an array sort.
sort_fun_get_domain_sorts sort get the domain sorts of a function sort.
Requires that given sort is a function sort.
sort_fun_get_codomain sort get the codomain sort of a function sort.
Requires that given sort is a function sort.
sort_is_equal sort0 sort1 determine if two sorts are equal.
A Bitwuzla term.
The base for strings representing bit-vector values.
type roundingmode = | RneRound to the nearest even number. If the two nearest floating-point numbers bracketing an unrepresentable infinitely precise result are equally near, the one with an even least significant digit will be delivered.
SMT-LIB: RNE roundNearestTiesToEven
| RnaRound to the nearest number away from zero. If the two nearest floating-point numbers bracketing an unrepresentable infinitely precise result are equally near, the one with larger magnitude will be selected.
SMT-LIB: RNA roundNearestTiesToAway
| RtnRound towards negative infinity (-oo). The result shall be the format’s floating-point number (possibly -oo) closest to and no less than the infinitely precise result.
SMT-LIB: RTN roundTowardNegative
| RtpRound towards positive infinity (+oo). The result shall be the format’s floating-point number (possibly +oo) closest to and no less than the infinitely precise result.
SMT-LIB: RTP roundTowardPositive
| RtzRound towards zero. The result shall be the format’s floating-point number closest to and no greater in magnitude than the infinitely precise result.
SMT-LIB: RTZ roundTowardZero
Rounding mode for floating-point operations.
For some floating-point operations, infinitely precise results may not be representable in a given format. Hence, they are rounded modulo one of five rounding modes to a representable floating-point number.
The following rounding modes follow the SMT-LIB theory for floating-point arithmetic, which in turn is based on IEEE Standard 754. The rounding modes are specified in Sections 4.3.1 and 4.3.2 of the IEEE Standard 754.
type kind = | ConstFirst order constant.
*)| Const_ArrayConstant array.
*)| ValValue.
*)| VarBound variable.
*)| AndBoolean and.
SMT-LIB: and
| ApplyFunction application.
*)| Array_selectArray select.
SMT-LIB: select
| Array_storeArray store.
SMT-LIB: store
| Bv_addBit-vector addition.
SMT-LIB: bvadd
| Bv_andBit-vector and.
SMT-LIB: bvand
| Bv_ashrBit-vector arithmetic right shift.
SMT-LIB: bvashr
| Bv_compBit-vector comparison.
SMT-LIB: bvcomp
| Bv_concatBit-vector concat.
SMT-LIB: concat
| Bv_decBit-vector decrement.
Decrement by one.
*)| Bv_incBit-vector increment.
Increment by one.
*)| Bv_mulBit-vector multiplication.
SMT-LIB: bvmul
| Bv_nandBit-vector nand.
SMT-LIB: bvnand
| Bv_negBit-vector negation (two's complement).
SMT-LIB: bvneg
| Bv_norBit-vector nor.
SMT-LIB: bvnor
| Bv_notBit-vector not (one's complement).
SMT-LIB: bvnot
| Bv_orBit-vector or.
SMT-LIB: bvor
| Bv_redandBit-vector and reduction.
Bit-wise and reduction, all bits are and'ed together into a single bit. This corresponds to bit-wise and reduction as known from Verilog.
*)| Bv_redorBit-vector reduce or.
Bit-wise or reduction, all bits are or'ed together into a single bit. This corresponds to bit-wise or reduction as known from Verilog.
*)| Bv_redxorBit-vector reduce xor.
Bit-wise xor reduction, all bits are xor'ed together into a single bit. This corresponds to bit-wise xor reduction as known from Verilog.
*)| Bv_rolBit-vector rotate left (not indexed).
This is a non-indexed variant of SMT-LIB rotate_left.
| Bv_rorBit-vector rotate right.
This is a non-indexed variant of SMT-LIB rotate_right.
| Bv_sadd_overflowBit-vector signed addition overflow test.
Single bit to indicate if signed addition produces an overflow.
*)| Bv_sdiv_overflowBit-vector signed division overflow test.
Single bit to indicate if signed division produces an overflow.
*)| Bv_sdivBit-vector signed division.
SMT-LIB: bvsdiv
| Bv_sgeBit-vector signed greater than or equal.
SMT-LIB: bvsge
| Bv_sgtBit-vector signed greater than.
SMT-LIB: bvsgt
| Bv_shlBit-vector logical left shift.
SMT-LIB: bvshl
| Bv_shrBit-vector logical right shift.
SMT-LIB: bvshr
| Bv_sleBit-vector signed less than or equal.
SMT-LIB: bvsle
| Bv_sltBit-vector signed less than.
SMT-LIB: bvslt
| Bv_smodBit-vector signed modulo.
SMT-LIB: bvsmod
| Bv_smul_overflowBit-vector signed multiplication overflow test.
SMT-LIB: bvsmod
| Bv_sremBit-vector signed remainder.
SMT-LIB: bvsrem
| Bv_ssub_overflowBit-vector signed subtraction overflow test.
Single bit to indicate if signed subtraction produces an overflow.
*)| Bv_subBit-vector subtraction.
SMT-LIB: bvsub
| Bv_uadd_overflowBit-vector unsigned addition overflow test.
Single bit to indicate if unsigned addition produces an overflow.
*)| Bv_udivBit-vector unsigned division.
SMT-LIB: bvudiv
| Bv_ugeBit-vector unsigned greater than or equal.
SMT-LIB: bvuge
| Bv_ugtBit-vector unsigned greater than.
SMT-LIB: bvugt
| Bv_uleBit-vector unsigned less than or equal.
SMT-LIB: bvule
| Bv_ultBit-vector unsigned less than.
SMT-LIB: bvult
| Bv_umul_overflowBit-vector unsigned multiplication overflow test.
Single bit to indicate if unsigned multiplication produces an overflow.
*)| Bv_uremBit-vector unsigned remainder.
SMT-LIB: bvurem
| Bv_usub_overflowBit-vector unsigned subtraction overflow test.
Single bit to indicate if unsigned subtraction produces an overflow.
*)| Bv_xnorBit-vector xnor.
SMT-LIB: bvxnor
| Bv_xorBit-vector xor.
SMT-LIB: bvxor
| DistinctDisequality.
SMT-LIB: distinct
| EqualEquality.
SMT-LIB: =
| ExistsExistential quantification.
SMT-LIB: exists
| ForallUniversal quantification.
SMT-LIB: forall
| Fp_absFloating-point absolute value.
SMT-LIB: fp.abs
| Fp_addFloating-point addition.
SMT-LIB: fp.add
| Fp_divFloating-point division.
SMT-LIB: fp.div
| Fp_eqFloating-point equality.
SMT-LIB: fp.eq
| Fp_fmaFloating-point fused multiplcation and addition.
SMT-LIB: fp.fma
| Fp_fpFloating-point IEEE 754 value.
SMT-LIB: fp
| Fp_geqFloating-point greater than or equal.
SMT-LIB: fp.geq
| Fp_gtFloating-point greater than.
SMT-LIB: fp.gt
| Fp_is_infFloating-point is infinity tester.
SMT-LIB: fp.isInfinite
| Fp_is_nanFloating-point is Nan tester.
SMT-LIB: fp.isNaN
| Fp_is_negFloating-point is negative tester.
SMT-LIB: fp.isNegative
| Fp_is_normalFloating-point is normal tester.
SMT-LIB: fp.isNormal
| Fp_is_posFloating-point is positive tester.
SMT-LIB: fp.isPositive
| Fp_is_subnormalFloating-point is subnormal tester.
SMT-LIB: fp.isSubnormal
| Fp_is_zeroFloating-point is zero tester.
SMT-LIB: fp.isZero
| Fp_leqFloating-point less than or equal.
SMT-LIB: fp.leq
| Fp_ltFloating-point less than.
SMT-LIB: fp.lt
| Fp_maxFloating-point max.
SMT-LIB: fp.max
| Fp_minFloating-point min.
SMT-LIB: fp.min
| Fp_mulFloating-point multiplcation.
SMT-LIB: fp.mul
| Fp_negFloating-point negation.
SMT-LIB: fp.neg
| Fp_remFloating-point remainder.
SMT-LIB: fp.rem
| Fp_rtiFloating-point round to integral.
SMT-LIB: fp.roundToIntegral
| Fp_sqrtFloating-point round to square root.
SMT-LIB: fp.sqrt
| Fp_subFloating-point round to subtraction.
SMT-LIB: fp.sqrt
| IffBoolean if and only if.
SMT-LIB: =
| ImpliesBoolean implies.
SMT-LIB: =>
| IteIf-then-else.
SMT-LIB: ite
| LambdaLambda.
*)| NotBoolean not.
SMT-LIB: not
| OrBoolean or.
SMT-LIB: or
| XorBoolean xor.
SMT-LIB: xor
| Bv_extractBit-vector extract.
SMT-LIB: extract (indexed)
| Bv_repeatBit-vector repeat.
SMT-LIB: repeat (indexed)
| Bv_roliBit-vector rotate left by integer.
SMT-LIB: rotate_left (indexed)
| Bv_roriBit-vector rotate right by integer.
SMT-LIB: rotate_right (indexed)
| Bv_sign_extendBit-vector sign extend.
SMT-LIB: sign_extend (indexed)
| Bv_zero_extendBit-vector zero extend.
SMT-LIB: zero_extend (indexed)
| Fp_to_fp_from_bvFloating-point to_fp from IEEE 754 bit-vector.
SMT-LIB: to_fp (indexed)
| Fp_to_fp_from_fpFloating-point to_fp from floating-point.
SMT-LIB: to_fp (indexed)
| Fp_to_fp_from_sbvFloating-point to_fp from signed bit-vector value.
SMT-LIB: to_fp (indexed)
| Fp_to_fp_from_ubvFloating-point to_fp from unsigned bit-vector value.
SMT-LIB: to_fp_unsigned (indexed)
| Fp_to_sbvFloating-point to_sbv.
SMT-LIB: fp.to_sbv (indexed)
| Fp_to_ubvFloating-point to_ubv.
SMT-LIB: fp.to_ubv (indexed)
The term kind.
mk_true t create a true value.
This creates a bit-vector value 1 of size 1.
mk_false t create a false value.
This creates a bit-vector value 0 of size 1.
mk_bv_ones t sort create a bit-vector value where all bits are set to 1.
mk_bv_min_signed t sort create a bit-vector minimum signed value.
mk_bv_max_signed t sort create a bit-vector maximum signed value.
mk_fp_pos_zero t sort create a floating-point positive zero value (SMT-LIB: +zero).
mk_fp_neg_zero t sort create a floating-point negative zero value (SMT-LIB: -zero).
mk_fp_pos_inf t sort create a floating-point positive infinity value (SMT-LIB: +oo).
mk_fp_neg_inf t sort create a floating-point negative infinity value (SMT-LIB: -oo).
mk_bv_value t sort value base create a bit-vector value from its string representation.
Parameter base determines the base of the string representation.
Given value must fit into a bit-vector of given size (sort).
mk_bv_value_int t sort value create a bit-vector value from its unsigned integer representation.
If given value does not fit into a bit-vector of given size (sort), the value is truncated to fit.
mk_fp_value t bv_sign bv_exponent bv_significand create a floating-point value from its IEEE 754 standard representation given as three bitvectors representing the sign bit, the exponent and the significand.
mk_fp_value_from_real t sort rm real create a floating-point value from its real representation, given as a decimal string, with respect to given rounding mode.
mk_fp_value_from_rational t sort rm num den create a floating-point value from its rational representation, given as a two decimal strings representing the numerator and denominator, with respect to given rounding mode.
mk_rm_value t rm create a rounding mode value.
mk_term1 t kind arg create a term of given kind with one argument term.
mk_term2 t kind arg0 arg1 create a term of given kind with two argument terms.
mk_term3 t kind arg0 arg1 arg2 create a term of given kind with three argument terms.
mk_term t kind args create a term of given kind with the given argument terms.
mk_term1_indexed1 t kind arg idx create an indexed term of given kind with one argument term and one index.
mk_term1_indexed2 t kind arg idx0 idx1 create an indexed term of given kind with one argument term and two indices.
mk_term2_indexed1 t kind arg0 arg1 idx create an indexed term of given kind with two argument terms and one index.
mk_term2_indexed2 t kind arg0 arg1 idx0 idx1 create an indexed term of given kind with two argument terms and two indices.
mk_term_indexed t kind args idxs create an indexed term of given kind with the given argument terms and indices.
mk_const t sort symbol create a (first-order) constant of given sort with given symbol.
This creates a 0-arity function symbol.
mk_const_array t sort value create a one-dimensional constant array of given sort, initialized with given value.
mk_var t sort symbol create a variable of given sort with given symbol.
This creates a variable to be bound by quantifiers or lambdas.
substitute t term map substitute a set of keys with their corresponding values in the given term.
substitute_terms t terms map substitute a set of keys with their corresponding values in the set of given terms.
The terms in terms are replaced with the terms resulting from this substitutions.
term_dump term format pp print term.
term_get_children term get the child terms of a term.
term_get_indices term get the indices of an indexed term.
Requires that given term is an indexed term.
term_is_indexed term determine if a term is an indexed term.
term_array_get_index_sort term get the index sort of an array term.
Requires that given term is an array or an array store term.
term_array_get_element_sort term get the element sort of an array term.
Requires that given term is an array or an array store term.
term_fun_get_domain_sorts term get the domain sorts of a function term.
Requires that given term is an uninterpreted function, a lambda term, an array store term, or an ite term over function terms.
term_fun_get_codomain_sort term get the codomain sort of a function term.
Requires that given term is an uninterpreted function, a lambda term, an array store term, or an ite term over function terms.
term_bv_get_size term get the bit-width of a bit-vector term.
Requires that given term is a bit-vector term.
term_fp_get_exp_size term get the bit-width of the exponent of a floating-point term.
Requires that given term is a floating-point term.
term_fp_get_sig_size term get the bit-width of the significand of a floating-point term.
Requires that given term is a floating-point term.
term_fp_get_arity term get the arity of a function term.
Requires that given term is a function term.
term_set_symbol term symbol set the symbol of a term.
term_is_equal_sort term0 term1 determine if the sorts of two terms are equal.
term_is_bound_var term determine if a term is a bound variable.
term_is_bv_value term determine if a term is a bit-vector value.
term_is_fp_value term determine if a term is a floating-point value.
term_is_rm_value term determine if a term is a rounding mode value.
term_is_bv_value_zero term determine if a term is a bit-vector value representing zero.
term_is_bv_value_one term determine if a term is a bit-vector value representing one.
term_is_bv_value_ones term determine if a term is a bit-vector value with all bits set to one.
term_is_bv_value_min_signed term determine if a term is a bit-vector minimum signed value.
term_is_bv_value_max_signed term determine if a term is a bit-vector maximum signed value.
term_is_fp_value_pos_zero term determine if a term is a floating-point positive zero (+zero) value.
term_is_fp_value_neg_zero term determine if a term is a floating-point value negative zero (-zero).
term_is_fp_value_pos_inf term determine if a term is a floating-point positive infinity (+oo) value.
term_is_fp_value_neg_inf term determine if a term is a floating-point negative infinity (-oo) value.
term_is_fp_value_nan term determine if a term is a floating-point NaN value.
term_is_const_array term determine if a term is a constant array.
A satisfiability result.
parse t input pp parse input file.
The format of the input file is auto detected. Requires that no terms have been created yet.
parse_format t format input pp parse input file, assumed to be given in the specified format.
Requires that no terms have been created yet.
push t nlevels push context levels.
Requires that incremental solving has been enabled via set_option.
Assumptions added via this bitwuzla_assume are not affected by context level changes and are only valid until the next check_sat call, no matter at which level they were assumed.
pop t nlevels pop context levels.
Requires that incremental solving has been enabled via set_option.
Assumptions added via this assume are not affected by context level changes and are only valid until the next check_sat call, no matter at which level they were assumed.
mk_assume t term assume formula.
Requires that incremental solving has been enabled via set_option.
Assumptions added via this function are not affected by context level changes and are only valid until the next check_sat call, no matter at which level they were assumed.
val dump_formula :
t ->
[ `Aiger_ascii | `Aiger_binary | `Btor | `Smt2 ] ->
Format.formatter ->
unitdump_formula t format pp print the current input formula.
Requires that incremental solving is not enabled.
simplify t simplify the current input formula.
Assumptions are not considered for simplification.
check_sat t check satisfiability of current input formula.
An input formula consists of assertions added via mk_assert. The search for a solution can by guided by making assumptions via mk_assume.
Assertions and assumptions are combined via Boolean and. Multiple calls to this function require enabling incremental solving via set_option.
get_bv_value t term get string representation of the current model value of given bit-vector term.
get_fp_value t term get string of IEEE 754 standard representation of the current model value of given floating-point term.
get_rm_value t term get string representation of the current model value of given rounding mode term.
get_array_value t term get the current model value of given array term.
The string representation of indices and values can be queried via get_bv_value, get_fp_value, and get_rm_value.
get_fun_value t term get the current model value of given function term.
The string representation of arguments and values can be queried via get_bv_value, get_fp_value, and get_rm_value.
print_model t print a model for the current input formula.
Requires that the last check_sat query returned Sat.
is_unsat_assumption t term determine if an assumption is an unsat assumption.
Unsat assumptions are assumptions that force an input formula to become unsatisfiable. Unsat assumptions handling in Bitwuzla is analogous to failed assumptions in MiniSAT.
Requires that incremental solving has been enabled via set_option.
Requires that the last check_sat query returned Unsat.
get_unsat_assumptions t get the set of unsat assumptions.
Unsat assumptions are assumptions that force an input formula to become unsatisfiable. Unsat assumptions handling in Bitwuzla is analogous to failed assumptions in MiniSAT.
Requires that incremental solving has been enabled via set_option.