core: import edu.neu.ccs.demeter.dj.*; import java.util.*; import java.lang.reflect.*; import edu.neu.ccs.demeter.*; add: class SubgraphVisitor 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 SubgraphVisitor() {{ super(); }} public constructor SubgraphVisitor(boolean is_equal) {{ super(); set_is_equal(is_equal); }} {{ private java.util.Stack history = new java.util.Stack(); public SubgraphVisitor(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_parts_list(Schema source, Parts_List dest) {{ if (is_equal) { Schema obj = (Schema) history.peek(); Object temp3 = obj.get_parts_list(); if(temp3==null) { is_equal = false; return; } history.push(temp3); } }} public void after_parts_list(Schema source, Parts_List dest) {{ if (is_equal) history.pop(); }} public void before(Schema host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp1 = host.get_string(); Object temp2 = ((Schema) obj).get_string(); if(temp1 == null && temp2 == null) {} else if(temp1 == null || temp2 == null || !temp1.equals(temp2)) { is_equal = false; return; } }} public void before(Parts host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Types host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_name(ComplexType source, Name dest) {{ if (is_equal) { ComplexType obj = (ComplexType) history.peek(); Object temp4 = obj.get_name(); if(temp4==null) { is_equal = false; return; } history.push(temp4); } }} public void after_name(ComplexType source, Name dest) {{ if (is_equal) history.pop(); }} public void before_sequence(ComplexType source, Sequence dest) {{ if (is_equal) { ComplexType obj = (ComplexType) history.peek(); Object temp5 = obj.get_sequence(); if(temp5==null) { is_equal = false; return; } history.push(temp5); } }} public void after_sequence(ComplexType source, Sequence dest) {{ if (is_equal) history.pop(); }} public void before_attribute(ComplexType source, Attribute dest) {{ if (is_equal) { ComplexType obj = (ComplexType) history.peek(); Object temp6 = obj.get_attribute(); if(temp6==null) { is_equal = false; return; } history.push(temp6); } }} public void after_attribute(ComplexType source, Attribute dest) {{ if (is_equal) history.pop(); }} public void before(ComplexType host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_name(Attribute source, Name dest) {{ if (is_equal) { Attribute obj = (Attribute) history.peek(); Object temp7 = obj.get_name(); if(temp7==null) { is_equal = false; return; } history.push(temp7); } }} public void after_name(Attribute source, Name dest) {{ if (is_equal) history.pop(); }} public void before_type(Attribute source, Type dest) {{ if (is_equal) { Attribute obj = (Attribute) history.peek(); Object temp8 = obj.get_type(); if(temp8==null) { is_equal = false; return; } history.push(temp8); } }} public void after_type(Attribute source, Type dest) {{ if (is_equal) history.pop(); }} public void before_endpart(Attribute source, EndPart dest) {{ if (is_equal) { Attribute obj = (Attribute) history.peek(); Object temp9 = obj.get_endpart(); if(temp9==null) { is_equal = false; return; } history.push(temp9); } }} public void after_endpart(Attribute source, EndPart dest) {{ if (is_equal) history.pop(); }} public void before(Attribute host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_parts_list(Sequence source, Parts_List dest) {{ if (is_equal) { Sequence obj = (Sequence) history.peek(); Object temp10 = obj.get_parts_list(); if(temp10==null) { is_equal = false; return; } history.push(temp10); } }} public void after_parts_list(Sequence source, Parts_List dest) {{ if (is_equal) history.pop(); }} public void before(Sequence host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_nameref(Element source, NameRef dest) {{ if (is_equal) { Element obj = (Element) history.peek(); Object temp11 = obj.get_nameref(); if(temp11==null) { is_equal = false; return; } history.push(temp11); } }} public void after_nameref(Element source, NameRef dest) {{ if (is_equal) history.pop(); }} public void before_elementparts_list(Element source, ElementParts_List dest) {{ if (is_equal) { Element obj = (Element) history.peek(); Object temp12 = obj.get_elementparts_list(); if(temp12==null) { is_equal = false; return; } history.push(temp12); } }} public void after_elementparts_list(Element source, ElementParts_List dest) {{ if (is_equal) history.pop(); }} public void before_elementendparts(Element source, ElementEndParts dest) {{ if (is_equal) { Element obj = (Element) history.peek(); Object temp13 = obj.get_elementendparts(); if(temp13==null) { is_equal = false; return; } history.push(temp13); } }} public void after_elementendparts(Element source, ElementEndParts dest) {{ if (is_equal) history.pop(); }} public void before(Element host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(NameRef host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(ElementParts host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(ElementEndParts host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_endpart(SimpleElementEnd source, EndPart dest) {{ if (is_equal) { SimpleElementEnd obj = (SimpleElementEnd) history.peek(); Object temp14 = obj.get_endpart(); if(temp14==null) { is_equal = false; return; } history.push(temp14); } }} public void after_endpart(SimpleElementEnd source, EndPart dest) {{ if (is_equal) history.pop(); }} public void before(SimpleElementEnd host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_types_list(ComplexElementEnd source, Types_List dest) {{ if (is_equal) { ComplexElementEnd obj = (ComplexElementEnd) history.peek(); Object temp15 = obj.get_types_list(); if(temp15==null) { is_equal = false; return; } history.push(temp15); } }} public void after_types_list(ComplexElementEnd source, Types_List dest) {{ if (is_equal) history.pop(); }} public void before(ComplexElementEnd host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_name(SimpleType source, Name dest) {{ if (is_equal) { SimpleType obj = (SimpleType) history.peek(); Object temp16 = obj.get_name(); if(temp16==null) { is_equal = false; return; } history.push(temp16); } }} public void after_name(SimpleType source, Name dest) {{ if (is_equal) history.pop(); }} public void before_restriction(SimpleType source, Restriction dest) {{ if (is_equal) { SimpleType obj = (SimpleType) history.peek(); Object temp17 = obj.get_restriction(); if(temp17==null) { is_equal = false; return; } history.push(temp17); } }} public void after_restriction(SimpleType source, Restriction dest) {{ if (is_equal) history.pop(); }} public void before(SimpleType host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_base(Restriction source, Base dest) {{ if (is_equal) { Restriction obj = (Restriction) history.peek(); Object temp18 = obj.get_base(); if(temp18==null) { is_equal = false; return; } history.push(temp18); } }} public void after_base(Restriction source, Base dest) {{ if (is_equal) history.pop(); }} public void before_simpleparts_list(Restriction source, SimpleParts_List dest) {{ if (is_equal) { Restriction obj = (Restriction) history.peek(); Object temp19 = obj.get_simpleparts_list(); if(temp19==null) { is_equal = false; return; } history.push(temp19); } }} public void after_simpleparts_list(Restriction source, SimpleParts_List dest) {{ if (is_equal) history.pop(); }} public void before(Restriction host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(SimpleParts host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Name host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp20 = host.get_string(); Object temp21 = ((Name) obj).get_string(); if(temp20 == null && temp21 == null) {} else if(temp20 == null || temp21 == null || !temp20.equals(temp21)) { is_equal = false; return; } }} public void before(Ref host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp22 = host.get_string(); Object temp23 = ((Ref) obj).get_string(); if(temp22 == null && temp23 == null) {} else if(temp22 == null || temp23 == null || !temp22.equals(temp23)) { is_equal = false; return; } }} public void before(Base host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp24 = host.get_string(); Object temp25 = ((Base) obj).get_string(); if(temp24 == null && temp25 == null) {} else if(temp24 == null || temp25 == null || !temp24.equals(temp25)) { is_equal = false; return; } }} public void before(Type host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp26 = host.get_string(); Object temp27 = ((Type) obj).get_string(); if(temp26 == null && temp27 == null) {} else if(temp26 == null || temp27 == null || !temp26.equals(temp27)) { is_equal = false; return; } }} public void before(MinOccurs host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp28 = host.get_string(); Object temp29 = ((MinOccurs) obj).get_string(); if(temp28 == null && temp29 == null) {} else if(temp28 == null || temp29 == null || !temp28.equals(temp29)) { is_equal = false; return; } }} public void before(MaxOccurs host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp30 = host.get_string(); Object temp31 = ((MaxOccurs) obj).get_string(); if(temp30 == null && temp31 == null) {} else if(temp30 == null || temp31 == null || !temp30.equals(temp31)) { is_equal = false; return; } }} public void before_value(MinExclusive source, Value dest) {{ if (is_equal) { MinExclusive obj = (MinExclusive) history.peek(); Object temp32 = obj.get_value(); if(temp32==null) { is_equal = false; return; } history.push(temp32); } }} public void after_value(MinExclusive source, Value dest) {{ if (is_equal) history.pop(); }} public void before_endpart(MinExclusive source, EndPart dest) {{ if (is_equal) { MinExclusive obj = (MinExclusive) history.peek(); Object temp33 = obj.get_endpart(); if(temp33==null) { is_equal = false; return; } history.push(temp33); } }} public void after_endpart(MinExclusive source, EndPart dest) {{ if (is_equal) history.pop(); }} public void before(MinExclusive host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_value(MaxExclusive source, Value dest) {{ if (is_equal) { MaxExclusive obj = (MaxExclusive) history.peek(); Object temp34 = obj.get_value(); if(temp34==null) { is_equal = false; return; } history.push(temp34); } }} public void after_value(MaxExclusive source, Value dest) {{ if (is_equal) history.pop(); }} public void before_endpart(MaxExclusive source, EndPart dest) {{ if (is_equal) { MaxExclusive obj = (MaxExclusive) history.peek(); Object temp35 = obj.get_endpart(); if(temp35==null) { is_equal = false; return; } history.push(temp35); } }} public void after_endpart(MaxExclusive source, EndPart dest) {{ if (is_equal) history.pop(); }} public void before(MaxExclusive host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_value(MinInclusive source, Value dest) {{ if (is_equal) { MinInclusive obj = (MinInclusive) history.peek(); Object temp36 = obj.get_value(); if(temp36==null) { is_equal = false; return; } history.push(temp36); } }} public void after_value(MinInclusive source, Value dest) {{ if (is_equal) history.pop(); }} public void before_endpart(MinInclusive source, EndPart dest) {{ if (is_equal) { MinInclusive obj = (MinInclusive) history.peek(); Object temp37 = obj.get_endpart(); if(temp37==null) { is_equal = false; return; } history.push(temp37); } }} public void after_endpart(MinInclusive source, EndPart dest) {{ if (is_equal) history.pop(); }} public void before(MinInclusive host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_value(MaxInclusive source, Value dest) {{ if (is_equal) { MaxInclusive obj = (MaxInclusive) history.peek(); Object temp38 = obj.get_value(); if(temp38==null) { is_equal = false; return; } history.push(temp38); } }} public void after_value(MaxInclusive source, Value dest) {{ if (is_equal) history.pop(); }} public void before_endpart(MaxInclusive source, EndPart dest) {{ if (is_equal) { MaxInclusive obj = (MaxInclusive) history.peek(); Object temp39 = obj.get_endpart(); if(temp39==null) { is_equal = false; return; } history.push(temp39); } }} public void after_endpart(MaxInclusive source, EndPart dest) {{ if (is_equal) history.pop(); }} public void before(MaxInclusive host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before(Value host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; Object temp40 = host.get_string(); Object temp41 = ((Value) obj).get_string(); if(temp40 == null && temp41 == null) {} else if(temp40 == null || temp41 == null || !temp40.equals(temp41)) { is_equal = false; return; } }} public void before(EndPart 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 temp42 = host.get_copy(); Object temp43 = ((CopyVisitor) obj).get_copy(); if(temp42 == null && temp43 == null) {} else if(temp42 == null || temp43 == null || !temp42.equals(temp43)) { 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(Parts_List source, Nonempty_Parts_List dest) {{ if (is_equal) { Parts_List obj = (Parts_List) history.peek(); Object temp44 = obj.get_first(); if(temp44==null) { is_equal = false; return; } history.push(temp44); } }} public void after_first(Parts_List source, Nonempty_Parts_List dest) {{ if (is_equal) history.pop(); }} public void before(Parts_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(ElementParts_List source, Nonempty_ElementParts_List dest) {{ if (is_equal) { ElementParts_List obj = (ElementParts_List) history.peek(); Object temp45 = obj.get_first(); if(temp45==null) { is_equal = false; return; } history.push(temp45); } }} public void after_first(ElementParts_List source, Nonempty_ElementParts_List dest) {{ if (is_equal) history.pop(); }} public void before(ElementParts_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(Types_List source, Nonempty_Types_List dest) {{ if (is_equal) { Types_List obj = (Types_List) history.peek(); Object temp46 = obj.get_first(); if(temp46==null) { is_equal = false; return; } history.push(temp46); } }} public void after_first(Types_List source, Nonempty_Types_List dest) {{ if (is_equal) history.pop(); }} public void before(Types_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_first(SimpleParts_List source, Nonempty_SimpleParts_List dest) {{ if (is_equal) { SimpleParts_List obj = (SimpleParts_List) history.peek(); Object temp47 = obj.get_first(); if(temp47==null) { is_equal = false; return; } history.push(temp47); } }} public void after_first(SimpleParts_List source, Nonempty_SimpleParts_List dest) {{ if (is_equal) history.pop(); }} public void before(SimpleParts_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_Parts_List source, Parts dest) {{ if (is_equal) { Nonempty_Parts_List obj = (Nonempty_Parts_List) history.peek(); Object temp48 = obj.get_it(); if(temp48==null) { is_equal = false; return; } history.push(temp48); } }} public void after_it(Nonempty_Parts_List source, Parts dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_Parts_List source, Nonempty_Parts_List dest) {{ if (is_equal) { Nonempty_Parts_List obj = (Nonempty_Parts_List) history.peek(); Object temp49 = obj.get_next(); if(temp49==null) { is_equal = false; return; } history.push(temp49); } }} public void after_next(Nonempty_Parts_List source, Nonempty_Parts_List dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_Parts_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_ElementParts_List source, ElementParts dest) {{ if (is_equal) { Nonempty_ElementParts_List obj = (Nonempty_ElementParts_List) history.peek(); Object temp50 = obj.get_it(); if(temp50==null) { is_equal = false; return; } history.push(temp50); } }} public void after_it(Nonempty_ElementParts_List source, ElementParts dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_ElementParts_List source, Nonempty_ElementParts_List dest) {{ if (is_equal) { Nonempty_ElementParts_List obj = (Nonempty_ElementParts_List) history.peek(); Object temp51 = obj.get_next(); if(temp51==null) { is_equal = false; return; } history.push(temp51); } }} public void after_next(Nonempty_ElementParts_List source, Nonempty_ElementParts_List dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_ElementParts_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_Types_List source, Types dest) {{ if (is_equal) { Nonempty_Types_List obj = (Nonempty_Types_List) history.peek(); Object temp52 = obj.get_it(); if(temp52==null) { is_equal = false; return; } history.push(temp52); } }} public void after_it(Nonempty_Types_List source, Types dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_Types_List source, Nonempty_Types_List dest) {{ if (is_equal) { Nonempty_Types_List obj = (Nonempty_Types_List) history.peek(); Object temp53 = obj.get_next(); if(temp53==null) { is_equal = false; return; } history.push(temp53); } }} public void after_next(Nonempty_Types_List source, Nonempty_Types_List dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_Types_List host) {{ Object obj = history.peek(); is_equal = is_equal && obj.getClass().equals(host.getClass()); if(!is_equal) return; }} public void before_it(Nonempty_SimpleParts_List source, SimpleParts dest) {{ if (is_equal) { Nonempty_SimpleParts_List obj = (Nonempty_SimpleParts_List) history.peek(); Object temp54 = obj.get_it(); if(temp54==null) { is_equal = false; return; } history.push(temp54); } }} public void after_it(Nonempty_SimpleParts_List source, SimpleParts dest) {{ if (is_equal) history.pop(); }} public void before_next(Nonempty_SimpleParts_List source, Nonempty_SimpleParts_List dest) {{ if (is_equal) { Nonempty_SimpleParts_List obj = (Nonempty_SimpleParts_List) history.peek(); Object temp55 = obj.get_next(); if(temp55==null) { is_equal = false; return; } history.push(temp55); } }} public void after_next(Nonempty_SimpleParts_List source, Nonempty_SimpleParts_List dest) {{ if (is_equal) history.pop(); }} public void before(Nonempty_SimpleParts_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_); } }} }