sig
type t
type input
+ type state
type szsontology =
| Unsatisfiable of (t Terms.bag * int * int list) list
| GaveUp
| Error of string
| Timeout of int * t Terms.bag
type bag = t Terms.bag * int
+ val empty_state : state
val mk_passive : bag -> input * input -> bag * t Terms.unit_clause
val mk_goal : bag -> input * input -> bag * t Terms.unit_clause
+ val forward_infer_step :
+ state ->
+ t Terms.unit_clause ->
+ int ->
+ state
val paramod :
useage:bool ->
max_steps:int ->
end
module Paramod (B : Orderings.Blob) = struct
- type t = B.t
- type input = B.input
- type szsontology =
- | Unsatisfiable of (B.t Terms.bag * int * int list) list
- | GaveUp
- | Error of string
- | Timeout of int * B.t Terms.bag
- exception Stop of szsontology
- type bag = B.t Terms.bag * int
module Pp = Pp.Pp (B)
module FU = FoUnif.Founif(B)
module IDX = Index.Index(B)
module WeightPassiveSet = Set.Make(WeightOrderedPassives)
module AgePassiveSet = Set.Make(AgeOrderedPassives)
+ type t = B.t
+ type input = B.input
+ type state =
+ B.t Terms.bag
+ * int
+ * Index.Index(B).active_set
+ * (WeightPassiveSet.t * AgePassiveSet.t)
+ * B.t Terms.unit_clause list
+ * (WeightPassiveSet.t * AgePassiveSet.t)
+ type szsontology =
+ | Unsatisfiable of (B.t Terms.bag * int * int list) list
+ | GaveUp
+ | Error of string
+ | Timeout of int * B.t Terms.bag
+ exception Stop of szsontology
+ type bag = B.t Terms.bag * int
+
+ let empty_state =
+ Terms.empty_bag,
+ 0,
+ ([],IDX.DT.empty),
+ (WeightPassiveSet.empty,AgePassiveSet.empty),
+ [],
+ (WeightPassiveSet.empty,AgePassiveSet.empty)
+;;
+
let add_passive_clause ?(no_weight=false) (passives_w,passives_a) cl =
let cl = if no_weight then (0,cl)
else Utils.mk_passive_clause cl in
(add_passive_goals g_passives new_goals)
;;
- let forward_infer_step bag maxvar actives passives g_actives
- g_passives current iterno =
+ let forward_infer_step (bag,maxvar,actives,passives,g_actives,g_passives)
+ current iterno =
(* forward step *)
(* e = select P *
in
bag,maxvar,actives,passives,g_actives,g_passives
else
- forward_infer_step bag maxvar actives passives
- g_actives g_passives current iterno
+ forward_infer_step
+ (bag,maxvar,actives,passives,g_actives,g_passives)
+ current iterno
in