SlideShare a Scribd company logo
1 of 25
Download to read offline
FACET-ORIENTED MODELLING
OPEN OBJECTS FOR MODEL-
DRIVEN ENGINEERING
SLE’2018, Boston
J. de Lara1, E. Guerra1, J. Kienzle2, Y. Hattab2
1Universidad Autónoma de Madrid (Spain)
2McGill University (Canada)
MOTIVATION
Model-driven Engineering
• Models are the principal artifacts
• Models conform to a meta-model
Objects are closed
• Created using classes as templates
• Slots, types, and constraints cannot be changed
This rigidity makes some MDE scenarios difficult
• Reuse of model transformations
• Model extension
• Multi-view modelling
• …
2
Person
fullName: String
age: int
female: boolean
:Person
fullName=“Homer ”
age=36
female=false
Meta-model
Model «conforms»
MOTIVATION:
REUSE
3
Person
fullName: String
age: int
female: boolean
Address
street: String
city: String
address
spouse
0..1
Census
:Person
fullName=“Homer ”
age=36
female=false
Group
Element
quantity: int
elems
Metrics
*
operation Group avg(): Real {
if (elems.isEmpty()) return 0;
return elems.quantity.sum()/
elems.size();
}
:Person
fullName=“Todd”
age=8
female=false
…
Springfield: Census
«conforms»
Calculate average age of all male
adults in Springfield
Can we reuse operation avg on
Census models?
• Retype some Persons as Elements
• Create a Group containing all male
adults
MOTIVATION:
MODEL EXTENSION
4
Person
fullName: String
age: int
female: boolean
Address
street: String
city: String
address
spouse
0..1
Census
:Person
fullName=“Homer ”
age=36
female=false
:Person
fullName=“Todd”
age=8
female=false
…
Springfield: Census
«conforms»
Employment
Company
name: String
vatId: String
employees *
Owner
name: String
Employee
name: String
salary: double
ssNumber: int
active: boolean
belongsTo
minSalary inv:
self.salary > 15000
reportsTo
Can we extend existing Person
objects with Employment info?
• Retype some Persons as
Employees or Owners
• Add corresponding slots and
constraints
IN THIS TALK…
New modelling mechanism: the facet
• brings flexibility and dynamism to modelling
• lightweight: facets are just objects
Objects become open
• can acquire and drop slots, types and constraints
Facet laws
• specify when objects acquire/drop facets
Practical implementation
• on top of metaDepth, a textual meta-modelling tool
5
WHAT’S A FACET?
A facet is an object
• becomes part of another one(s), called the host object(s),
• the slots of the facet become transparently accessible from the
host, which also acquires the type and constraints of the facet.
A host object can acquire and drop facets dynamically
6
homer :Person
fullName= “Homer”
age= 57
female= false emp: Employee
name= “Homer”
salary=47500
ssNumber=12345
active=true
Springfield :Census
emp: Employee[1]
: Employment
homer :Person :Employee
age= 57
female= false
fullName= name= “Homer”
salary=47500
ssNumber=12345
active=true
Springfield
:Census :Employment
emp: Employee
host
object facet
WHAT’S A FACET?
Object homer receives:
• Slots (name, salary, ssNumber, active)
• Type (Employee)
• Constraints (minSalary)
From its emp facet
Host and facet slots may be synchronized
• fullName and name
• Changing either one modifies the other
Slot name ambiguity
• Resolved by facet name (homer.emp)
Shared facets and several facets in hosts
7
homer :Person :Employee
age= 57
female= false
fullName= name= “Homer”
salary=47500
ssNumber=12345
active=true
Springfield
:Census :Employment
emp: Employee
Employment
Employee
name: String
salary: double
ssNumber: int
active: boolean
minSalary inv:
salary > 15000
…
«conforms»
Census
…
«conforms»
FACET MANAGEMENT
A DSL for adding/removing facets to objects
8
addFacet homer
emp: Employment.Employee
with {
name = fullName [equality]
salary = 22345
ssNumber = 12345
active = true
}
addFacet
$Person.allInstances()→select(age>17)$
emp: Employment.Employee with {…}
Explicit host selection
Query-based host selection
addFacet h:Person, w:Person where
$h.spouse=w$
emp: Employment.Employee with {…}
Pattern-based host selection
Selection of host objects by id Selection of host objects by properties
(similar commands for removing a facet)
FACET MANAGEMENT
9
addFacet
h:Person, w:Person
where $h.spouse=w$
emp: Employment.Employee
with {…} reuse
Facet shared among all
selected host objects
addFacet homer
dayJob: Employment.Employee with {
name = fullName [equality]
salary = 15000
ssNumber = 12345
active = true
}
nightJob: Employment.Employee with {
name = fullName [equality]
salary = 16400
ssNumber = dayJob.ssNumber [equality]
active = dayJob.active [equality]
}
Several facets in same host object
One-to-many and many-to-one host/facet relations are supported
MODEL SCENES
10
Springfield :Census :Employment
homer :Person :Employee
age=57
female=false
fullName=“Homer”
name=“Homer” dayJob, nightJob
ssNumber=12345 dayJob, nightJob
active=true dayJob, nightJob
salary=15000 dayJob
salary=16400 nightJob
simsHome :Address
street=“Evergreen Terrace”
city=“Springfield”
:address
Different visualizations for a model
• “Scenes”
Total scene
• Default visualization
Total scene
MODEL SCENES
11
Different visualizations for a model
• “Scenes”
Total scene
• Default visualization
Sliced scene
• W.r.t. a given facet meta-model
Springfield :Employment
homer :Employee
name=“Homer” dayJob, nightJob
ssNumber=12345 dayJob, nightJob
active=true dayJob, nightJob
salary=15000 dayJob
salary=16400 nightJob
Scene sliced by Employment
MODEL SCENES
12
Different visualizations for a model
• “Scenes”
Total scene
• Default visualization
Sliced scene
• W.r.t. a given facet meta-model
Granulated
• Shows facets typed w.r.t. a certain meta-
model
Springfield
:Employment
nightJob :Employee
name=“Homer”
salary=16400
ssNumber=12345
active=true
name=“Homer”
salary=15000
ssNumber=12345
active=true
dayJob :Employee
Scene granulated by
Employment
FACET LAWS
AND INTERFACES
Opportunistic vs planned handling of facets
Control which elements can be used as facets
Declarative specification of conditions for acquiring/droping facets
13
:CMM :FMM
FMMCMM
Facet Interface
«conformsto»
«conformsto»
Creation MM Facet MM
model with facets
Facet Law
FACET INTERFACES
Restricts how a meta-model can be used for facet-based modelling
Declares
• classes that can be used to create facets
• allowed combinations
• extra well-formedness constraints (eg., due to facet combination)
14
FacetInterface for Employment {
public: all
compatible: [Employee, Owner]
constraints: Employee.repToIrreflexive= $self.reportsTo.excludes(self)$
}
FACET LAWS
Specs stating when host objects should acquire/drop a facet
• must/may
Can add additional constraints and set default values
Setting homer.age:=16 makes homer drop the work facet
15
FacetLaws for Census with Employment {
must extend <p:Person> where $p.age>17$
with work:Employee with {
name = fullName [equality]
salary = 24000
minLocalSalary: $ self.salary>16000 $
retirement: $ self.age>65 implies not self.active $
}
}
FACET LAWS
Check manually issued addFacet/removeFacet commands
• Should conform to the facet laws, if defined
Check faceted models for consistency
• Models should satisfy the laws
To complete addFacet commands
• Take default values and slot relations from the laws
To constraint facets
• By adding extra constraints
To automate facet acquisition/loss
• Via the “must” extension laws
• addFacet/removeFacet automatically issued
16
TOOL SUPPORT
MetaDepth (http://metaDepth.org)
• Textual multi-level modelling tool
• Epsilon languages for model
management (EOL, ETL, EGL)
Facets, facet handling, interfaces, laws
Mirror fields
Triggered constraints (add/drop facets)
17
Model Census {
Node Person{
name: String;
age: int;
female: boolean = true;
spouse: Person[0..1];
address: Address[1];
}
Node Address {
street: String;
city: String;
}
}
var p : Person := new Person;
p.age := 23; // implicitly creates an Employee facet (as p.age > 17)
p.salary := 15100; // OK, as p has now an Employee facet
p.age := 16; // p loses its Employee facet (as p.age <= 17)
p.salary := 21000; // Error! p has no Employee facet
EOL program
Census meta-model
EVALUATION
Based on three scenarios
• Integration of annotation models
• Reuse of model management operations
• Multi-view modelling
Comparison with solutions using alternative techniques
• Cross-referencing, EMF profiles, a-posterioti typing
• Model adaptation, a-posteriori typing, concepts, model typing
• Central repository, OpenFlexo, OSM, Vitruvius
18
INTEGRATING
ANNOTATION MODELS
Annotation models widely used in MDE:
• Concrete syntax (CS) representation, uncertainty, variability, access
control, etc.
19
Model ConcreteSyntax {
abstract Node GraphicalElem {
x, y : int;
label : String;
linkedTo : GraphicalElem[∗];
}
Node Rectangle : GraphicalElem {
width, height : int;
}
Node Circle : GraphicalElem {
radius : int;
}
}
Graphical CS support
• Meta-model
• Simple visualizer
• Facet laws to assign CS to
domain meta-models
We obtain for free:
• Bidirectional synchronization
textual/graphical CS.
CS meta-model
20
FacetLaws for Census with ConcreteSyntax {
must extend <p:Person> where $p.female$ with c:Circle with {
label = name [equality]
linkedTo = spouse [equality]
radius = age [equality]
}
must extend <p:Person> where $not p.female$ with r:Rectangle with {
label = name [equality]
linkedTo = spouse [equality]
height = age [equality]
width = age [equality]
}
}
CS FOR CENSUS
Census Springfield {
Person marge{
name = "Marge";
age = 47;
spouse = homer;
address= simsHouse;
}
…
}
Synch.
(scene sliced by Census)
CAN WE DO THIS
DIFFERENTY?
21
Cannot be used to fully solve this case study:
Cross-referencing, EMF profiles
• No direct support for conditional styles (different CS based on female)
• No direct support for bidirectional changes
A-posteriori typing
• Cannot map slots like x and y
[1] Langer, Wieland, Wimmer,Cabot. EMF profiles: a lightweight extension approach for EMF
models. JOT 11,1(2012),1–29.
[2] de Lara, Guerra. A posteriori typing for model-driven engineering: Concepts, analysis, and
applications. ACM TOSEM 25, 4(2017),31:1–31:60.
[1]
[2]
RELATED WORKS
Role-based modelling (eg., Lodwick [1], CROM [2])
• Facets fulfill most typical features of role-based languages
• Heavyweight (role, natural, compartment types)
• Practical integration with MDE: inheritance, attribute/slot handling,
OCL constraints, integration with model management languages
A-posteriori typing
• Can dynamically add/remove types
• Cannot add slots or constraints
22
[1] Steimann. On the representation of roles in object-oriented and conceptual modelling.
Data Knowl. Eng. 35,1(2000),83–106.
[2] Kühn, Böhme, Götz,Aßmann. A combined formal model for relational context-dependent
roles. In SLE’15. pp.:113–124.
de Lara, Guerra. A posteriori typing for model-driven engineering: Concepts, analysis, and
applications. ACM TOSEM 25, 4(2017),31:1–31:60.
CONCLUSIONS
Facets add flexibility and dynamicity to modelling
• make objects open
• acquire/drop slots, types and constraints dynamically
Facet management operations
• addFacet/deleteFacet
Facet interfaces
Facet laws
• property-based facet acquisition and drop
Some scenarios where facets present advantages
• annotation models, transformation reuse, multi-view modelling
Implementation on top of metaDepth
23
FUTURE WORK
Symmetrical approach (host/facet)
• Untyped objects (empty shells)
• Everyting else is added by facets
• Traditional modelling as a (static) special case of this approach
Analysis
• Constraints in meta-models and those in laws/interfaces
• Static analysis of model management programs
Further scenarios
• Multi-abstraction modelling (abstractions as facets of lower-level elts)
• Multi-level modelling (facets for deep characterization)
• Models at run-time (dynamic change)
• Dynamic product lines (model reconfiguration)
24
Juan.deLara@uam.es
@miso_uam http://metadepth.org
THANKS!
http://miso.es

More Related Content

Similar to Facets

Silicon valleycodecamp2013
Silicon valleycodecamp2013Silicon valleycodecamp2013
Silicon valleycodecamp2013Sanjeev Mishra
 
VSSML18. Feature Engineering
VSSML18. Feature EngineeringVSSML18. Feature Engineering
VSSML18. Feature EngineeringBigML, Inc
 
What are the Basic Fields in the Odoo 17 ERP
What are the Basic Fields in the Odoo 17 ERPWhat are the Basic Fields in the Odoo 17 ERP
What are the Basic Fields in the Odoo 17 ERPCeline George
 
Best Practices in Qt Quick/QML - Part 4
Best Practices in Qt Quick/QML - Part 4Best Practices in Qt Quick/QML - Part 4
Best Practices in Qt Quick/QML - Part 4ICS
 
Html5workshop
Html5workshopHtml5workshop
Html5workshopshiv3110
 
MLSD18. Feature Engineering
MLSD18. Feature EngineeringMLSD18. Feature Engineering
MLSD18. Feature EngineeringBigML, Inc
 
BSSML17 - Basic Data Transformations
BSSML17 - Basic Data TransformationsBSSML17 - Basic Data Transformations
BSSML17 - Basic Data TransformationsBigML, Inc
 
Unit3_OOP-converted.pdf
Unit3_OOP-converted.pdfUnit3_OOP-converted.pdf
Unit3_OOP-converted.pdfPowerfullBoy1
 
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docxgilbertkpeters11344
 
Practical Predictive Modeling in Python
Practical Predictive Modeling in PythonPractical Predictive Modeling in Python
Practical Predictive Modeling in PythonRobert Dempsey
 
Model Transformation Reuse
Model Transformation ReuseModel Transformation Reuse
Model Transformation Reusemiso_uam
 
Database Modeling presentation
Database Modeling  presentationDatabase Modeling  presentation
Database Modeling presentationBhavishya Tyagi
 
C programming day#3.
C programming day#3.C programming day#3.
C programming day#3.Mohamed Fawzy
 
The importance of model fairness and interpretability in AI systems
The importance of model fairness and interpretability in AI systemsThe importance of model fairness and interpretability in AI systems
The importance of model fairness and interpretability in AI systemsFrancesca Lazzeri, PhD
 
The Epsilon Pattern Language
The Epsilon Pattern LanguageThe Epsilon Pattern Language
The Epsilon Pattern LanguageDimitris Kolovos
 
MLSEV. BigML Workshop I
MLSEV. BigML Workshop IMLSEV. BigML Workshop I
MLSEV. BigML Workshop IBigML, Inc
 
Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...
Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...
Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...Matthew Tovbin
 

Similar to Facets (20)

Silicon valleycodecamp2013
Silicon valleycodecamp2013Silicon valleycodecamp2013
Silicon valleycodecamp2013
 
VSSML18. Feature Engineering
VSSML18. Feature EngineeringVSSML18. Feature Engineering
VSSML18. Feature Engineering
 
What are the Basic Fields in the Odoo 17 ERP
What are the Basic Fields in the Odoo 17 ERPWhat are the Basic Fields in the Odoo 17 ERP
What are the Basic Fields in the Odoo 17 ERP
 
Best Practices in Qt Quick/QML - Part 4
Best Practices in Qt Quick/QML - Part 4Best Practices in Qt Quick/QML - Part 4
Best Practices in Qt Quick/QML - Part 4
 
Html5workshop
Html5workshopHtml5workshop
Html5workshop
 
MLSD18. Feature Engineering
MLSD18. Feature EngineeringMLSD18. Feature Engineering
MLSD18. Feature Engineering
 
BSSML17 - Basic Data Transformations
BSSML17 - Basic Data TransformationsBSSML17 - Basic Data Transformations
BSSML17 - Basic Data Transformations
 
Data Product Architectures
Data Product ArchitecturesData Product Architectures
Data Product Architectures
 
Unit3_OOP-converted.pdf
Unit3_OOP-converted.pdfUnit3_OOP-converted.pdf
Unit3_OOP-converted.pdf
 
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
 
Practical Predictive Modeling in Python
Practical Predictive Modeling in PythonPractical Predictive Modeling in Python
Practical Predictive Modeling in Python
 
Model Transformation Reuse
Model Transformation ReuseModel Transformation Reuse
Model Transformation Reuse
 
Database Modeling presentation
Database Modeling  presentationDatabase Modeling  presentation
Database Modeling presentation
 
C programming day#3.
C programming day#3.C programming day#3.
C programming day#3.
 
The importance of model fairness and interpretability in AI systems
The importance of model fairness and interpretability in AI systemsThe importance of model fairness and interpretability in AI systems
The importance of model fairness and interpretability in AI systems
 
The Epsilon Pattern Language
The Epsilon Pattern LanguageThe Epsilon Pattern Language
The Epsilon Pattern Language
 
MLSEV. BigML Workshop I
MLSEV. BigML Workshop IMLSEV. BigML Workshop I
MLSEV. BigML Workshop I
 
Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...
Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...
Doubt Truth to be a Liar: Non Triviality of Type Safety for Machine Learning ...
 
Miso
MisoMiso
Miso
 
Angular
AngularAngular
Angular
 

More from miso_uam

Model-driven engineering for AR
Model-driven engineering for ARModel-driven engineering for AR
Model-driven engineering for ARmiso_uam
 
Capone.pdf
Capone.pdfCapone.pdf
Capone.pdfmiso_uam
 
MLE_keynote.pdf
MLE_keynote.pdfMLE_keynote.pdf
MLE_keynote.pdfmiso_uam
 
Scientific writing
Scientific writingScientific writing
Scientific writingmiso_uam
 
Máster en Métodos Formales en Ingeniería Informática
Máster en Métodos Formales en Ingeniería InformáticaMáster en Métodos Formales en Ingeniería Informática
Máster en Métodos Formales en Ingeniería Informáticamiso_uam
 
Analysing-MMPLs
Analysing-MMPLsAnalysing-MMPLs
Analysing-MMPLsmiso_uam
 
Miso-McGill
Miso-McGillMiso-McGill
Miso-McGillmiso_uam
 
MDE-experiments
MDE-experimentsMDE-experiments
MDE-experimentsmiso_uam
 
keynote modelsward 2017
keynote modelsward 2017keynote modelsward 2017
keynote modelsward 2017miso_uam
 
MODELSWARD 2017 Panel
MODELSWARD 2017 PanelMODELSWARD 2017 Panel
MODELSWARD 2017 Panelmiso_uam
 

More from miso_uam (20)

Model-driven engineering for AR
Model-driven engineering for ARModel-driven engineering for AR
Model-driven engineering for AR
 
Capone.pdf
Capone.pdfCapone.pdf
Capone.pdf
 
MLE_keynote.pdf
MLE_keynote.pdfMLE_keynote.pdf
MLE_keynote.pdf
 
Multi21
Multi21Multi21
Multi21
 
MLMPLs
MLMPLsMLMPLs
MLMPLs
 
Scientific writing
Scientific writingScientific writing
Scientific writing
 
SLE_MIP08
SLE_MIP08SLE_MIP08
SLE_MIP08
 
mtATL
mtATLmtATL
mtATL
 
Máster en Métodos Formales en Ingeniería Informática
Máster en Métodos Formales en Ingeniería InformáticaMáster en Métodos Formales en Ingeniería Informática
Máster en Métodos Formales en Ingeniería Informática
 
Analysing-MMPLs
Analysing-MMPLsAnalysing-MMPLs
Analysing-MMPLs
 
kite
kitekite
kite
 
MTPLs
MTPLsMTPLs
MTPLs
 
Miso-McGill
Miso-McGillMiso-McGill
Miso-McGill
 
DSLcomet
DSLcometDSLcomet
DSLcomet
 
SICOMORO
SICOMOROSICOMORO
SICOMORO
 
ReusingMT
ReusingMTReusingMT
ReusingMT
 
MDE-experiments
MDE-experimentsMDE-experiments
MDE-experiments
 
keynote modelsward 2017
keynote modelsward 2017keynote modelsward 2017
keynote modelsward 2017
 
MODELSWARD 2017 Panel
MODELSWARD 2017 PanelMODELSWARD 2017 Panel
MODELSWARD 2017 Panel
 
MetaDepth
MetaDepthMetaDepth
MetaDepth
 

Recently uploaded

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Facets

  • 1. FACET-ORIENTED MODELLING OPEN OBJECTS FOR MODEL- DRIVEN ENGINEERING SLE’2018, Boston J. de Lara1, E. Guerra1, J. Kienzle2, Y. Hattab2 1Universidad Autónoma de Madrid (Spain) 2McGill University (Canada)
  • 2. MOTIVATION Model-driven Engineering • Models are the principal artifacts • Models conform to a meta-model Objects are closed • Created using classes as templates • Slots, types, and constraints cannot be changed This rigidity makes some MDE scenarios difficult • Reuse of model transformations • Model extension • Multi-view modelling • … 2 Person fullName: String age: int female: boolean :Person fullName=“Homer ” age=36 female=false Meta-model Model «conforms»
  • 3. MOTIVATION: REUSE 3 Person fullName: String age: int female: boolean Address street: String city: String address spouse 0..1 Census :Person fullName=“Homer ” age=36 female=false Group Element quantity: int elems Metrics * operation Group avg(): Real { if (elems.isEmpty()) return 0; return elems.quantity.sum()/ elems.size(); } :Person fullName=“Todd” age=8 female=false … Springfield: Census «conforms» Calculate average age of all male adults in Springfield Can we reuse operation avg on Census models? • Retype some Persons as Elements • Create a Group containing all male adults
  • 4. MOTIVATION: MODEL EXTENSION 4 Person fullName: String age: int female: boolean Address street: String city: String address spouse 0..1 Census :Person fullName=“Homer ” age=36 female=false :Person fullName=“Todd” age=8 female=false … Springfield: Census «conforms» Employment Company name: String vatId: String employees * Owner name: String Employee name: String salary: double ssNumber: int active: boolean belongsTo minSalary inv: self.salary > 15000 reportsTo Can we extend existing Person objects with Employment info? • Retype some Persons as Employees or Owners • Add corresponding slots and constraints
  • 5. IN THIS TALK… New modelling mechanism: the facet • brings flexibility and dynamism to modelling • lightweight: facets are just objects Objects become open • can acquire and drop slots, types and constraints Facet laws • specify when objects acquire/drop facets Practical implementation • on top of metaDepth, a textual meta-modelling tool 5
  • 6. WHAT’S A FACET? A facet is an object • becomes part of another one(s), called the host object(s), • the slots of the facet become transparently accessible from the host, which also acquires the type and constraints of the facet. A host object can acquire and drop facets dynamically 6 homer :Person fullName= “Homer” age= 57 female= false emp: Employee name= “Homer” salary=47500 ssNumber=12345 active=true Springfield :Census emp: Employee[1] : Employment homer :Person :Employee age= 57 female= false fullName= name= “Homer” salary=47500 ssNumber=12345 active=true Springfield :Census :Employment emp: Employee host object facet
  • 7. WHAT’S A FACET? Object homer receives: • Slots (name, salary, ssNumber, active) • Type (Employee) • Constraints (minSalary) From its emp facet Host and facet slots may be synchronized • fullName and name • Changing either one modifies the other Slot name ambiguity • Resolved by facet name (homer.emp) Shared facets and several facets in hosts 7 homer :Person :Employee age= 57 female= false fullName= name= “Homer” salary=47500 ssNumber=12345 active=true Springfield :Census :Employment emp: Employee Employment Employee name: String salary: double ssNumber: int active: boolean minSalary inv: salary > 15000 … «conforms» Census … «conforms»
  • 8. FACET MANAGEMENT A DSL for adding/removing facets to objects 8 addFacet homer emp: Employment.Employee with { name = fullName [equality] salary = 22345 ssNumber = 12345 active = true } addFacet $Person.allInstances()→select(age>17)$ emp: Employment.Employee with {…} Explicit host selection Query-based host selection addFacet h:Person, w:Person where $h.spouse=w$ emp: Employment.Employee with {…} Pattern-based host selection Selection of host objects by id Selection of host objects by properties (similar commands for removing a facet)
  • 9. FACET MANAGEMENT 9 addFacet h:Person, w:Person where $h.spouse=w$ emp: Employment.Employee with {…} reuse Facet shared among all selected host objects addFacet homer dayJob: Employment.Employee with { name = fullName [equality] salary = 15000 ssNumber = 12345 active = true } nightJob: Employment.Employee with { name = fullName [equality] salary = 16400 ssNumber = dayJob.ssNumber [equality] active = dayJob.active [equality] } Several facets in same host object One-to-many and many-to-one host/facet relations are supported
  • 10. MODEL SCENES 10 Springfield :Census :Employment homer :Person :Employee age=57 female=false fullName=“Homer” name=“Homer” dayJob, nightJob ssNumber=12345 dayJob, nightJob active=true dayJob, nightJob salary=15000 dayJob salary=16400 nightJob simsHome :Address street=“Evergreen Terrace” city=“Springfield” :address Different visualizations for a model • “Scenes” Total scene • Default visualization Total scene
  • 11. MODEL SCENES 11 Different visualizations for a model • “Scenes” Total scene • Default visualization Sliced scene • W.r.t. a given facet meta-model Springfield :Employment homer :Employee name=“Homer” dayJob, nightJob ssNumber=12345 dayJob, nightJob active=true dayJob, nightJob salary=15000 dayJob salary=16400 nightJob Scene sliced by Employment
  • 12. MODEL SCENES 12 Different visualizations for a model • “Scenes” Total scene • Default visualization Sliced scene • W.r.t. a given facet meta-model Granulated • Shows facets typed w.r.t. a certain meta- model Springfield :Employment nightJob :Employee name=“Homer” salary=16400 ssNumber=12345 active=true name=“Homer” salary=15000 ssNumber=12345 active=true dayJob :Employee Scene granulated by Employment
  • 13. FACET LAWS AND INTERFACES Opportunistic vs planned handling of facets Control which elements can be used as facets Declarative specification of conditions for acquiring/droping facets 13 :CMM :FMM FMMCMM Facet Interface «conformsto» «conformsto» Creation MM Facet MM model with facets Facet Law
  • 14. FACET INTERFACES Restricts how a meta-model can be used for facet-based modelling Declares • classes that can be used to create facets • allowed combinations • extra well-formedness constraints (eg., due to facet combination) 14 FacetInterface for Employment { public: all compatible: [Employee, Owner] constraints: Employee.repToIrreflexive= $self.reportsTo.excludes(self)$ }
  • 15. FACET LAWS Specs stating when host objects should acquire/drop a facet • must/may Can add additional constraints and set default values Setting homer.age:=16 makes homer drop the work facet 15 FacetLaws for Census with Employment { must extend <p:Person> where $p.age>17$ with work:Employee with { name = fullName [equality] salary = 24000 minLocalSalary: $ self.salary>16000 $ retirement: $ self.age>65 implies not self.active $ } }
  • 16. FACET LAWS Check manually issued addFacet/removeFacet commands • Should conform to the facet laws, if defined Check faceted models for consistency • Models should satisfy the laws To complete addFacet commands • Take default values and slot relations from the laws To constraint facets • By adding extra constraints To automate facet acquisition/loss • Via the “must” extension laws • addFacet/removeFacet automatically issued 16
  • 17. TOOL SUPPORT MetaDepth (http://metaDepth.org) • Textual multi-level modelling tool • Epsilon languages for model management (EOL, ETL, EGL) Facets, facet handling, interfaces, laws Mirror fields Triggered constraints (add/drop facets) 17 Model Census { Node Person{ name: String; age: int; female: boolean = true; spouse: Person[0..1]; address: Address[1]; } Node Address { street: String; city: String; } } var p : Person := new Person; p.age := 23; // implicitly creates an Employee facet (as p.age > 17) p.salary := 15100; // OK, as p has now an Employee facet p.age := 16; // p loses its Employee facet (as p.age <= 17) p.salary := 21000; // Error! p has no Employee facet EOL program Census meta-model
  • 18. EVALUATION Based on three scenarios • Integration of annotation models • Reuse of model management operations • Multi-view modelling Comparison with solutions using alternative techniques • Cross-referencing, EMF profiles, a-posterioti typing • Model adaptation, a-posteriori typing, concepts, model typing • Central repository, OpenFlexo, OSM, Vitruvius 18
  • 19. INTEGRATING ANNOTATION MODELS Annotation models widely used in MDE: • Concrete syntax (CS) representation, uncertainty, variability, access control, etc. 19 Model ConcreteSyntax { abstract Node GraphicalElem { x, y : int; label : String; linkedTo : GraphicalElem[∗]; } Node Rectangle : GraphicalElem { width, height : int; } Node Circle : GraphicalElem { radius : int; } } Graphical CS support • Meta-model • Simple visualizer • Facet laws to assign CS to domain meta-models We obtain for free: • Bidirectional synchronization textual/graphical CS. CS meta-model
  • 20. 20 FacetLaws for Census with ConcreteSyntax { must extend <p:Person> where $p.female$ with c:Circle with { label = name [equality] linkedTo = spouse [equality] radius = age [equality] } must extend <p:Person> where $not p.female$ with r:Rectangle with { label = name [equality] linkedTo = spouse [equality] height = age [equality] width = age [equality] } } CS FOR CENSUS Census Springfield { Person marge{ name = "Marge"; age = 47; spouse = homer; address= simsHouse; } … } Synch. (scene sliced by Census)
  • 21. CAN WE DO THIS DIFFERENTY? 21 Cannot be used to fully solve this case study: Cross-referencing, EMF profiles • No direct support for conditional styles (different CS based on female) • No direct support for bidirectional changes A-posteriori typing • Cannot map slots like x and y [1] Langer, Wieland, Wimmer,Cabot. EMF profiles: a lightweight extension approach for EMF models. JOT 11,1(2012),1–29. [2] de Lara, Guerra. A posteriori typing for model-driven engineering: Concepts, analysis, and applications. ACM TOSEM 25, 4(2017),31:1–31:60. [1] [2]
  • 22. RELATED WORKS Role-based modelling (eg., Lodwick [1], CROM [2]) • Facets fulfill most typical features of role-based languages • Heavyweight (role, natural, compartment types) • Practical integration with MDE: inheritance, attribute/slot handling, OCL constraints, integration with model management languages A-posteriori typing • Can dynamically add/remove types • Cannot add slots or constraints 22 [1] Steimann. On the representation of roles in object-oriented and conceptual modelling. Data Knowl. Eng. 35,1(2000),83–106. [2] Kühn, Böhme, Götz,Aßmann. A combined formal model for relational context-dependent roles. In SLE’15. pp.:113–124. de Lara, Guerra. A posteriori typing for model-driven engineering: Concepts, analysis, and applications. ACM TOSEM 25, 4(2017),31:1–31:60.
  • 23. CONCLUSIONS Facets add flexibility and dynamicity to modelling • make objects open • acquire/drop slots, types and constraints dynamically Facet management operations • addFacet/deleteFacet Facet interfaces Facet laws • property-based facet acquisition and drop Some scenarios where facets present advantages • annotation models, transformation reuse, multi-view modelling Implementation on top of metaDepth 23
  • 24. FUTURE WORK Symmetrical approach (host/facet) • Untyped objects (empty shells) • Everyting else is added by facets • Traditional modelling as a (static) special case of this approach Analysis • Constraints in meta-models and those in laws/interfaces • Static analysis of model management programs Further scenarios • Multi-abstraction modelling (abstractions as facets of lower-level elts) • Multi-level modelling (facets for deep characterization) • Models at run-time (dynamic change) • Dynamic product lines (model reconfiguration) 24