Transformation of Applicative Specifications into Imperative ...

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

26.09.2013 Views

APPENDIX D. SPECIFICATION OF TRANSFORMER IN RSL1 getSequencingAccess : ValueExpr × TypeExpr × ExpType × TRANS × FUNC → Access ∗ getSequencingAccess(ve, te, et, trans, func) ≡ if and( and( isTGen(ve, trans, func), not(returnsNonTOI(ve, et, trans, func))), not(equalsType(te, et))) then getTOIReturnsListTN(te, trans) else 〈〉 end, getAccessObsSetExpr : Id ∗ × SetExpr × ExpType × FUNC × TRANS → AccessResult getAccessObsSetExpr(idset, se, et, func, trans) ≡ case se of RangedSetExpr(fve, sve) → getAccessObsListList( idset, 〈fve, sve〉, 〈et, et〉, func, trans), EnumeratedSetExpr(ovel) → getAccessObsOptVEL(idset, ovel, et, func, trans), ComprehendedSetExpr(ve, typlist, or) → mk_AccessResult( removeDuplets( accessList( getAccessObs(idset, ve, et, func, trans) ) accessList( getAccessObsList( getAccessIdSet( getAccessObs( idset, ve, et, func, trans)), getVEOptRestriction(or), Known(TypeLiteral(BOOL)), func, trans ))), getAccessIdSet( getAccessObsList( getAccessIdSet( getAccessObs( idset, ve, et, func, trans)), getVEOptRestriction(or), 428

D.2. FORMAL SPECIFICATION OF THE TRANSFORMER IN RSL1 end, Known(TypeLiteral(BOOL)), func, trans))) getAccessObsListExpr : Id ∗ × ListExpr × ExpType × FUNC × TRANS → AccessResult getAccessObsListExpr(idset, le, et, func, trans) ≡ case le of RangedListExpr(fve, sve) → getAccessObsListList( idset, 〈fve, sve〉, 〈et, et〉, func, trans), EnumeratedListExpr(ovel) → getAccessObsOptVEL(idset, ovel, et, func, trans), ComprehendedListExpr(ve1, b, ve2, or) → getAccessObsListList( idset, 〈ve1〉 〈ve2〉 getVEOptRestriction(or), 〈et, et, Known(TypeLiteral(BOOL))〉, func, trans) end, getAccessObsMapExpr : Id ∗ × MapExpr × MapType × FUNC × TRANS → AccessResult getAccessObsMapExpr(idset, me, et, func, trans) ≡ case me of EnumeratedMapExpr(ovel) → getAccessObsOptVEPL(idset, ovel, et, func, trans), ComprehendedMapExpr(ve, typlist, or) → getAccessObsListList( idset, getValueExprList(ve) getVEOptRestriction(or), 〈tedom(et), terange(et), Known(TypeLiteral(BOOL))〉, func, trans) end, getAccessObsOptVEL : Id ∗ × OptionalValueExprList × ExpType × FUNC × TRANS → AccessResult getAccessObsOptVEL(idset, ovel, et, func, trans) ≡ case ovel of ValueExprList(vel) → 429

APPENDIX D. SPECIFICATION OF TRANSFORMER IN RSL1<br />

getSequencingAccess :<br />

ValueExpr × TypeExpr × ExpType × TRANS × FUNC →<br />

Access ∗<br />

getSequencingAccess(ve, te, et, trans, func) ≡<br />

if<br />

and(<br />

and(<br />

isTGen(ve, trans, func),<br />

not(returnsNonTOI(ve, et, trans, func))),<br />

not(equalsType(te, et)))<br />

then getTOIReturnsListTN(te, trans)<br />

else 〈〉<br />

end,<br />

getAccessObsSetExpr :<br />

Id ∗ × SetExpr × ExpType × FUNC × TRANS →<br />

AccessResult<br />

getAccessObsSetExpr(idset, se, et, func, trans) ≡<br />

case se <strong>of</strong><br />

RangedSetExpr(fve, sve) →<br />

getAccessObsListList(<br />

idset, 〈fve, sve〉, 〈et, et〉, func, trans),<br />

EnumeratedSetExpr(ovel) →<br />

getAccessObsOptVEL(idset, ovel, et, func, trans),<br />

ComprehendedSetExpr(ve, typlist, or) →<br />

mk_AccessResult(<br />

removeDuplets(<br />

accessList(<br />

getAccessObs(idset, ve, et, func, trans)<br />

) <br />

accessList(<br />

getAccessObsList(<br />

getAccessIdSet(<br />

getAccessObs(<br />

idset, ve, et, func, trans)),<br />

getVEOptRestriction(or),<br />

Known(TypeLiteral(BOOL)), func, trans<br />

))),<br />

getAccessIdSet(<br />

getAccessObsList(<br />

getAccessIdSet(<br />

getAccessObs(<br />

idset, ve, et, func, trans)),<br />

getVEOptRestriction(or),<br />

428

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

Saved successfully!

Ooh no, something went wrong!