1 #ifndef _EXT_GRS_MATCH_T_H_
2 #define _EXT_GRS_MATCH_T_H_
5 * Project: libFIRM/extension module/graph rewriting system
6 * File name: ext/grs/match_t.h
7 * Purpose: provides the libfirm internal version of the interface
8 * for subgraph matching
10 * Created: 7. Junly 2005
12 * Copyright: (c) 2005 Universität Karlsruhe
13 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
17 #include "matchplan_t.h"
22 /** graph matching result */
23 struct _ext_grs_match_t {
24 /** the action this match belongs to */
25 ext_grs_action_t *action;
26 /** the host graph matched in */
28 /** flag: match valid */
30 /** the number of matches found */
32 /** the number of nodes in each match */
34 /** the number of edges in each match */
36 /** maximum node id in this match */
38 /** maximum edge id in this match */
40 /** array of arrays, each mapping node/edge ids to (ir_node*),
41 * the length is max_node_id + 1 */
43 /** array of arrays, each mapping edge ids to (ir_node*),
44 * the length is max_edge_id + 1 */
45 const ir_edge_t ***edges;
46 /** array of arrays, each mapping replace_node/edge ids to (ir_node*) */
47 ir_node ***repl_nodes;
48 /** internal obstack of the match object */
52 /** wraps initial bindings for pivoted graph matching */
53 struct _ext_grs_binding_t {
54 /** number of bound host graph fragments */
56 /** number of involved pattern nodes */
58 /** number of involved pattern edges */
60 /** the bound pattern nodes */
61 ext_grs_node_t *pat_nodes;
62 /** the bound pattern edges */
63 ext_grs_edge_t *pat_edges;
64 /** the ir nodes bound to the pattern nodes given by their index (node map) */
66 /** the ir edges bound to the pattern edges given by their index (edge map) */
71 void _ext_grs_match_init(void);
75 #endif /*_EXT_GRS_MATCH_T_H_*/