grew_types.ml 799 Bytes
Newer Older
bguillaum's avatar
bguillaum committed
1
open Grew_graph
pj2m's avatar
pj2m committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

type graph = Graph.t
type deco = Deco.t

type module_name = string

type rule_app = {
    rule_name: string;
    up: Deco.t;
    down: Deco.t;
  }

(* the main type for display the result of a rewriting *)
type rew_display =
  | Empty (* pour les besoin du dev *)
  | Leaf of Graph.t
18
  | Local_normal_form of Graph.t * module_name * rew_display
pj2m's avatar
pj2m committed
19
20
  | Node of Graph.t * module_name * (big_step * rew_display) list

bguillaum's avatar
bguillaum committed
21
(* the type for big edges which correspond to a module *)
pj2m's avatar
pj2m committed
22
23
24
25
26
and big_step = {
    first: rule_app;
    small_step: (Graph.t * rule_app) list;
  }

27
let to_dot_graph ?main_feat ?(deco=Deco.empty) graph = Graph.to_dot ?main_feat graph ~deco
pj2m's avatar
pj2m committed
28
let to_dep_graph ?main_feat ?(deco=Deco.empty) graph = Graph.to_dep ?main_feat ~deco graph 
bguillaum's avatar
bguillaum committed
29
let to_gr_graph graph = Graph.to_gr graph