grew_fs.mli 1.2 KB
Newer Older
pj2m's avatar
pj2m committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
open Utils

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

module Feature_structure: sig
  type t

      val build: ?domain:Ast.domain -> Ast.feature list -> t
      val get: string -> t -> string list
      val empty: t
      val to_string: t -> string
      val to_dep: ?main_feat: string -> t -> string
bguillaum's avatar
bguillaum committed
15 16 17

      (** [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
18
      val set_feat:  string -> string list -> t ->  t
bguillaum's avatar
bguillaum committed
19 20 21

      (** [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
22
      val del_feat:  string -> t ->  t
bguillaum's avatar
bguillaum committed
23

pj2m's avatar
pj2m committed
24 25 26 27 28 29 30 31 32 33 34
      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