core: import edu.neu.ccs.demeter.dj.*; import java.util.*; import edu.neu.ccs.demeter.*; add: class EqualVisitor extends UniversalVisitor { protected boolean is_equal = {{ true }}; public boolean get_is_equal() {{ return is_equal; }} public void set_is_equal(boolean new_is_equal) {{ is_equal = new_is_equal; }} public constructor EqualVisitor() {{ super(); }} public constructor EqualVisitor(boolean is_equal) {{ super(); set_is_equal(is_equal); }} {{ private java.util.Stack history = new java.util.Stack(); public EqualVisitor(Object obj) { history.push(obj); } }} public void before(Main host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_adjacencies(Cd_graph source, Adjacency_Nlist dest) {{ if (is_equal) { Cd_graph obj = (Cd_graph) history.peek(); Object temp1 = obj.get_adjacencies(); if(temp1==null) { is_equal = false; return; } history.push(temp1); } }} public void after_adjacencies(Cd_graph source, Adjacency_Nlist dest) {{ if (is_equal) history.pop(); }} public void before(Cd_graph host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_source(Adjacency source, Vertex dest) {{ if (is_equal) { Adjacency obj = (Adjacency) history.peek(); Object temp2 = obj.get_source(); if(temp2==null) { is_equal = false; return; } history.push(temp2); } }} public void after_source(Adjacency source, Vertex dest) {{ if (is_equal) history.pop(); }} public void before_ns(Adjacency source, Neighbors dest) {{ if (is_equal) { Adjacency obj = (Adjacency) history.peek(); Object temp3 = obj.get_ns(); if(temp3==null) { is_equal = false; return; } history.push(temp3); } }} public void after_ns(Adjacency source, Neighbors dest) {{ if (is_equal) history.pop(); }} public void before_supers(Adjacency source, SuperClasses dest) {{ if (is_equal) { Adjacency obj = (Adjacency) history.peek(); Object temp4 = obj.get_supers(); if(temp4==null) { is_equal = false; return; } history.push(temp4); } }} public void after_supers(Adjacency source, SuperClasses dest) {{ if (is_equal) history.pop(); }} public void before(Adjacency host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_superclass_comma_list(SuperClasses source, SuperClass_Comma_list dest) {{ if (is_equal) { SuperClasses obj = (SuperClasses) history.peek(); Object temp5 = obj.get_superclass_comma_list(); if(temp5==null) { is_equal = false; return; } history.push(temp5); } }} public void after_superclass_comma_list(SuperClasses source, SuperClass_Comma_list dest) {{ if (is_equal) history.pop(); }} public void before(SuperClasses host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(SuperClass host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp6 = host.get_super_name(); Object temp7 = ((SuperClass) obj).get_super_name(); if(temp6 == null && temp7 == null) {} else if(temp6 == null || temp7 == null || !temp6.equals(temp7)) { is_equal = false; return; } }} public void before(Neighbors host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_construct_ns(Neighbors_wc source, Any_vertex_List dest) {{ if (is_equal) { Neighbors_wc obj = (Neighbors_wc) history.peek(); Object temp8 = obj.get_construct_ns(); if(temp8==null) { is_equal = false; return; } history.push(temp8); } }} public void after_construct_ns(Neighbors_wc source, Any_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before(Neighbors_wc host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Construct_ns host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_alternat_ns(Alternat_ns source, Term_Bar_list dest) {{ if (is_equal) { Alternat_ns obj = (Alternat_ns) history.peek(); Object temp9 = obj.get_alternat_ns(); if(temp9==null) { is_equal = false; return; } history.push(temp9); } }} public void after_alternat_ns(Alternat_ns source, Term_Bar_list dest) {{ if (is_equal) history.pop(); }} public void before_common(Alternat_ns source, Common dest) {{ if (is_equal) { Alternat_ns obj = (Alternat_ns) history.peek(); Object temp10 = obj.get_common(); if(temp10==null) { is_equal = false; return; } history.push(temp10); } }} public void after_common(Alternat_ns source, Common dest) {{ if (is_equal) history.pop(); }} public void before(Alternat_ns host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Common host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Any_vertex host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Vertex host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp11 = host.get_vertex_name(); Object temp12 = ((Vertex) obj).get_vertex_name(); if(temp11 == null && temp12 == null) {} else if(temp11 == null || temp12 == null || !temp11.equals(temp12)) { is_equal = false; return; } }} public void before(Syntax_vertex host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Regular_syntax host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp13 = host.get_string(); Object temp14 = ((Regular_syntax) obj).get_string(); if(temp13 == null && temp14 == null) {} else if(temp13 == null || temp14 == null || !temp13.equals(temp14)) { is_equal = false; return; } }} public void before_vertex(Opt_labeled_term source, Term dest) {{ if (is_equal) { Opt_labeled_term obj = (Opt_labeled_term) history.peek(); Object temp15 = obj.get_vertex(); if(temp15==null) { is_equal = false; return; } history.push(temp15); } }} public void after_vertex(Opt_labeled_term source, Term dest) {{ if (is_equal) history.pop(); }} public void before(Opt_labeled_term host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Regular host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Labeled host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp16 = host.get_label_name(); Object temp17 = ((Labeled) obj).get_label_name(); if(temp16 == null && temp17 == null) {} else if(temp16 == null || temp17 == null || !temp16.equals(temp17)) { is_equal = false; return; } }} public void before_vertex(Term source, Vertex dest) {{ if (is_equal) { Term obj = (Term) history.peek(); Object temp18 = obj.get_vertex(); if(temp18==null) { is_equal = false; return; } history.push(temp18); } }} public void after_vertex(Term source, Vertex dest) {{ if (is_equal) history.pop(); }} public void before(Term host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Normal host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_opt(Optional_term source, Opt_labeled_term_Sandwich dest) {{ if (is_equal) { Optional_term obj = (Optional_term) history.peek(); Object temp19 = obj.get_opt(); if(temp19==null) { is_equal = false; return; } history.push(temp19); } }} public void after_opt(Optional_term source, Opt_labeled_term_Sandwich dest) {{ if (is_equal) history.pop(); }} public void before(Optional_term host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(PrintVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; is_equal = is_equal && host.get_indent() == ((PrintVisitor) obj).get_indent(); is_equal = is_equal && host.get_needSpace() == ((PrintVisitor) obj).get_needSpace(); }} public void before(CopyVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp20 = host.get_copy(); Object temp21 = ((CopyVisitor) obj).get_copy(); if(temp20 == null && temp21 == null) {} else if(temp20 == null || temp21 == null || !temp20.equals(temp21)) { is_equal = false; return; } }} public void before(SubgraphVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; is_equal = is_equal && host.get_is_equal() == ((SubgraphVisitor) obj).get_is_equal(); }} public void before(EqualVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; is_equal = is_equal && host.get_is_equal() == ((EqualVisitor) obj).get_is_equal(); }} public void before(DisplayVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; is_equal = is_equal && host.get_indent() == ((DisplayVisitor) obj).get_indent(); }} public void before(TraceVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; is_equal = is_equal && host.get_indent() == ((TraceVisitor) obj).get_indent(); }} public void before(UniversalVisitor host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(Adjacency_Nlist source, Nonempty_Adjacency_Nlist dest) {{ if (is_equal) { Adjacency_Nlist obj = (Adjacency_Nlist) history.peek(); Object temp22 = obj.get_first(); if(temp22==null) { is_equal = false; return; } history.push(temp22); } }} public void after_first(Adjacency_Nlist source, Nonempty_Adjacency_Nlist dest) {{ if (is_equal) history.pop(); }} public void before(Adjacency_Nlist host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(SuperClass_Comma_list source, Nonempty_SuperClass_Comma_list dest) {{ if (is_equal) { SuperClass_Comma_list obj = (SuperClass_Comma_list) history.peek(); Object temp23 = obj.get_first(); if(temp23==null) { is_equal = false; return; } history.push(temp23); } }} public void after_first(SuperClass_Comma_list source, Nonempty_SuperClass_Comma_list dest) {{ if (is_equal) history.pop(); }} public void before(SuperClass_Comma_list host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(Any_vertex_List source, Nonempty_Any_vertex_List dest) {{ if (is_equal) { Any_vertex_List obj = (Any_vertex_List) history.peek(); Object temp24 = obj.get_first(); if(temp24==null) { is_equal = false; return; } history.push(temp24); } }} public void after_first(Any_vertex_List source, Nonempty_Any_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before(Any_vertex_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(Term_Bar_list source, Nonempty_Term_Bar_list dest) {{ if (is_equal) { Term_Bar_list obj = (Term_Bar_list) history.peek(); Object temp25 = obj.get_first(); if(temp25==null) { is_equal = false; return; } history.push(temp25); } }} public void after_first(Term_Bar_list source, Nonempty_Term_Bar_list dest) {{ if (is_equal) history.pop(); }} public void before(Term_Bar_list host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(Opt_labeled_term_Sandwich source, Syntax_vertex_List dest) {{ if (is_equal) { Opt_labeled_term_Sandwich obj = (Opt_labeled_term_Sandwich) history.peek(); Object temp26 = obj.get_first(); if(temp26==null) { is_equal = false; return; } history.push(temp26); } }} public void after_first(Opt_labeled_term_Sandwich source, Syntax_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before_inner(Opt_labeled_term_Sandwich source, Opt_labeled_term dest) {{ if (is_equal) { Opt_labeled_term_Sandwich obj = (Opt_labeled_term_Sandwich) history.peek(); Object temp27 = obj.get_inner(); if(temp27==null) { is_equal = false; return; } history.push(temp27); } }} public void after_inner(Opt_labeled_term_Sandwich source, Opt_labeled_term dest) {{ if (is_equal) history.pop(); }} public void before_second(Opt_labeled_term_Sandwich source, Syntax_vertex_List dest) {{ if (is_equal) { Opt_labeled_term_Sandwich obj = (Opt_labeled_term_Sandwich) history.peek(); Object temp28 = obj.get_second(); if(temp28==null) { is_equal = false; return; } history.push(temp28); } }} public void after_second(Opt_labeled_term_Sandwich source, Syntax_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before(Opt_labeled_term_Sandwich host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(Syntax_vertex_List source, Nonempty_Syntax_vertex_List dest) {{ if (is_equal) { Syntax_vertex_List obj = (Syntax_vertex_List) history.peek(); Object temp29 = obj.get_first(); if(temp29==null) { is_equal = false; return; } history.push(temp29); } }} public void after_first(Syntax_vertex_List source, Nonempty_Syntax_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before(Syntax_vertex_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_Adjacency_Nlist source, Adjacency dest) {{ if (is_equal) { Nonempty_Adjacency_Nlist obj = (Nonempty_Adjacency_Nlist) history.peek(); Object temp30 = obj.get_it(); if(temp30==null) { is_equal = false; return; } history.push(temp30); } }} public void after_it(Nonempty_Adjacency_Nlist source, Adjacency dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_Adjacency_Nlist source, Nonempty_Adjacency_Nlist dest) {{ if (is_equal) { Nonempty_Adjacency_Nlist obj = (Nonempty_Adjacency_Nlist) history.peek(); Object temp31 = obj.get_next(); if(temp31==null) { is_equal = false; return; } history.push(temp31); } }} public void after_next(Nonempty_Adjacency_Nlist source, Nonempty_Adjacency_Nlist dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_Adjacency_Nlist host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_SuperClass_Comma_list source, SuperClass dest) {{ if (is_equal) { Nonempty_SuperClass_Comma_list obj = (Nonempty_SuperClass_Comma_list) history.peek(); Object temp32 = obj.get_it(); if(temp32==null) { is_equal = false; return; } history.push(temp32); } }} public void after_it(Nonempty_SuperClass_Comma_list source, SuperClass dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_SuperClass_Comma_list source, Nonempty_SuperClass_Comma_list dest) {{ if (is_equal) { Nonempty_SuperClass_Comma_list obj = (Nonempty_SuperClass_Comma_list) history.peek(); Object temp33 = obj.get_next(); if(temp33==null) { is_equal = false; return; } history.push(temp33); } }} public void after_next(Nonempty_SuperClass_Comma_list source, Nonempty_SuperClass_Comma_list dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_SuperClass_Comma_list host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_Any_vertex_List source, Any_vertex dest) {{ if (is_equal) { Nonempty_Any_vertex_List obj = (Nonempty_Any_vertex_List) history.peek(); Object temp34 = obj.get_it(); if(temp34==null) { is_equal = false; return; } history.push(temp34); } }} public void after_it(Nonempty_Any_vertex_List source, Any_vertex dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_Any_vertex_List source, Nonempty_Any_vertex_List dest) {{ if (is_equal) { Nonempty_Any_vertex_List obj = (Nonempty_Any_vertex_List) history.peek(); Object temp35 = obj.get_next(); if(temp35==null) { is_equal = false; return; } history.push(temp35); } }} public void after_next(Nonempty_Any_vertex_List source, Nonempty_Any_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_Any_vertex_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_Term_Bar_list source, Term dest) {{ if (is_equal) { Nonempty_Term_Bar_list obj = (Nonempty_Term_Bar_list) history.peek(); Object temp36 = obj.get_it(); if(temp36==null) { is_equal = false; return; } history.push(temp36); } }} public void after_it(Nonempty_Term_Bar_list source, Term dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_Term_Bar_list source, Nonempty_Term_Bar_list dest) {{ if (is_equal) { Nonempty_Term_Bar_list obj = (Nonempty_Term_Bar_list) history.peek(); Object temp37 = obj.get_next(); if(temp37==null) { is_equal = false; return; } history.push(temp37); } }} public void after_next(Nonempty_Term_Bar_list source, Nonempty_Term_Bar_list dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_Term_Bar_list host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_Syntax_vertex_List source, Syntax_vertex dest) {{ if (is_equal) { Nonempty_Syntax_vertex_List obj = (Nonempty_Syntax_vertex_List) history.peek(); Object temp38 = obj.get_it(); if(temp38==null) { is_equal = false; return; } history.push(temp38); } }} public void after_it(Nonempty_Syntax_vertex_List source, Syntax_vertex dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_Syntax_vertex_List source, Nonempty_Syntax_vertex_List dest) {{ if (is_equal) { Nonempty_Syntax_vertex_List obj = (Nonempty_Syntax_vertex_List) history.peek(); Object temp39 = obj.get_next(); if(temp39==null) { is_equal = false; return; } history.push(temp39); } }} public void after_next(Nonempty_Syntax_vertex_List source, Nonempty_Syntax_vertex_List dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_Syntax_vertex_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} boolean get_return_val() {{ return is_equal ; }} {{ void universal_trv0_bef(UniversalVisitor _v_) { super.universal_trv0_bef(_v_); } }} {{ void universal_trv0_aft(UniversalVisitor _v_) { super.universal_trv0_aft(_v_); } }} {{ void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); super.universal_trv0(_v_); universal_trv0_aft(_v_); } }} }