Module LogicDef


module LogicDef: sig .. end
Logic Database


type item =
| TYPE of int
| RECORD of LogicTau.field list
| FUNCTION of LogicLang.var list * LogicTau.tau * LogicLang.term option
| PREDICATE of LogicLang.var list * LogicLang.pred option
| AXIOM of LogicLang.pred

type description = {
   t_source : Lexing.position;
   t_short : string;
   t_descr : string;
}
type declaration = {
   d_name : LogicId.id;
   d_item : item;
   d_descr : description;
}
type registered = {
   r_declaration : declaration;
   r_localdeps : LogicId.Iset.t;
   r_age : int;
}
type logic_model = {
   model_name : string;
   model_pointer : LogicTau.tau;
   model_index : registered LogicId.Ihmap.t;
   mutable model_locked : LogicId.Iset.t;
   mutable model_history : int;
   mutable model_updated : bool;
}
module LogicModel: Datatype.Make(sig
include Datatype.Undefined
type t = LogicDef.logic_model 
val name : string
val reprs : LogicDef.logic_model list
end)
module MODELS: State_builder.Hashtbl(Datatype.String.Hashtbl)(LogicModel)(sig
val name : string
val dependencies : State.t list
val kind : [> `Tuning ]
val size : int
end)
val register : name:MODELS.key -> pointer:LogicTau.tau -> unit
val current_model : MODELS.data option Pervasives.ref
val on_model : MODELS.key -> ('a -> 'b) -> 'a -> 'b
val the_model : unit -> MODELS.data
val lookup : LogicId.Ihmap.key -> registered
val get_item : LogicId.Ihmap.key -> item
Raise Not_found if the symbol is undefined.
val get_description : LogicId.Ihmap.key -> description
Raise Not_found if the symbol is undefined.
val get_declaration : LogicId.Ihmap.key -> declaration
Raise Not_found if the symbol is undefined.
val get_local_depends : LogicId.Ihmap.key -> LogicId.Iset.t
val add_depend_var : LogicId.Iset.t -> LogicLang.var -> LogicId.Iset.t
val add_depend_field : LogicId.Iset.t -> LogicTau.field -> LogicId.Iset.t
val dependencies : item -> LogicId.Iset.t
val declare : declaration -> unit
Simple declaration.
val lock : LogicId.Iset.elt -> unit
val unlock : LogicId.Iset.elt -> unit
val mark_history : unit -> unit
val model_age : unit -> int
module Cofix: sig .. end
val fixpoint : LogicId.Ihmap.key -> (LogicId.Iset.elt -> 'a) -> item
Retrieve the definition of f if already defined. Otherwise compile it with the provided compiler.

The compiler should set an initial value with default before any recursive call to fixpoint. Then, the compiler should updates item for f or any other mutually-recursive symbol with f by using update. It is a fatal-error to call declare on a symbol currently compiled by fixpoint.

The mutually recursive calls to fixpoint are detected, and associated compilers are run until stabilisation. All mutually-recursive symbols are finally declared and defined with their last updates.

val default : LogicId.Ihmap.key -> item -> unit
val update : LogicId.Ihmap.key -> item -> description -> unit
module Components: sig .. end
val declarations : LogicId.Ihmap.key list -> declaration list
val export : (declaration list -> unit) ->
((Components.H.key -> unit) -> 'a) -> unit
val export_items : (declaration list -> unit) -> Components.H.key list -> unit
val export_goal : (declaration list -> unit) -> LogicLang.pred -> unit