Commits

Anonymous committed 41ae90f

*** empty log message ***

  • Participants
  • Parent commits 86d4520

Comments (0)

Files changed (1)

 module type LOG =
   sig
     type t  (** Abstract type of formulas. *)
-    val top : t  (** Most general formula. *)
+    val top : unit -> t  (** Most general formula. *)
     val entails : t -> t -> bool  (** Entailment relation {e is more specific than} of the logic. *)
+    val gen : t -> t -> t list -> t list  (** Dichotomic operator for generating new features. *)
+    val parse : Syntax.t_stream -> t  (** Parsing of formulas from token streams. *)
+    val print : t -> Syntax.t_list  (** Printing of formulas to token lists. *)
   end
 
-(** Functor building an implementation of logical DAGs. *)
-module Make (Param : PARAM) (Log : LOG) :
+(** The signature of implementations of logical diagrams. *)
+module type T =
   sig
     module Log : LOG
     (** The logic module passed as a parameter. *)
 
-    type nid
+    type nid = int
     (** Type of node ids. This type is also used for identifying objects: the id of an object is the id of its description node. *)
 
+    val nil : nid
+    (** Nil id referencing no node. *)
+
     val top : nid
     (** Id of the most general node. *)
 
     val sup : node -> nid LSet.t
     (** [sup node] gets the superior (more general) neighbours of [node]. *)
 
+    val is_obj : node -> bool
+    (** [is_obj node] test whether [node] is labeled by an object. *)
+
     val get : nid -> node
     (** [get nid] retrieves a node from its id [nid]. If the node is not yet in memory, it is loaded from the database.
         @raise Not_found when the node [nid] does not exist in the diagram. *)
 	[nodes]). *)
 
   end
+
+(** Functor building an implementation of logical DAGs. *)
+module Make (Param : PARAM) (Log : LOG) : T