grew_fs.mli 1.35 KB
Newer Older
bguillaum's avatar
bguillaum committed
1 2
open Grew_utils
open Grew_ast
pj2m's avatar
pj2m committed
3 4 5 6 7 8 9 10

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
11 12
  val build: ?domain:Ast.domain -> Ast.feature list -> t
      
bguillaum's avatar
bguillaum committed
13
  val get: string -> t -> string list option
bguillaum's avatar
bguillaum committed
14 15 16
      
  val get_atom: string -> t -> string option

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

      (** [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
25
      val set_feat:  string -> string list -> t ->  t
bguillaum's avatar
bguillaum committed
26 27 28

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

pj2m's avatar
pj2m committed
31 32 33 34 35 36 37 38 39 40 41
      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