OntoDSL: An Ontology-Based Framework for Domain-Specific Languages

1,597 views
1,468 views

Published on

Talk at the 12th International Conference on Model Driven Engineering Languages and Systems, MoDELS, 4‒9 October 2009, Denver, United States.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,597
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
27
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • DSL User Uses domain-specific language to create domain models E.g. Models are financial contracts (bank officer), network device configuration (system engineer) Needs services for productively modeling DSL Designer Creates metamodels to specify the domain specific language Provides concrete syntax to DSL users Supports the DSL user, e.g. by guidance, validation
  • The complete box is called a chassis. The chassis consists of different cards, for example: Supervisor Engine 720 card for different IP and security features SPA Interface Card for 1-Gbps broadband connections (OSM Card) Hot Swap Controller for swapping cards at runtime (OSM Card)
  • Incomplete and inconsistent -> Reasoning Explanation
  • Incomplete and consistent -> Validating possible
  • Complete and inconsistent
  • Complete and consistent -> dynamic classification (refine the model)
  • 9
  • 11
  • 13
  • 12
  • 18
  • Folie 8
  • Folie 8
  • Folie 8
  • Folie 8
  • OntoDSL: An Ontology-Based Framework for Domain-Specific Languages

    1. 1. OntoDSL An Ontology-Based Framework for Domain-Specific Languages Tobias Walter Fernando Silva Parreiras Steffen Staab 08.10.2009
    2. 2. Objectives <ul><li>Motivation </li></ul><ul><ul><li>Scenario </li></ul></ul><ul><ul><li>Requirements </li></ul></ul><ul><li>Description Logics </li></ul><ul><li>Ontology-based DSL Frameworks </li></ul><ul><ul><li>Design DSLs </li></ul></ul><ul><ul><li>Use DSLs </li></ul></ul><ul><li>Conclusion </li></ul>
    3. 3. Scenario (Roles) Abstract syntax Semantics Concrete syntax Guidance and services Constraints DSL User DSL Designer DSL Metamodel uses specifies Domain Model builds Metamodeling Language uses Framework Developer specifies requires based on defined in
    4. 4. Scenario <ul><li>Modeling physical devices, e.g. Cisco network devices </li></ul>Cisco 7603: <ul><li>Restrictions modeling a Cicso7603 device: </li></ul><ul><ul><li>Every Cisco7603 has at least 1 Configuration7603 </li></ul></ul><ul><ul><li>Every Configuration has at least 1 Slot in which a SupervisorEngine card is plugged in </li></ul></ul><ul><ul><li>A Configuration7603 has exactly 3 Slots in which either a HotSwappableOSM or SPAInterface card is plugged in. </li></ul></ul>Domain Model: SupervisorEngine HotSwappableOSM Slot Slot Slot Configuration Device DSL Designer
    5. 5. Scenario (DSL User) <ul><li>Requirements of DSL User: </li></ul><ul><ul><li>Consistency Checking </li></ul></ul><ul><ul><ul><li>Debugging of domain models </li></ul></ul></ul><ul><li>Domain Model: </li></ul>(inconsistent) Error HotSwappableOSM Configuration Device DSL User
    6. 6. Scenario (DSL User) <ul><li>Requirements of DSL User: </li></ul><ul><ul><li>Consistency Checking </li></ul></ul><ul><ul><ul><li>Debugging of domain models </li></ul></ul></ul><ul><ul><li>Validate incomplete models </li></ul></ul><ul><ul><ul><li>Guidance and explanations how to complete the model </li></ul></ul></ul>HotSwappableOSM <ul><li>Domain Model: </li></ul>(consistent) Slot Slot Slot Configuration Device DSL User
    7. 7. Scenario (DSL User) <ul><li>Requirements of DSL User: </li></ul><ul><ul><li>Consistency Checking </li></ul></ul><ul><ul><ul><li>Debugging of domain models </li></ul></ul></ul><ul><ul><li>Validate incomplete models </li></ul></ul><ul><ul><ul><li>Guidance and explanations how to complete the model </li></ul></ul></ul><ul><li>Domain Model: </li></ul>(inconsistent) Error Error Error Explanation: Configuration hasSlot some Slot and hasCard some SupervisorEngine SPAInterface HotSwappableOSM HotSwappableOSM Slot Slot Slot Configuration Device DSL User
    8. 8. Scenario (DSL User) <ul><li>Requirements of DSL User: </li></ul><ul><ul><li>Consistency Checking </li></ul></ul><ul><ul><ul><li>Debugging of domain models </li></ul></ul></ul><ul><ul><li>Validate incomplete models </li></ul></ul><ul><ul><ul><li>Guidance and explanations how to complete the model </li></ul></ul></ul><ul><ul><li>Suggestions of suitable domain concepts </li></ul></ul><ul><ul><li>Use of services without any extra effort </li></ul></ul><ul><li>Domain Model: </li></ul>(consistent) SupervisorEngine HotSwappableOSM Slot Slot Slot Configuration DSL User Configuration7603 Device Cisco7603
    9. 9. State of the Art <ul><li>Metamodel of Physical Device DSL (PDDSL) (M2 layer) </li></ul><ul><li>Implemented using KM3 (a Java-like syntax) </li></ul><ul><li>Simple to use and understandable </li></ul><ul><li>But: Not effectual to define configurations with valid cards and slots </li></ul>class Device { reference hasConfiguration [1-*]: Configuration; } class Cicso7603 extends Device{ } class Configuration { reference hasSlot [1-*]: Slot; } class Configuration7603 extends Configuration{ } class Slot { reference hasCard [1-*]: Card; } class Card { } DSL Designer
    10. 10. Description Logics <ul><li>Description Logics (DLs) are logics designed to represent and reason on structured knowledge </li></ul><ul><li>The domain of interest is structured into ( TBox ): </li></ul><ul><ul><li>concepts, which correspond to classes, and denote sets of individuals </li></ul></ul><ul><ul><li>roles, which correspond to associations, and denote binary relations on individuals </li></ul></ul><ul><li>The knowledge is asserted through so-called assertions ( ABox ) </li></ul><ul><li>Provide formal semantics </li></ul><ul><li>DLs provide the foundations for standard ontology languages, like OWL2 </li></ul>Knowledge Base TBox ABox Inference Engine Application
    11. 11. Description Logic (Example) <ul><li>TBox: </li></ul><ul><li>ABox: </li></ul>Configuration7603(conf) Cisco7603(cisco)
    12. 12. Description Logics <ul><li>DLs allow for joint as well as for separate sound and complete reasoning at the model and at the instance level </li></ul><ul><li>DLs allow for tractable reasoning and efficient query answering </li></ul><ul><li>DLs provide more expressiveness than usual metamodeling languages </li></ul><ul><li>But: DLs are not designed to act as a metamodel for defining DSLs </li></ul><ul><li>DSL Designer has no experience modeling with DLs and ontologies </li></ul><ul><li>DSL Designer requires to use the languages he is familiar with as much as he can (standard metamodeling language like KM3) </li></ul><ul><li>DSL Designer wants to define constraints </li></ul>DSL Designer
    13. 13. Proposed Solution <ul><li>Integrate KM3 with ontology language OWL2 </li></ul><ul><li>Provide a metamodeling language to specify further DSLs </li></ul><ul><li>Design Domain Specific Languages </li></ul><ul><li>Develop new DSL with integrated constraints and axioms </li></ul><ul><li>Use domain-specific languages </li></ul><ul><li>Builds domain models and uses services </li></ul>Ontology-based framework for domain-specific languages DSL User DSL Designer Framework Developer
    14. 14. Model-based Integration Architecture <ul><li>Framework Developer </li></ul><ul><ul><li>Provide framework for designing and using DSLs </li></ul></ul><ul><li>DSL Designer </li></ul><ul><ul><li>Defines abstract Syntax, concrete Syntax, semantics </li></ul></ul><ul><li>DSL User </li></ul><ul><ul><li>Builds domain models </li></ul></ul>DSL User DSL Designer Framework Developer
    15. 15. Integrated Modeling <ul><li>Metamodel of PDDSL </li></ul>class Device { reference hasConfiguration [1-*]: Configuration; } class Cisco7603 extends Device } class Configuration reference hasSlot : Slot; } class Configuration7603 extends Configuration } class Slot { reference hasCard [1-*]: Card; } , equivalentWith restrictionOn hasConfiguration with min 1 Configuration7603 { { equivalentWith IntersectionOf(restrictionOn hasSlot with min 1 Slot, restrictionOn hasSlot some restrictionOn hasCard some SupervisorEngine) { { , equivalentWith IntersectionOf ( restrictionOn hasSlot with exactly 3 Slot, restrictionOn hasSlot with some restrictionOn hasCard with some UnionOf (HotSwappableOSM, SPAInterface) { { DSL Designer
    16. 16. Benefits of DL in Domain Modeling <ul><li>Open World Assumption </li></ul><ul><ul><li>assumes incomplete information by default </li></ul></ul><ul><ul><li>guidance and validation of incomplete models </li></ul></ul><ul><li>Joint semantic definitions at 2 layers </li></ul><ul><ul><li>M1- and M2 layer affect each other </li></ul></ul><ul><ul><li>simultaneously reasoning at M1- and M2 layer </li></ul></ul><ul><li>Debugging and reasoning explanation </li></ul><ul><ul><li>identifying debugging-relevant facts (e.g. model elements) which lead to inconsistency with regard to the metamodel </li></ul></ul><ul><ul><li>explanations of errors in domain models </li></ul></ul>
    17. 17. Conclusion <ul><li>Framework Developer </li></ul><ul><li>Integration of KM3 and OWL at the M3 layer </li></ul><ul><li>Provide metamodeling language that allows designing metamodels with embedded OWL Constructs </li></ul><ul><li>DSL Designer </li></ul><ul><ul><li>Specifies new DSLs with additional, integrated constraints </li></ul></ul><ul><li>DSL User </li></ul><ul><li>Builds domain models </li></ul><ul><li>Gets services and guidance for free </li></ul>DSL User DSL Designer Framework Developer
    18. 18. Discussion… <ul><li>Thanks for your attention … </li></ul><ul><li>… Questions? </li></ul>http://ontodsl.semanticsoftware.eu Supported by EU STReP-216691 MOST
    19. 19. Description Logic (Example) <ul><li>Class Device </li></ul><ul><li>Class Cisco7603 </li></ul><ul><li>SubClassOf: Device </li></ul><ul><li>EquivalentTo: hasConfiguration min 1 Configuration7603 </li></ul><ul><li>Class Configuration </li></ul><ul><li>EquivalentTo: hasSlot some (hasCard some SupervisorEngine)) </li></ul><ul><li>and (hasSlot min 1 Slot) </li></ul><ul><li>Class Configuration7603 </li></ul><ul><li>EquivalentTo: (hasSlot some (hasCard some (HotSwappableOSM </li></ul><ul><li>or SPAInterface))) </li></ul><ul><li>and (hasSlot exactly 3 Slot) </li></ul><ul><li>Class Slot </li></ul><ul><li>Class Card </li></ul>TBox (Concepts):
    20. 20. Description Logic (Example) <ul><li>ObjectProperty: hasCard </li></ul><ul><li>Domain: Slot </li></ul><ul><li>Range: Card </li></ul><ul><li>ObjectProperty: hasSlot </li></ul><ul><li>Domain: Configuration </li></ul><ul><li>Range: Slot </li></ul><ul><li>ObjectProperty: hasConfiguration </li></ul><ul><li>Domain: Device </li></ul><ul><li>Range: Configuration </li></ul>TBox (Roles):
    21. 21. Description Logic (Example) <ul><li>Individual: cisco </li></ul><ul><li>Types: Device </li></ul><ul><li>Facts: hasConfiguration conf </li></ul><ul><li>Individual: conf </li></ul><ul><li>Types: Configuration7603, </li></ul><ul><li>Facts: hasSlot slot1, </li></ul><ul><li>hasSlot slot2, </li></ul><ul><li>hasSlot slot3 </li></ul><ul><li>Individual: spa1 </li></ul><ul><li>Types: SPAInterface, </li></ul><ul><li>Individual: supervisor720 </li></ul><ul><li>Types: SupervisorEngine </li></ul><ul><li>Individual: hotSwappable </li></ul><ul><li>Types: HotSwappableOSM </li></ul><ul><li>Individual: slot1 </li></ul><ul><li>Types: Slot </li></ul><ul><li>Facts: hasCard supervisor720 </li></ul><ul><li>Individual: slot2 </li></ul><ul><li>Types: Slot </li></ul><ul><li>Facts: hasCard spa1 </li></ul><ul><li>Individual: slot3 </li></ul><ul><li>Types: Slot </li></ul><ul><li>Facts: hasCard hotSwappable </li></ul>Individual: cisco Types: Device Facts: hasConfiguration conf Individual: conf Types: Configuration7603, Facts: hasSlot slot1, hasSlot slot2, hasSlot slot3 Individual: slot1 Types: Slot Facts: hasCard supervisor720 Individual: slot2 Types: Slot Facts: hasCard spa1 Individual: slot3 Types: Slot Facts: hasCard hotSwappable Individual: spa1 Types: SPAInterface Individual: supervisor720 Types: SupervisorEngine Individual: hotSwappable Types: HotSwappableOSM ABox:
    22. 22. Description Logic (Example) ABox:

    ×