Filling the Gap between Semantic Web (OWL, Ontology Technology) and Model Dri...
Ontology Based Domain Specific Languages
1. Web Science & Technologies
University of Koblenz ▪ Landau, Germany
Ontology-based Domain Specific languages
Fernando Silva Parreiras
2. Objectives
Motivation
• Scenario
• Requirements
Ontology-based DSL Frameworks
• Design DSLs
• Use DSLs
Conclusion
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 2 of 15
3. Scenario (Roles)
Metamodeling
Framework
specifies Language
Developer
uses
DSL
DSL Designer specifies defined in
Constraints
Metamodel
based on
uses
Guidance
DSL User Domain Model
builds and services
requires
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 3 of 15
4. Scenario
• Modeling physical devices, e.g. Cisco network devices
Cisco 7603: Domain Model:
Configuration
Slot HotSwappableOSM
Device
Slot SupervisorEngine
Slot
Restrictions modeling a Cicso7603 device:
• Every Cisco7603 has at least 1 Configuration7603
• Every Configuration has at least 1 Slot in which a
SupervisorEngine card is plugged in DSL Designer
• A Configuration7603 has exactly 3 Slots in which either a
HotSwappableOSM or SPAInterface card is plugged in.
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 4 of 15
5. Scenario (DSL User)
• Domain Model: (inconsistent)
DSL User
Configuration
HotSwappableOSM
Device Error
• Requirements of DSL User:
• Consistency Checking
• Debugging of domain models
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 5 of 15
6. Scenario (DSL User)
• Domain Model: (consistent)
DSL User
Configuration
Slot HotSwappableOSM
Device Slot
Slot
• Requirements of DSL User:
• Consistency Checking
• Debugging of domain models
• Validate incomplete models
• Guidance and explanations how to complete the model
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 6 of 15
7. Scenario (DSL User)
• Domain Model: (inconsistent)
DSL User
Configuration
Slot HotSwappableOSM
Device
Explanation:
Slot Configuration hasSlot someError and
SPAInterface Slot
hasCard some SupervisorEngine
Slot HotSwappableOSM
• Requirements of DSL User:
• Consistency Checking
• Debugging of domain models
• Validate incomplete models
• Guidance and explanations how to complete the model
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 7 of 15
8. Scenario (DSL User)
• Domain Model: (consistent)
DSL User
Configuration7603
Configuration
Cisco7603
Slot HotSwappableOSM
Device Slot SupervisorEngine
Slot
• Requirements of DSL User:
• Consistency Checking
• Debugging of domain models
• Validate incomplete models
• Guidance and explanations how to complete the model
• Suggestions of suitable domain concepts
• Use of services without any extra effort
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 8 of 15
9. State of the Art
Metamodel of Physical Device DSL (PDDSL) (M2 layer)
• Implemented using text ecore (a Java-like syntax)
• Simple to use and understandable
class Device {
reference hasConfiguration [1-*]: Configuration;
}
class Cicso7603 extends Device{
} DSL Designer
class Configuration {
reference hasSlot [1-*]: Slot;
}
class Configuration7603 extends Configuration{
}
class Slot {
reference hasCard [1-*]: Card;
}
class Card {
}
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 9 of 15
10. Proposed Solution
Ontology-based framework for domain-specific languages
Integrate text ecore with ontology language
OWL2
• Provide a metamodeling language to specify
Framework
Developer
further DSLs
Design Domain Specific Languages
• Develop new DSL with integrated constraints
DSL Designer and axioms
Use domain-specific languages
• Builds domain models and uses services
DSL User
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 10 of 15
11. Model-based Integration Architecture
• Framework Developer
• Provide framework for designing and using DSLs
• DSL Designer
• Defines abstract Syntax, concrete Syntax, semantics
• DSL User
• Builds domain models
Development Environment
Framework
Integrated Metametamodel
Developer
KM3 OWL
Ecore
Metametamodel Metamodel
:M3
instanceOf instanceOf
Ontology Definition
Domain Definition
DSL Integrated Model
M2': Metamodel Visualization (Abstract Syntax) :M2 TBox
Designer (Concrete Syntax)
Constraints / Axioms
transform OWL Reasoning
instanceOf Ontology Service
DSL User M1': Domain Model transform ABox
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 11 of 15
12. Integrated Modeling
• Metamodel of PDDSL
class Device {
reference hasConfiguration [1-*]: Configuration;
}
DSL Designer
class Cisco7603 extends Device, equivalentWith restrictionOn hasConfiguration
{
with min 1 Configuration7603 {
}
class Configuration equivalentWith
{
IntersectionOf(restrictionOn hasSlot with min 1 Slot,
restrictionOn hasSlot some
restrictionOn hasCard some SupervisorEngine) {
reference hasSlot : Slot;
}
class Configuration7603 extends Configuration ,
{
equivalentWith IntersectionOf(restrictionOn hasSlot with exactly 3 Slot,
restrictionOn hasSlot with some
restrictionOn hasCard with some
UnionOf(HotSwappableOSM, SPAInterface) {
}
class Slot {
reference hasCard [1-*]: Card;
}
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 12 of 15
13. Benefits of DL in Domain Modeling
Open World Assumption
• assumes incomplete information by default
• guidance and validation of incomplete models
Debugging and reasoning explanation
• identifying debugging-relevant facts (e.g. model elements)
which lead to inconsistency with regard to the metamodel
• explanations of errors in domain models
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 13 of 15
14. Conclusion
Framework Developer
• Integration of ecore and OWL at the M3 layer
• Provide metamodeling language that allows
Framework
Developer designing metamodels with embedded OWL
Constructs
DSL Designer
• Specifies new DSLs with additional, integrated
DSL Designer constraints
DSL User
• Builds domain models
DSL User • Gets services and guidance for free
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 14 of 15
15. Discussion…
… Questions?
WeST Tobias Walter SPLASH Tutorial
walter@uni-koblenz.de 15 of 15