Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...

26.09.2013 Views

APPENDIX F. SOURCE CODE } public void v i s i t V a l u e E x p r P a i r L i s t ( ValueExprPairList vepl ) { for ( ValueExprPair vep : vepl . p a i r _ l i s t ( ) . g e t L i s t ( ) ) { vep . accept ( this ) ; r e s u l t . append ( " , " ) ; } i f ( vepl . p a i r _ l i s t ( ) . l e n ( ) > 0) { r e s u l t . d e l e t e ( r e s u l t . length ( ) − 2 , r e s u l t . length ( ) ) ; } } public void visitNoValueExprPairList ( NoValueExprPairList nvel ) {} public void visitPLUS (PLUS r s l _ p l u s ) { r e s u l t . append ( "+" ) ; } public void visitMINUS (MINUS rsl_minus ) { r e s u l t . append ( "−" ) ; } public void visitEQUAL (EQUAL r sl_equal ) { r e s u l t . append ( "=" ) ; } public void visitNOTEQUAL(NOTEQUAL rsl_notequal ) { r e s u l t . append ( "~=" ) ; } public void visitLT (LT r s l _ l t ) { r e s u l t . append ( "" ) ; } public void visitLTE (LTE r s l _ l t e ) { r e s u l t . append ( "=" ) ; } public void visitHAT (HAT rsl_hat ) { r e s u l t . append ( "^" ) ; } 546

public void visitSTAR (STAR r s l _ s t a r ) { r e s u l t . append ( "∗" ) ; } public void visitSLASH (SLASH r s l _ s l a s h ) { r e s u l t . append ( "/" ) ; } F.2. VISITOR MODULES public void visitBACKSLASH (BACKSLASH r s l _ b a c k s l a s h ) { r e s u l t . append ( "\\" ) ; } public void visitEXP (EXP rsl_exp ) { r e s u l t . append ( "∗∗" ) ; } public void visitSUBSET (SUBSET r s l _ s u b s e t ) { r e s u l t . append ( "" ) ; } public void visitMEMBER(MEMBER rsl_member ) { r e s u l t . append ( " i s i n " ) ; } public void visitNOTMEMBER(NOTMEMBER rsl_notMEMBER) { r e s u l t . append ( "~ i s i n " ) ; } public void visitUNION (UNION rsl_union ) { r e s u l t . append ( " union " ) ; } public void visitINTER (INTER r s l _ i n t e r ) { r e s u l t . append ( " i n t e r " ) ; } 547

public void visitSTAR (STAR r s l _ s t a r ) {<br />

r e s u l t . append ( "∗" ) ;<br />

}<br />

public void visitSLASH (SLASH r s l _ s l a s h ) {<br />

r e s u l t . append ( "/" ) ;<br />

}<br />

F.2. VISITOR MODULES<br />

public void visitBACKSLASH (BACKSLASH r s l _ b a c k s l a s h ) {<br />

r e s u l t . append ( "\\" ) ;<br />

}<br />

public void visitEXP (EXP rsl_exp ) {<br />

r e s u l t . append ( "∗∗" ) ;<br />

}<br />

public void visitSUBSET (SUBSET r s l _ s u b s e t ) {<br />

r e s u l t . append ( "" ) ;<br />

}<br />

public void visitMEMBER(MEMBER rsl_member ) {<br />

r e s u l t . append ( " i s i n " ) ;<br />

}<br />

public void visitNOTMEMBER(NOTMEMBER rsl_notMEMBER) {<br />

r e s u l t . append ( "~ i s i n " ) ;<br />

}<br />

public void visitUNION (UNION rsl_union ) {<br />

r e s u l t . append ( " union " ) ;<br />

}<br />

public void visitINTER (INTER r s l _ i n t e r ) {<br />

r e s u l t . append ( " i n t e r " ) ;<br />

}<br />

547

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!