Commit ca3d349c authored by Bruno Guillaume's avatar Bruno Guillaume

Clean unused code (step 4)

parent a3e8999b
......@@ -153,25 +153,6 @@ module Command = struct
]
)]
(* a item in the command history: command applied to a graph *)
type h =
| H_DEL_NODE of Gid.t
| H_DEL_EDGE_EXPL of (Gid.t * Gid.t * G_edge.t)
| H_DEL_EDGE_NAME of string
| H_ADD_EDGE of (Gid.t * Gid.t * G_edge.t)
| H_ADD_EDGE_EXPL of (Gid.t * Gid.t * string)
| H_DEL_FEAT of (Gid.t * string)
| H_UPDATE_FEAT of (Gid.t * string * string)
| H_NEW_NODE of string
| H_NEW_BEFORE of (string * Gid.t)
| H_NEW_AFTER of (string * Gid.t)
| H_SHIFT_EDGE of (Gid.t * Gid.t)
| H_SHIFT_IN of (Gid.t * Gid.t)
| H_SHIFT_OUT of (Gid.t * Gid.t)
let build ?domain ?param lexicons (kni, kei) table ast_command =
(* kni stands for "known node idents", kei for "known edge idents" *)
......
......@@ -46,22 +46,6 @@ module Command : sig
type t = (p * Loc.t)
val to_json: ?domain:Domain.t -> t -> Yojson.Basic.json
type h =
| H_DEL_NODE of Gid.t
| H_DEL_EDGE_EXPL of (Gid.t * Gid.t *G_edge.t)
| H_DEL_EDGE_NAME of string
| H_ADD_EDGE of (Gid.t * Gid.t * G_edge.t)
| H_ADD_EDGE_EXPL of (Gid.t * Gid.t * string)
| H_DEL_FEAT of (Gid.t *string)
| H_UPDATE_FEAT of (Gid.t * string * string)
| H_NEW_NODE of string
| H_NEW_BEFORE of (string * Gid.t)
| H_NEW_AFTER of (string * Gid.t)
| H_SHIFT_EDGE of (Gid.t * Gid.t)
| H_SHIFT_IN of (Gid.t * Gid.t)
| H_SHIFT_OUT of (Gid.t * Gid.t)
val build:
?domain: Domain.t ->
......
......@@ -236,7 +236,7 @@ module Grs = struct
(* Rewriting in the deterministic case with graph type *)
(* ============================================================================================= *)
(* apply a package to an instance = apply only top level rules in the package *)
(* apply a package to an graph = apply only top level rules in the package *)
let onf_pack_rewrite ?domain decl_list graph =
let rec loop = function
| [] -> None
......@@ -307,7 +307,7 @@ module Grs = struct
(* Rewriting in the non-deterministic case with Graph_with_history.t type *)
(* ============================================================================================= *)
(* apply a package to an instance = apply only top level rules in the package *)
(* apply a package to an graph_with_history = apply only top level rules in the package *)
let gwh_pack_rewrite ?domain decl_list gwh =
List.fold_left
(fun acc decl -> match decl with
......
This diff is collapsed.
......@@ -18,40 +18,6 @@ open Grew_edge
open Grew_fs
open Grew_ast
(* ================================================================================ *)
module Instance : sig
type t = {
graph: G_graph.t;
history: Command.h list;
rules: string list;
big_step: Libgrew_types.big_step option;
}
val swap: t -> t
(** [from_graph graph] return a fresh instance based on the input [graph]. *)
val from_graph: G_graph.t -> t
(** [rev_steps t] reverses the small step list: during rewriting, the last rule
is in the head of the list and the reverse is needed for display. *)
val rev_steps: t -> t
(** [refresh t] returns a fresh representation of the graph.
Graphs are refreshed after each module. *)
val refresh: t -> t
(** [to_gr t] returns a string which contains the "gr" code of the current graph *)
val to_gr: t -> string
(** [to_conll_string t] returns a string which contains the "conll" code of the current graph *)
val to_conll_string: t -> string
(** [save_dot_png base t] writes a file "base.png" with the dot representation of [t] *)
val save_dot_png: ?filter: (string -> bool) -> ?main_feat: string -> string -> t -> unit
end (* module Instance *)
(* ================================================================================ *)
module Instance_set : Set.S with type elt = Instance.t
(* ================================================================================ *)
module Rule : sig
......@@ -82,18 +48,6 @@ module Rule : sig
[dir] is used for localisation of lp files *)
val build: ?domain:Domain.t -> string -> Ast.rule -> t
(** [normalize domain module_name ?deterministic rule_list instance] returns a set of normal forms *)
(* raise Stop if some command fails to apply *)
val normalize:
?domain:Domain.t ->
string -> (* module name *)
?deterministic:bool ->
t list -> (* rule list *)
Instance.t ->
Instance_set.t
val one_step: ?domain: Domain.t -> Instance.t -> t list -> Instance_set.t
val conf_one_step: ?domain: Domain.t -> Instance.t -> t list -> Instance.t option
(** the type matching encodes the graph morphism from a pattern to a graph *)
(* NB: it was made public for the grep mode *)
......@@ -119,9 +73,6 @@ module Rule : sig
val apply: ?domain: Domain.t -> t -> Instance.t -> Instance_set.t
val det_apply: ?domain: Domain.t -> t -> Instance.t -> Instance.t option
val wrd_apply: ?domain: Domain.t -> t -> (G_graph.t * Libgrew_types.big_step option) -> (G_graph.t * Libgrew_types.big_step) option
val onf_apply: ?domain: Domain.t -> t -> G_graph.t -> G_graph.t option
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment