module Monomorphization:sig
..end
val name : string
exception InvalidProblem of string
typeterm =
Nunchaku_core.TermInner.Default.t
type
unmangle_state
val monomorphize : ?depth_limit:int ->
?always_mangle:bool ->
(term, term) Nunchaku_core.Problem.t ->
(term, term) Nunchaku_core.Problem.t *
unmangle_state
First it finds a set of instances for each symbol such that it is sufficient to instantiate the corresponding (partial) definitions of the symbol with those tuples.
Then it specializes relevant definitions with the set of tuples
computed earlier.
Returns a new list of (monomorphized) statements, and the final
state obtained after monomorphization
depth_limit
: recursion limit for specialization of functionsalways_mangle
: if true, polymorphic types
become new atomic types, e.g. list int
becomes list_int
(default: false
)val unmangle_term : state:unmangle_state ->
term -> term
val unmangle_model : state:unmangle_state ->
(term, term) Nunchaku_core.Model.t ->
(term, term) Nunchaku_core.Model.t
val pipe : always_mangle:bool ->
print:bool ->
check:bool ->
((term, term) Nunchaku_core.Problem.t,
(term, term) Nunchaku_core.Problem.t,
(term, term) Nunchaku_core.Problem.Res.t,
(term, term) Nunchaku_core.Problem.Res.t)
Nunchaku_core.Transform.t
val pipe_with : decode:(unmangle_state -> 'c -> 'd) ->
always_mangle:bool ->
print:bool ->
check:bool ->
((term, term) Nunchaku_core.Problem.t,
(term, term) Nunchaku_core.Problem.t, 'c,
'd)
Nunchaku_core.Transform.t
decode
: the decode function that takes an applied (module S)
in addition to the statealways_mangle
: see Monomorphization.monomorphize