Web Science & Technologies
University of Koblenz ▪ Landau, Germany
Ontology-based Domain Specific languages
Fernando Silva Parreiras
Tobias [email protected]
SPLASH Tutorial2 of 15
WeST
Objectives
Motivation• Scenario• Requirements
Ontology-based DSL Frameworks• Design DSLs• Use DSLs
Conclusion
Tobias [email protected]
SPLASH Tutorial3 of 15
WeST
Scenario (Roles)
DSL User
DSL DesignerDSL
Metamodel
uses
specifies
Domain Modelbuilds
Metamodeling Language
uses
specifies
requires
Guidance and services
Constraints
based on
defined in
Framework Developer
Tobias [email protected]
SPLASH Tutorial4 of 15
WeST
Scenario
• Modeling physical devices, e.g. Cisco network devices
Cisco 7603:
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• A Configuration7603 has exactly 3 Slots in which either a
HotSwappableOSM or SPAInterface card is plugged in.
SupervisorEngine
HotSwappableOSMSlot
Slot
Slot
Configuration
Device
Domain Model:
DSL Designer
Tobias [email protected]
SPLASH Tutorial5 of 15
WeST
Scenario (DSL User)
• Requirements of DSL User:• Consistency Checking
• Debugging of domain models
HotSwappableOSM
Co
nfig
ura
tion
Device
• Domain Model:DSL User
(inconsistent)
Error
Tobias [email protected]
SPLASH Tutorial6 of 15
WeST
HotSwappableOSM
Scenario (DSL User)
• Requirements of DSL User:• Consistency Checking
• Debugging of domain models
• Validate incomplete models• Guidance and explanations how to complete the model
Slot
Slot
Slot
Co
nfig
ura
tion
Device
• Domain Model:DSL User
(consistent)
Tobias [email protected]
SPLASH Tutorial7 of 15
WeST
SPAInterface
HotSwappableOSM
HotSwappableOSM
Scenario (DSL User)
• Requirements of DSL User:• Consistency Checking
• Debugging of domain models
• Validate incomplete models• Guidance and explanations how to complete the model
Slot
Slot
Slot
Co
nfig
ura
tion
Device
• Domain Model:DSL User
(inconsistent)
ErrorErrorErrorExplanation:Configuration hasSlot some Slot and hasCard some SupervisorEngine
Tobias [email protected]
SPLASH Tutorial8 of 15
WeST
SupervisorEngine
Scenario (DSL User)
• 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
HotSwappableOSMSlot
Slot
Slot
Co
nfig
ura
tion
• Domain Model:DSL UserC
onfiguration7603
Device
Cisco
7603
(consistent)
Tobias [email protected]
SPLASH Tutorial9 of 15
WeST
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{}
class Configuration { reference hasSlot [1-*]: Slot;}
class Configuration7603 extends Configuration{}
class Slot { reference hasCard [1-*]: Card;}
class Card {}
DSL Designer
Tobias [email protected]
SPLASH Tutorial10 of 15
WeST
Proposed Solution
Integrate text ecore with ontology language OWL2
• Provide a metamodeling language to specify further DSLs
Design Domain Specific Languages• Develop new DSL with integrated constraints
and axioms
Use domain-specific languages• Builds domain models and uses services
DSL User
DSL Designer
Ontology-based framework for domain-specific languages
Framework Developer
Tobias [email protected]
SPLASH Tutorial11 of 15
WeST
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
Integrated Metametamodel
:M3
:M2Integrated Model(Abstract Syntax)
Domain Model
instanceOf
instanceOf
KM3Metametamodel
EcoreOWL
Metamodel
Constraints / AxiomsOWL
Ontology
instanceOf
ABox
TBox
Reasoning Service
M2':
M1':
Domain Definition Metamodel
(Concrete Syntax)
transform
transform
Development Environment
Ontology Definition
Visualization
DSL User
DSL Designer
FrameworkDeveloper
Tobias [email protected]
SPLASH Tutorial12 of 15
WeST
Integrated Modeling
• Metamodel of PDDSLclass 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
Tobias [email protected]
SPLASH Tutorial13 of 15
WeST
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
Tobias [email protected]
SPLASH Tutorial14 of 15
WeST
Conclusion Framework Developer• Integration of ecore and OWL at the M3 layer• Provide metamodeling language that allows
designing metamodels with embedded OWL Constructs
DSL Designer• Specifies new DSLs with additional, integrated
constraints
DSL User• Builds domain models• Gets services and guidance for freeDSL User
DSL Designer
Framework Developer
Top Related