libgrew_types.mli 1.31 KB
Newer Older
bguillaum's avatar
bguillaum committed
1 2 3
(**********************************************************************************)
(*    Libcaml-grew - a Graph Rewriting library dedicated to NLP applications      *)
(*                                                                                *)
Bruno Guillaume's avatar
Bruno Guillaume committed
4
(*    Copyright 2011-2018 Inria, Université de Lorraine                           *)
bguillaum's avatar
bguillaum committed
5
(*                                                                                *)
Bruno Guillaume's avatar
Bruno Guillaume committed
6
(*    Webpage: http://grew.fr                                                     *)
bguillaum's avatar
bguillaum committed
7 8 9 10
(*    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

Bruno Guillaume's avatar
Bruno Guillaume committed
15
type step_name = string
pj2m's avatar
pj2m committed
16 17 18

type rule_app = {
    rule_name: string;
Bruno Guillaume's avatar
Bruno Guillaume committed
19 20
    up: G_deco.t;
    down: G_deco.t;
pj2m's avatar
pj2m committed
21 22
}

23 24
type big_step = {
    first: rule_app;
Bruno Guillaume's avatar
Bruno Guillaume committed
25
    small_step: (G_graph.t * rule_app) list;
26 27
}

Bruno Guillaume's avatar
Bruno Guillaume committed
28 29
val swap : big_step -> big_step

pj2m's avatar
pj2m committed
30 31 32
(** the main type for display the result of a rewriting *)
type rew_display =
  | Empty (* pour les besoin du dev *)
Bruno Guillaume's avatar
Bruno Guillaume committed
33 34 35
  | Leaf of G_graph.t
  | Local_normal_form of G_graph.t * step_name * rew_display
  | Node of G_graph.t * step_name * (big_step * rew_display) list
pj2m's avatar
pj2m committed
36

37
val rew_display_size: rew_display -> int