1 / 10

ReMoDeL

ReMoDeL. Code Generators. Background. Model-Driven Engineering (MDE) Software systems will be designed at a high level of abstraction, in terms of models. Eg : OMG’s Model-Driven Architecture (MDA) Aims to use UML, and QVT technologies L arge and heavy; no complete implementations ReMoDeL

clare
Download Presentation

ReMoDeL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ReMoDeL Code Generators

  2. Background • Model-Driven Engineering (MDE) • Software systems will be designed at a high level of abstraction, in terms of models. • Eg: OMG’s Model-Driven Architecture (MDA) • Aims to use UML, and QVT technologies • Large and heavy; no complete implementations • ReMoDeL • Reusable Model Design Languages • Alternative lightweight approach • Aims to use XML models and transformations • Existing proof-of-concept

  3. ReMoDeL Goals • PIY: Program-it-yourself • End-users will be able to construct systems in terms of familiar models (domain-specific) • SHC: Scrap-heap challenge • System evolution will be at the model-level, by cannibalising existing models (agility) • SVT: Self-verify and test • Systems generated automatically from models, correct-by-construction, self-testing

  4. Model Languages • Multi-level approach • Transform high-level model of system to code • Use models as intermediate representations • High-level languages • Eg: ReMoDeL DBQ: represents records, associations, multiplicities, query expressions • Low-level languages • Eg: ReMoDeL OOP: represents classes, interfaces, primitive types, methods, fields • XML-based • All languages defined in XML

  5. Code Generators • Darwin Project Scope • Start with ReMoDeL OOP • Translate into actual OO code • Use existing Generator framework • Darwin Project Goals • Develop a set of OOP models of systems • Evaluate existing Java, C++ generators • Develop translators for C#, Eiffel, Delphi • Evaluate these translators on the same models • Is the OOP model adequate?

  6. Generator Framework ProgramGenerator PackageGenerator ClassGenerator MemberGenerator CodeGenerator

  7. Example OOP <?xml version="1.0" encoding="UTF-8" ?> <Package name="People" model="OOP" location="example.people"> <Class name="Person"> <Employ type="String" from="Core" location="lib.core" /> <Field name="forename" type="String" visible="private" /> <Field name="surname" type="String" visible="private" /> <Field name="gender" type="String" visible="private" /> <Creator name="make" type="Person" visible="public"> <Variable name="forename" type="String" /> <Variable name="surname" type="String" /> <Variable name="gender" type="String" /> <!-- body of creator omitted --> </Creator> <!-- further methods omitted --> </Class> </Package>

  8. Example in Java package example.people; import lib.core.Object; import lib.core.String; public class Person extends Object { private String forename; private String surname; private String gender; public Person (String forename, String surname, String gender) { // Body of constructor omitted } // Further methods omitted }

  9. Example in C++ (.h) #ifndefPERSON_H #define PERSON_H #include "..\..\lib\core\Object.h“ namespace People { using Core::Object; class String; class Person : public Object { private: Ref<String> my_forename; Ref<String> my_surname; Ref<String> my_gender; public: Person (Ref<String> forename, Ref<String> surname, Ref<String> gender); // Further methods omitted }; } // People #endif

  10. Challenges • Understand ReMoDeL OOP • Download and review OOP specification doc • http://www.dcs.shef.ac.uk/~ajhs/remodel/ • Install target language compilers • Eiffel, C#, Delphi – get these to work? • Understand Generator framework • JDOM framework for XML • Visitor design pattern in Java • Execute generated systems • On target language compilers • Using core target libraries

More Related