grew_node.mli 1.45 KB
Newer Older
bguillaum's avatar
bguillaum committed
1
open Grew_utils
pj2m's avatar
pj2m committed
2 3
open Grew_fs
open Grew_edge
bguillaum's avatar
bguillaum committed
4
open Grew_ast
pj2m's avatar
pj2m committed
5

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
(* ================================================================================ *)
module G_node: sig
  type t

  val empty: t

  val to_string: t -> string
  val to_gr: t -> string

  val get_fs: t -> Feature_structure.t
  val get_next: t -> G_edge.t Massoc.t

  val set_fs: t -> Feature_structure.t -> t

(* FIXME move Gid up and replace int by Gid.t *) 
  val remove: int -> G_edge.t -> t -> t 

  val remove_key: int -> t -> t 

  val merge_key: int -> int -> t -> t option
  val shift_out: t -> t -> t option

  val rm_out_edges: t -> t

  val add_edge: G_edge.t -> int -> t -> t option
pj2m's avatar
pj2m committed
31
  val build: ?domain:Ast.domain -> Ast.node -> (Id.name * t)
bguillaum's avatar
bguillaum committed
32 33
  val of_conll: Conll.line -> t

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
  val pos_comp: t -> t -> int

  val build_neighbour: t -> t
end
(* ================================================================================ *)

(* ================================================================================ *)
module P_node: sig
  type t

  val empty: t

  val get_fs: t -> Feature_structure.t
  val get_next: t -> P_edge.t Massoc.t

bguillaum's avatar
bguillaum committed
49
  val build: ?pat_vars: string list -> ?domain:Ast.domain -> Ast.node -> (Id.name * t)
50 51 52 53

  val add_edge: P_edge.t -> int -> t -> t option

  val is_a: t -> G_node.t -> bool
pj2m's avatar
pj2m committed
54

bguillaum's avatar
bguillaum committed
55
  val is_a_param: (string list * string list) list -> t -> G_node.t -> (string list * string list) list
pj2m's avatar
pj2m committed
56
end
57
(* ================================================================================ *)