grew_types.mli 1.36 KB
Newer Older
bguillaum's avatar
bguillaum committed
1 2 3 4 5 6 7 8 9 10
(**********************************************************************************)
(*    Libcaml-grew - a Graph Rewriting library dedicated to NLP applications      *)
(*                                                                                *)
(*    Copyright 2011-2013 Inria, Université de Lorraine                           *)
(*                                                                                *)
(*    Webpage: http://grew.loria.fr                                               *)
(*    License: CeCILL (see LICENSE folder or "http://www.cecill.info")            *)
(*    Authors: see AUTHORS file                                                   *)
(**********************************************************************************)

pj2m's avatar
pj2m committed
11 12
(** {2 Types fo grew} *)

bguillaum's avatar
bguillaum committed
13
open Grew_graph
pj2m's avatar
pj2m committed
14 15

(**/**)
16
type graph = G_graph.t
17
type deco = G_deco.t
pj2m's avatar
pj2m committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
(**/**)

type module_name = string

(** Rule app *)
type rule_app = {
    rule_name: string;
    up: deco;
    down: deco;
}

(** the main type for display the result of a rewriting *)
type rew_display =
  | Empty (* pour les besoin du dev *)
  | Leaf of graph
33
  | Local_normal_form of graph * module_name * rew_display
pj2m's avatar
pj2m committed
34 35 36 37 38 39 40
  | Node of graph * module_name * (big_step * rew_display) list

(** the type for big edges which correspond the a module *)
and big_step = {
    first: rule_app;
    small_step: (graph * rule_app) list;
}