Module Bitwuzla.Once
Create a new Bitwuzla session (check_sat
can only be called once).
Parameters
Signature
Phantom type
type ('a, 'b) ar
=[
|
`Ar of 'a -> 'b
]
constraint 'a = [< bv | rm | fp ] constraint 'b = [< bv | rm | fp ]
The array kind with
'a
index and'b
element.Both index and element should be of bit-vector, rounding-mode or floating-point kind
type ('a, 'b) fn
=[
|
`Fn of 'a -> 'b
]
constraint 'b = [< bv ]
The function kind taking
'a
argument and returning'b
element.Functions accept only bit-vector, rounding-mode or floating-point as argument and return only bit-vector.
Core types
type 'a value
= private 'a term
A value of
'a
kind.Values are subtype of terms and can be downcasted using
:>
operator.
module Sort : sig ... end
module Term : sig ... end
Formula
val assert' : ?name:string -> bv term -> unit
assert' ~name t
assert that the conditiont
istrue
.t
must be a boolean term (bv
term
of size 1).- parameter name
The name of the assertion, if any.
- parameter t
The formula term to assert.
val pp_result : Stdlib.Format.formatter -> result -> unit
pp formatter result
pretty print result.- parameter formatter
The output formatter.
- parameter result
The result to print.
val check_sat : ?interrupt:(('a -> int) * 'a) -> unit -> result
check_sat ~interrupt ()
check satisfiability of current input formula.- parameter interrupt
Stop the research and return
Unknown
if the callback function returns a positive value. Run into completion otherwise.
val timeout : float -> (?interrupt:((float -> int) * float) -> 'b) -> 'b
timeout t f
configure the interruptible functionf
with a timeout oft
seconds.timeout
can be used to limit the time spend oncheck_sat
. For instance, for a 1 second time credit, use:(timeout 1. check_sat) ()
- parameter t
Timeout in second.
- parameter f
The function to configure.
- returns
An interruptible function configured to stop on timeout.