Transformation of Applicative Specifications into Imperative ...
Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...
APPENDIX D. SPECIFICATION OF TRANSFORMER IN RSL1 mk_TYPINGS( 〈mk_TYPINGSMapEntrance( id, getTYPINGSVariantList(vl))〉), ShortRecordDef(id, ckl) → mk_TYPINGS( 〈mk_TYPINGSMapEntrance( id, getTYPINGSComponentKindList(ckl))〉), AbbreviationDef(id, te) → mk_TYPINGS( 〈mk_TYPINGSMapEntrance( id, getTYPINGSTypeExpr(te))〉) end, getTYPINGSVariantList : Variant ∗ → Id ∗ getTYPINGSVariantList(vl) ≡ if vl = 〈〉 then emptyId() else removeDupletsId( getTYPINGSVariant(hd vl) getTYPINGSVariantList(tl vl)) end, getTYPINGSVariant : Variant → Id ∗ getTYPINGSVariant(v) ≡ case v of Make_Constructor(c) → 〈〉, RecordVariant(c, ckl) → getTYPINGSComponentKindList(ckl) end, getTYPINGSComponentKindList : ComponentKind ∗ → Id ∗ getTYPINGSComponentKindList(ckl) ≡ if ckl = 〈〉 then emptyId() else removeDupletsId( getTYPINGSTypeExpr(type_expr(hd ckl)) getTYPINGSComponentKindList(tl ckl)) end, getTYPINGSNameWildcardList : NameOrWildcard ∗ → Id ∗ getTYPINGSNameWildcardList(nwl) ≡ if nwl = 〈〉 then emptyId() 450
D.2. FORMAL SPECIFICATION OF THE TRANSFORMER IN RSL1 else removeDupletsId( getTYPINGSNameWildcard(hd nwl) getTYPINGSNameWildcardList(tl nwl)) end, getTYPINGSNameWildcard : NameOrWildcard → Id ∗ getTYPINGSNameWildcard(nw) ≡ case nw of Name(var) → 〈id(var)〉, Wildcard → 〈〉 end, getTYPINGSTypeExpr : TypeExpr → Id ∗ getTYPINGSTypeExpr(te) ≡ case te of TypeLiteral(tn) → 〈〉, TypeName(id) → 〈id〉, TypeExprProduct(tep) → getTYPINGSTypeExprList(tep), TypeExprSet(tes) → case tes of FiniteSetTypeExpr(fse) → getTYPINGSTypeExpr(fse), InfiniteSetTypeExpr(ise) → getTYPINGSTypeExpr(ise) end, TypeExprList(les) → case les of FiniteListTypeExpr(fle) → getTYPINGSTypeExpr(fle), InfiniteListTypeExpr(ile) → getTYPINGSTypeExpr(ile) end, TypeExprMap(tem) → case tem of FiniteMapTypeExpr(tedom, terange) → removeDupletsId( getTYPINGSTypeExpr(tedom) getTYPINGSTypeExpr(terange)), InfiniteMapTypeExpr(tedom, terange) → removeDupletsId( getTYPINGSTypeExpr(tedom) getTYPINGSTypeExpr(terange)) 451
- Page 416 and 417: APPENDIX D. SPECIFICATION OF TRANSF
- Page 418 and 419: APPENDIX D. SPECIFICATION OF TRANSF
- Page 420 and 421: APPENDIX D. SPECIFICATION OF TRANSF
- Page 422 and 423: APPENDIX D. SPECIFICATION OF TRANSF
- Page 424 and 425: APPENDIX D. SPECIFICATION OF TRANSF
- Page 426 and 427: APPENDIX D. SPECIFICATION OF TRANSF
- Page 428 and 429: APPENDIX D. SPECIFICATION OF TRANSF
- Page 430 and 431: APPENDIX D. SPECIFICATION OF TRANSF
- Page 432 and 433: APPENDIX D. SPECIFICATION OF TRANSF
- Page 434 and 435: APPENDIX D. SPECIFICATION OF TRANSF
- Page 436 and 437: APPENDIX D. SPECIFICATION OF TRANSF
- Page 438 and 439: APPENDIX D. SPECIFICATION OF TRANSF
- Page 440 and 441: APPENDIX D. SPECIFICATION OF TRANSF
- Page 442 and 443: APPENDIX D. SPECIFICATION OF TRANSF
- Page 444 and 445: APPENDIX D. SPECIFICATION OF TRANSF
- Page 446 and 447: APPENDIX D. SPECIFICATION OF TRANSF
- Page 448 and 449: APPENDIX D. SPECIFICATION OF TRANSF
- Page 450 and 451: APPENDIX D. SPECIFICATION OF TRANSF
- Page 452 and 453: APPENDIX D. SPECIFICATION OF TRANSF
- Page 454 and 455: APPENDIX D. SPECIFICATION OF TRANSF
- Page 456 and 457: APPENDIX D. SPECIFICATION OF TRANSF
- Page 458 and 459: APPENDIX D. SPECIFICATION OF TRANSF
- Page 460 and 461: APPENDIX D. SPECIFICATION OF TRANSF
- Page 462 and 463: APPENDIX D. SPECIFICATION OF TRANSF
- Page 464 and 465: APPENDIX D. SPECIFICATION OF TRANSF
- Page 468 and 469: APPENDIX D. SPECIFICATION OF TRANSF
- Page 470 and 471: APPENDIX D. SPECIFICATION OF TRANSF
- Page 472 and 473: APPENDIX D. SPECIFICATION OF TRANSF
- Page 474 and 475: APPENDIX D. SPECIFICATION OF TRANSF
- Page 476 and 477: APPENDIX D. SPECIFICATION OF TRANSF
- Page 478 and 479: APPENDIX D. SPECIFICATION OF TRANSF
- Page 480 and 481: APPENDIX D. SPECIFICATION OF TRANSF
- Page 482 and 483: APPENDIX D. SPECIFICATION OF TRANSF
- Page 484 and 485: APPENDIX D. SPECIFICATION OF TRANSF
- Page 486 and 487: APPENDIX D. SPECIFICATION OF TRANSF
- Page 488 and 489: APPENDIX D. SPECIFICATION OF TRANSF
- Page 490 and 491: APPENDIX D. SPECIFICATION OF TRANSF
- Page 492 and 493: APPENDIX E. ANTLR GRAMMAR END = "en
- Page 494 and 495: APPENDIX E. ANTLR GRAMMAR ; d = d e
- Page 496 and 497: APPENDIX E. ANTLR GRAMMAR ; } ( com
- Page 498 and 499: APPENDIX E. ANTLR GRAMMAR ; ) ∗ }
- Page 500 and 501: APPENDIX E. ANTLR GRAMMAR ; } else
- Page 502 and 503: APPENDIX E. ANTLR GRAMMAR prod_bind
- Page 504 and 505: APPENDIX E. ANTLR GRAMMAR ; | | | |
- Page 506 and 507: APPENDIX E. ANTLR GRAMMAR ; | NAT {
- Page 508 and 509: APPENDIX E. ANTLR GRAMMAR ; { ve3 =
- Page 510 and 511: APPENDIX E. ANTLR GRAMMAR ( | RPARE
- Page 512 and 513: APPENDIX E. ANTLR GRAMMAR | { optio
- Page 514 and 515: APPENDIX E. ANTLR GRAMMAR new RSLLi
APPENDIX D. SPECIFICATION OF TRANSFORMER IN RSL1<br />
mk_TYPINGS(<br />
〈mk_TYPINGSMapEntrance(<br />
id, getTYPINGSVariantList(vl))〉),<br />
ShortRecordDef(id, ckl) →<br />
mk_TYPINGS(<br />
〈mk_TYPINGSMapEntrance(<br />
id, getTYPINGSComponentKindList(ckl))〉),<br />
AbbreviationDef(id, te) →<br />
mk_TYPINGS(<br />
〈mk_TYPINGSMapEntrance(<br />
id, getTYPINGSTypeExpr(te))〉)<br />
end,<br />
getTYPINGSVariantList : Variant ∗ → Id ∗<br />
getTYPINGSVariantList(vl) ≡<br />
if vl = 〈〉 then emptyId()<br />
else<br />
removeDupletsId(<br />
getTYPINGSVariant(hd vl) <br />
getTYPINGSVariantList(tl vl))<br />
end,<br />
getTYPINGSVariant : Variant → Id ∗<br />
getTYPINGSVariant(v) ≡<br />
case v <strong>of</strong><br />
Make_Constructor(c) → 〈〉,<br />
RecordVariant(c, ckl) →<br />
getTYPINGSComponentKindList(ckl)<br />
end,<br />
getTYPINGSComponentKindList :<br />
ComponentKind ∗ → Id ∗<br />
getTYPINGSComponentKindList(ckl) ≡<br />
if ckl = 〈〉 then emptyId()<br />
else<br />
removeDupletsId(<br />
getTYPINGSTypeExpr(type_expr(hd ckl)) <br />
getTYPINGSComponentKindList(tl ckl))<br />
end,<br />
getTYPINGSNameWildcardList :<br />
NameOrWildcard ∗ → Id ∗<br />
getTYPINGSNameWildcardList(nwl) ≡<br />
if nwl = 〈〉 then emptyId()<br />
450