model driven development and code generation of software systems
TRANSCRIPT
![Page 1: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/1.jpg)
Model-Driven Development and Code Generation of Software Systems
Marco BrambillaPolitecnico di Milano [email protected]
@marcobrambi
![Page 2: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/2.jpg)
Agenda
• Research field
• Research path
• A sample of research topics• From business processes to software applications
• Generating code for crowdsourcing
• Impact and perspectives
![Page 3: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/3.jpg)
Field
Marco BrambillaPolitecnico di Milano
@marcobrambi
![Page 4: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/4.jpg)
• Improving software development and maintenance productivity
Context
Liberated programmingSelf-healing and self-
evolving programs
End-user Development (EUP), Mashups, …
Agile development
Modeling and Code Generation Approaches
(MDE)
![Page 5: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/5.jpg)
[B1] Brambilla, Cabot, Wimmer. Model-Driven Software Engineering In Practice.
Morgan & Claypool, USA, 2012.
• Engineering practices based on models
Model-based Engineering
Model
Features:• Mapping • Reduction• Pragmatism
System
Represents
Purposes: • Descriptive• Prescriptive
![Page 6: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/6.jpg)
• Model-Based Engineering (MBE)
• Model-Driven Engineering (MDE)
• Model-Driven Development (MDD)
• Model-driven Architecture (MDA)
The MD* Acronyms Map
![Page 7: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/7.jpg)
• Model-Based Engineering (MBE)
• Model-Driven Engineering (MDE)
• Model-Driven Development (MDD)
• Model-driven Architecture (MDA)
The MD* Acronyms Map
![Page 8: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/8.jpg)
• Models (M)
• Model Transformations (MT)
The MDE Ingredients
![Page 9: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/9.jpg)
MDE Basic ArchitectureR
ealiz
atio
nM
odel
ing
Model
Artifacts(e.g. code)
Modelinglanguage
Platform
Meta-modelinglanguage
Transformationdefinition
Transformationlanguage
uses
defined using
defined by
Application domainApplication Meta-Level
Aut
omat
ion
Transformation
Abstraction (bottom-up)Reuse
Construction (top-down)
![Page 10: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/10.jpg)
MDE Basic ArchitectureR
ealiz
atio
nM
odel
ing
Model
Artifacts(e.g. code)
Modelinglanguage
Platform
Meta-modelinglanguage
Transformationdefinition
Transformationlanguage
uses
defined using
defined by
Application domainApplication Meta-Level
Aut
omat
ion
Transformation
Abstraction (bottom-up)Reuse
Construction (top-down)
![Page 11: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/11.jpg)
Research Path
Marco BrambillaPolitecnico di Milano
@marcobrambi
![Page 12: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/12.jpg)
Research pathS
uppo
rted
sub
syst
ems
and
data
sou
rces
SW Devel. Process Span
Crowds
Social Net.
Search Eng.
Ontologies
Processes
Web Serv.
Relational
Requirements Business Design Application Design Code Gen.
Data intensive
SOA
BPM
Sem. Web / LD
Structured Web Data
SN Integr. & Expert finding
Crowd control & integr.
Social BPM
Advanced Search UI
![Page 13: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/13.jpg)
Main research resultsS
uppo
rted
sub
syst
ems
and
data
sou
rces
Crowds.
Social Net.
Search Eng.
Ontologies/ Sem. Web
Processes
Web Serv.
Relational (& MDE)
• Reactive CrowdSourcing. ACM Conf. on World Wide Web WWW 2013• Answering search queries with CrowdSearcher. ACM Conf. on World Wide Web
WWW 2012
• Choosing the Right Crowd: Expert Finding in Social Networks, EDBT 2013• From Requirements to Implementation of Ad-hoc Social Web Applications: an
Empirical Pattern-Based Approach. IET-Sw, 2012
• A bottom-up, knowledge-aware approach to integrating and querying web data services. ACM Trans. on the Web (TWEB), 2013
• Exploratory search framework for Web data sources. VLDB Journal, 2013
• Model-Driven Design and Development of Semantic Web Service Applications, ACM Trans. on Internet Technology (TOIT), 2007
• Process modeling in Web applications. ACM Trans. Softw. Eng. Methodol (TOSEM), 2006
• Exception Handling in Workflow-Driven Web Applications. ACM Conf. on World Wide Web WWW 2005
• Model-driven design and deployment of service-enabled web applications. ACM Trans. Internet Technology (TOIT), 2005
• Designing Data-Intensive Web Applications, Morgan-Kaufmann, 2003• The Role of Visual Tools in a Web Application Design and Verification
Framework: A Visual Notation for LTL Formulae.Conf. Web Eng. ICWE 2005• Content search over model repositories. ACM Transactions on the Web (TWEB),
2014 in print.
![Page 14: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/14.jpg)
Topic 1From Business Processesto Software Applications
Marco BrambillaPolitecnico di Milano
@marcobrambi
![Page 15: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/15.jpg)
Addressed problem
• Communication chasm between business and IT is one of the main weaknesses of large organizations• Different language
• Different objectives
• Different quality metrics
• Bridging the gap between business requirements and IT realizations (from design to deployment)
• My challenge: • Business business processes (BPMN)
• IT SOA-oriented and Web-based implementation
![Page 16: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/16.jpg)
• Manual specification of BPMN process model
• Automatic transformation of BPMN to WebML
• Possible manual refinement of WebML models
• Automatic full code generation
Model-driven Development Process
![Page 17: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/17.jpg)
• Manual specification of BPMN process model
• Automatic transformation of BPMN to WebML
• Possible manual refinement of WebML models
• Automatic full code generation
Model-driven Development Process
![Page 18: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/18.jpg)
BPM Application model transformation
Transformation rulesINPUT: BPMN model enriched with data and activity typing
• typed activities enable reusable application models• data dependencies are specified at high level
![Page 19: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/19.jpg)
BPM Application model transformation
Transformation rulesOUTPUT: fine-grained Application Model, needing few refinements by the designer
![Page 20: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/20.jpg)
BPMN WebML transformation
20
(1) One control siteview per pool: Human interaction
![Page 21: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/21.jpg)
BPMN WebML transformation
21
(1) One control siteview per pool: Human interaction(2) One control view per pool: Choreography
![Page 22: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/22.jpg)
BPMN WebML transformation
22
(1) One control siteview per pool: Human interaction(2) One control serviceview per pool: WS Choreography(3) One site view per lane: user navigation
![Page 23: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/23.jpg)
BPMN WebML transformation
23
(4) One site view per lane: business logics of activities and gateways
![Page 24: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/24.jpg)
BPMN WebML transformationTransformation rules
finer-grained Application Model, needing few refinements by the designer
• typed activities enables reusable application models• data dependencies are specified at a higher level
less errors in Application Model design
Faster development
24
(1) One control siteview per pool: Human interaction(2) One control serviceview per pool: WS Choreography(3) One site view per lane: user navigation(4) One site view per lane: business logics of activities and gateways(4) One site view per lane: business logics of activities and gateways(5) Orchestration view: a controller component invokes the activities
![Page 25: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/25.jpg)
• Backward engineering (2): modularization of hypertext pieces and reuse as activity types through catalogues
• Reverse Engineering (3): decomposition of the web application and extraction of the BP model
• Aspect-oriented adaptation of transformation rules: • Higher order transformations for: security, company-specific integration, …
• Cross-model validation &coherence
Additional investigations
![Page 26: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/26.jpg)
Topic 2Crowdsourcing based
web applications
Marco BrambillaPolitecnico di Milano
@marcobrambi
![Page 27: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/27.jpg)
•Schema of the process decided and deployed centrally•Tasks defined rigidly •Actor roles predefined and assigned to tasks
Closed BPM
•Opens the process design to multiple actors•Stakeholders can participate and fuse processes•End users can define their processes
Participatory Design
•Social tools integrated into the process execution•Collateral communications allowed, like following up the status, commenting, voting, etc.
Participatory Enactment
•Process execution open (in part) to actors that are not known a priori•Collective (community or crowd based) execution of a task allowed.
Social/Crowd Enactment
From BPM to Social and Crowd Performers
![Page 28: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/28.jpg)
•Schema of the process decided and deployed centrally•Tasks defined rigidly •Actor roles predefined and assigned to tasks
Closed BPM
•Opens the process design to multiple actors•Stakeholders can participate and fuse processes•End users can define their processes
Participatory Design
•Social tools integrated into the process execution•Collateral communications allowed, like following up the status, commenting, voting, etc.
Participatory Enactment
•Process execution open (in part) to actors that are not known a priori•Collective (community or crowd based) execution of a task allowed.
Social/Crowd Enactment
From BPM to Social and Crowd Performers
![Page 29: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/29.jpg)
Crowd-based Applications
Emerging crowd-based applications:opinion mining
localized information or expert response gathering
content annotation and enrichment
General structure of crowdsourcing: the requestor poses some questions
a wide set of responders (typically unknown to the requestor)are in charge of providing answers
the crowdsourcing system organizes a response collection campaign
![Page 30: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/30.jpg)
Crowd Control is tough…
Crowd engineering is complicated Task design, planning, assignment
Workers discovery, assessment, engagement
Controlling crowdsourcing is fundamentalCost
Time
Quality
Need for higher level abstraction and tools
![Page 31: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/31.jpg)
My take on crowdsourcing: CrowdSearcher
Crowdsearcher comprises • a conceptual framework
• a specification paradigm and tool
• a reactive execution control environment
Supports designing, deploying, monitoring, and controlling crowd-based systems
Design is top-down, platform-independent
Deployment turns declarative specifications into platform-specific implementations which include social networks and crowdsourcing platforms
![Page 32: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/32.jpg)
(simplified) example: crowdsourcing opinions on new job position (1)
![Page 33: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/33.jpg)
(simplified) example: crowdsourcing opinions on new job position (2)
![Page 34: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/34.jpg)
The CrowdSearcher features and architecture
Cross-platform integration: social networks and Q&A websites in addition to crowdsourcing platforms
Crowd control: model-driven engine controls application deployment and execution
CrowdSearcher
API Access
![Page 35: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/35.jpg)
A simple task design and deployment process, based on specific data structures
created using model-driven transformations
driven by the task specification
The Design Process of crowd-based apps within CrowdSearcher
Task Specification Task Planning Control Specification
• Task Specification: task operations, objects, and performers• Task Planning: work distribution• Control Specification: task control policies
![Page 36: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/36.jpg)
Model-driven engineering setting
Task Specification
Task Planning
Control Specification
![Page 37: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/37.jpg)
Model-driven engineering setting
Task Specification
Task Planning
Control Specification
![Page 38: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/38.jpg)
Model-driven engineering setting
Task Specification
Task Planning
Control Specification
![Page 39: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/39.jpg)
CrowdSearcher Meta-Model
![Page 40: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/40.jpg)
CrowdSearcher Datamart for Runtime Control
![Page 41: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/41.jpg)
Example experiment: Professors’ images
Classification of images retrieved from Google
• 16 professors within 2 research groups in DEIB (DB and AI groups)
• The top 50 images returned by the Google Image API for each query
• Each microtask consisted of classifying 5 images regarding a professor
• Agreement of multiple performers checked on the image
• Randomization of the image order
![Page 42: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/42.jpg)
Experiment objectives
Validating impact of model-driven change of:• Crowdsourcing strategies (majority, agreement)
• Crowd communities
• Control rules (order of invitations, …)
Measures:• Speed of result collection (number of closed objects in time)
• Quality of classification results (precision of responses)
The communities:• the research group of the professor
• the research area containing the group (e.g. Computer Science)
• and the whole department (more than 600 people in different areas)
• Polimi-related social networks
![Page 43: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/43.jpg)
Precision of communities
![Page 44: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/44.jpg)
Control rules: order of invitation
Precision decreases with less expert communities
Outside-in strategy (from generic to expert users) outperforms inside-out strategy (from expert to generic)
![Page 45: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/45.jpg)
Strategies Evaluation: different majorities
![Page 46: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/46.jpg)
Evaluations
• Different strategies and communities impact on quality, cost and time
• Cost of adapting is very low thanks to definition of strategies and rules at design level and model-driven generation of running system
![Page 47: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/47.jpg)
Impact
Marco BrambillaPolitecnico di Milano
@marcobrambi
![Page 48: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/48.jpg)
User interaction has been overlooked in software engineering standards
Hence the Interaction Flow Modeling Language (IFML)
Final voting on version 1.0, after 3+ years of work
Standardization
Proposed as a standard in OMG (Object Management Group)
In less than 2 years (a record in OMG!), we obtained approval of the IFML standard (March 2013)
Brambilla, Fraternali. “Model-driven UI Engineering of Web and Mobile Apps with IFML”. Morgan Kauffmann, USA, 2014.
![Page 49: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/49.jpg)
IFML (and formerly WebML)has been exploited by the spinoff WebRatio
Commercial modeler and code generator based on IFML and BPMN
17,000 academic licenses
150+ industrial customers (including Acer, Ikea, Unicredit, General Electrics, …)
US and LA branches
Different time-to-market for research ideas• From 0 (web service modeling) to 4 (BPM) years!
Industrial exploitation
![Page 50: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/50.jpg)
Conclusion: innovation-enabling ecosystem
Research (Research group
at Polimi)
Method, Language
and Platform
Spin-off(WebRatio)
Customers (including EU
projects)
Teaching (Polimi and int.l courses)
innovation
innovation toolsuite
Toolsuite, industrial requirements
innovation
requirementsuse cases
Standard
& other SME Partners
![Page 51: Model driven development and code generation of software systems](https://reader037.vdocuments.us/reader037/viewer/2022110306/554a061cb4c9055b7a8b5517/html5/thumbnails/51.jpg)
Thanks
Marco BrambillaPolitecnico di Milano
@marcobrambi