26.09.2013 Views

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Value D e c l a r a t i o n<br />

value_decl returns [ ValueDecl vd ] {<br />

vd = null ;<br />

RSLListDefault<br />

v a l u e _ d e f _ l i s t =<br />

new RSLListDefault() ;<br />

ValueDef def ;<br />

}<br />

: def = value_def<br />

{ v a l u e _ d e f _ l i s t . g e t L i s t ( ) . add ( def ) ; }<br />

(<br />

COMMA def = value_def<br />

{ v a l u e _ d e f _ l i s t . g e t L i s t ( ) . add ( def ) ; }<br />

) ∗<br />

{vd = new ValueDecl ( v a l u e _ d e f _ l i s t ) ; }<br />

;<br />

value_def returns [ ValueDef vd ] {<br />

vd = null ;<br />

SingleTyping s t = null ;<br />

}<br />

: s t = s i n g l e _ t y p i n g<br />

(<br />

vd = e x p l i c i t _ f u n c t i o n _ d e f [ s t ]<br />

|<br />

vd = e x p l i c i t _ v a l u e _ d e f [ s t ]<br />

)<br />

;<br />

e x p l i c i t _ v a l u e _ d e f [ SingleTyping s t ] returns [ ExplicitValueDef evd ] {<br />

evd = null ;<br />

ValueExpr ve = null ;<br />

}<br />

: EQUAL ve = value_expr<br />

{evd = new ExplicitValueDef ( st , ve ) ; }<br />

;<br />

e x p l i c i t _ f u n c t i o n _ d e f [ SingleTyping s t ]<br />

returns [ E x p l i c i t F u n c t i o n D e f efd ] {<br />

efd = null ;<br />

I d A p p l i c a t i o n i a = null ;<br />

ValueExpr ve = null ;<br />

ValueExpr cond = null ;<br />

OptionalPreCondition ocond = null ;<br />

}<br />

: i a = i d _ a p p l i c a t i o n IS ve = value_expr<br />

(PRE cond = value_expr ) ?<br />

{<br />

i f ( cond == null ) {<br />

483

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

Saved successfully!

Ooh no, something went wrong!