grew_fs.mli 1.28 KB
Newer Older
pj2m's avatar
pj2m committed
1 2 3 4 5 6 7 8 9
open Utils

module Feature: sig
  val check: ?domain:Ast.domain -> Loc.t -> string -> string list -> unit
end

module Feature_structure: sig
  type t

bguillaum's avatar
bguillaum committed
10 11 12 13 14 15
  val build: ?domain:Ast.domain -> Ast.feature list -> t
      
  val get: string -> t -> string list
      
  val get_atom: string -> t -> string option

pj2m's avatar
pj2m committed
16 17
      val empty: t
      val to_string: t -> string
bguillaum's avatar
bguillaum committed
18
      val to_gr: t -> string
pj2m's avatar
pj2m committed
19
      val to_dep: ?main_feat: string -> t -> string
bguillaum's avatar
bguillaum committed
20 21 22

      (** [set_feat feature_name atoms t] adds the feature ([feature_name],[atoms]) in [t].
          If [t] already contains a feature named [feature_name], the old value is erased by the new one. *)
pj2m's avatar
pj2m committed
23
      val set_feat:  string -> string list -> t ->  t
bguillaum's avatar
bguillaum committed
24 25 26

      (** [del_feat feature_name t] remove the feature with name [feature_name] in [t].
          If [t] does not contain such a feature, [t] is returned unchanged. *)
pj2m's avatar
pj2m committed
27
      val del_feat:  string -> t ->  t
bguillaum's avatar
bguillaum committed
28

pj2m's avatar
pj2m committed
29 30 31 32 33 34 35 36 37 38 39
      val compatible: t -> t -> bool


      (** [unif t1 t2] returns [Some t] if [t] is the unification of two graph feature structures
	  [None] is returned if the two feature structures cannot be unified
	  [Bug_unif <msg>] is raised if inputs are not correct graph feature structures *)
      val unif: t -> t -> t option

      val unifiable: t -> t -> bool
      val filter: t -> t -> bool
    end