SlideShare a Scribd company logo
1 of 25
Download to read offline
Robust Real-Time Synchronization
between Textual and Graphical Editors
Oskar van Rest
Guido Wachsmuth
Jim Steel
Jörn Guy Süß
Eelco Visser
2 / 25
Entity Language
3 / 25
Behavior Trees
Modeling in terms of requirements and behavior
4 / 25
SPARQL
Query RDF data textually or graphically
5 / 25
Architecture
6 / 25
Grammar-to-metamodel
lexical syntax
[a-zA-Z][a-zA-Z0-9]* -> ID
context-free syntax
"module" ID Type* -> Start {"Module"}
"entity" ID "{" Property* "}" -> Type {"Entity"}
"datatype" ID -> Type {"DataType"}
"attr" ID ":" ID -> Property {"Attribute"}
"ref" ID ":" ID -> Property {"Reference"}
namespaces
Module
Entity
DataType
Property
binding rules
Module(n, _):
defines Module n
scopes Entity, DataType
Attribute(n, t):
defines Property n
refers to DataType t
...
7 / 25
Tree-to-model & Model-to-tree
Module(
"Library"
, [ Entity(
"Book"
, [ Attribute("title", "String")
, Reference("author", "Author")
]
)
, Entity("Author", [])
, DataType("String")
]
)
8 / 25
Runtime Architecture
synchronize
tree-to-model
diff calc. + merge
diff calc. + merge
model-to-tree
parse
9 / 25
Runtime Architecture
real-time
= small changes = precise diff calc. = precise layout preservation
tree-to-model
diff calc. + merge
diff calc. + merge
model-to-tree
parse
synchronize
10 / 25
Graphical Layout Preservation (1)
Conventional approach:
●
Replace entire model with new one
●
Re-link layout based on names/indices
●
Fails when names/indices change
entity Book2 {
attr title : String
ref author : Author
}
entity Author {}
entity Book {
attr title : String
ref author : Author
}
entity Author {}sync.
change
sync.
11 / 25
diff calc. + merge
Graphical Layout Preservation (2)
New approach:
Change rather than replace model
Update graph. represent. accordingly
3
4
synchronize
12 / 25
diff calc. + merge
Textual Layout Preservation (1)
Compare ASTs and merge changes into text:
●
Preserve unchanged elements
●
Pretty-print new elements
●
Pretty-print changed elements, but reassign layout
13 / 25
Textual Layout Preservation (2)
Pretty-printers are generated from SDF3 definition:
14 / 25
Textual Layout Preservation (3)
Use origin information to:
●
Merge text (use origin position)
●
Improve diff calc. (try match origin term, otherwise use heuristics)
origin position
origin term
origin term
diff calc. + merge
15 / 25
Error Recovery
Apply recovery rules:
●
Recovery rules generated from the grammar
●
Malformed text → well-formed AST
Parse errors (1)
16 / 25
Error Recovery
Treat unrecoverable text regions as layout:
●
Layout preserved during graphical editing
●
Graphical layout (currently) lost
Parse errors (2)
17 / 25
Error Recovery
Leave unresolved references out of model:
●
Violations of lower bound constraints allowed
●
Elements still visualized when possible
Unresolved references
18 / 25
Error Recovery
Introduce defaults to avoid syntax errors:
●
Defaults can be user-defined
●
Defaults may result in temp. unresolved references
Graphical syntax errors
19 / 25
Editor Services
Undo-Redo:
●
Maintain single (shared)
operation history
Selection sharing:
Persistence:
●
Persist text and graph
●
Persist text
(auto-layout diagram)
●
Persist AST/model
(auto-layout diagram + pretty-print text)
20 / 25
Structural heterogeneity (1)
Generated metamodels not always suitable for
particular graphical syntax:
context-free syntax
"[" integers:{INT ","}* "]" -> Start {"IntSeq"}
[5, 2, 6, 3]
indefinable
mapping
textual syntax
grammar
generated and non-
generated metamodels
graphical syntax
21 / 25
Problem*:
[textual syntax] ≈ [grammar] = [metamodel] ≈ [graphical syntax]
Structural heterogeneity (2)
*[x] = structure of x
22 / 25
Structural heterogeneity (3)
Solution*:
[textual syntax] ≈ [grammar] ≠ [metamodel] ≈ [graphical syntax]
*[x] = structure of x
newnew
23 / 25
Future Work (1)
Multi-file support
n files 1 view
24 / 25
Future Work (2)
Synchronization between textual editors
25 / 25The Spoofax Language Workbench – www.spoofax.org
Robust Real-Time Synchronization
between Textual and Graphical Editors

More Related Content

Viewers also liked

NIH Career Development (K) Awards: Taking Your Research Career to New Heights
NIH Career Development (K) Awards: Taking Your Research Career to New HeightsNIH Career Development (K) Awards: Taking Your Research Career to New Heights
NIH Career Development (K) Awards: Taking Your Research Career to New HeightsPrincipal Investigator Leader
 
致明天的我们 20120606
致明天的我们 20120606致明天的我们 20120606
致明天的我们 20120606cash0430
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.pptIQM123
 
Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2stefany
 
사진 앨범
사진 앨범사진 앨범
사진 앨범net4you
 
Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2stefany
 
NewTest-910080.ppt
NewTest-910080.pptNewTest-910080.ppt
NewTest-910080.pptIQM123
 
Rust samurai lightning talk
Rust samurai lightning talkRust samurai lightning talk
Rust samurai lightning talkNaruto TAKAHASHI
 
New test
New testNew test
New testIQM123
 
Projeto prática pedagógica IV
Projeto prática pedagógica IVProjeto prática pedagógica IV
Projeto prática pedagógica IVGirleno Oliveira
 
IFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLING
IFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLINGIFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLING
IFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLINGLancaster University
 
The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...
The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...
The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...Celinda Appleby
 

Viewers also liked (20)

Merge In Sql 2008
Merge In Sql 2008Merge In Sql 2008
Merge In Sql 2008
 
DotNet Conference: code smells
DotNet Conference: code smellsDotNet Conference: code smells
DotNet Conference: code smells
 
NIH Career Development (K) Awards: Taking Your Research Career to New Heights
NIH Career Development (K) Awards: Taking Your Research Career to New HeightsNIH Career Development (K) Awards: Taking Your Research Career to New Heights
NIH Career Development (K) Awards: Taking Your Research Career to New Heights
 
致明天的我们 20120606
致明天的我们 20120606致明天的我们 20120606
致明天的我们 20120606
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.ppt
 
Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2
 
사진 앨범
사진 앨범사진 앨범
사진 앨범
 
Freello | Mobile Marketing 4 Media
Freello | Mobile Marketing 4 MediaFreello | Mobile Marketing 4 Media
Freello | Mobile Marketing 4 Media
 
Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2Universidad de san bueneventura –cartagena2
Universidad de san bueneventura –cartagena2
 
Freshwater Matters August2013
Freshwater Matters August2013Freshwater Matters August2013
Freshwater Matters August2013
 
NewTest-910080.ppt
NewTest-910080.pptNewTest-910080.ppt
NewTest-910080.ppt
 
2.1 ordinal numbers
2.1 ordinal numbers2.1 ordinal numbers
2.1 ordinal numbers
 
Rust samurai lightning talk
Rust samurai lightning talkRust samurai lightning talk
Rust samurai lightning talk
 
Freello mobile-marketing-4-brands
Freello mobile-marketing-4-brandsFreello mobile-marketing-4-brands
Freello mobile-marketing-4-brands
 
New test
New testNew test
New test
 
Projeto prática pedagógica IV
Projeto prática pedagógica IVProjeto prática pedagógica IV
Projeto prática pedagógica IV
 
Antonio orozco
Antonio orozcoAntonio orozco
Antonio orozco
 
IFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLING
IFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLINGIFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLING
IFM Flyer - AN IFCA PERSPECTIVE ON RECREATIONAL SEA ANGLING
 
Freello #Expo2015 #Milano
Freello #Expo2015 #MilanoFreello #Expo2015 #Milano
Freello #Expo2015 #Milano
 
The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...
The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...
The "Social" Relationship between Marketing & Recruiting for TMA _ Celinda Ap...
 

Similar to Robust Real-Time Synchronization between Textual and Graphical Editors

Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management systemSaibee Alam
 
Microsoft R - ScaleR Overview
Microsoft R - ScaleR OverviewMicrosoft R - ScaleR Overview
Microsoft R - ScaleR OverviewKhalid Salama
 
Dev Sql Beyond Relational
Dev Sql Beyond RelationalDev Sql Beyond Relational
Dev Sql Beyond Relationalrsnarayanan
 
A Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta LakeA Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta LakeDatabricks
 
DC-2008 Architecture Forum Open session
DC-2008 Architecture Forum Open sessionDC-2008 Architecture Forum Open session
DC-2008 Architecture Forum Open sessionMikael Nilsson
 
Sql session qt cs
Sql session qt csSql session qt cs
Sql session qt csAndreSomers
 
Ado.net & data persistence frameworks
Ado.net & data persistence frameworksAdo.net & data persistence frameworks
Ado.net & data persistence frameworksLuis Goldster
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lalit009kumar
 
ASP.NET 3.5 SP1
ASP.NET 3.5 SP1ASP.NET 3.5 SP1
ASP.NET 3.5 SP1Dave Allen
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data TypeMarko Rodriguez
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And XmlDavid Truxall
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf3BRBoruMedia
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developersukdpe
 
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)lennartkats
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
Structuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingStructuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingDatabricks
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries Database Management Lab -SQL Queries
Database Management Lab -SQL Queries shamim hossain
 

Similar to Robust Real-Time Synchronization between Textual and Graphical Editors (20)

Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management system
 
Cdi implementation
Cdi implementationCdi implementation
Cdi implementation
 
Database programming
Database programmingDatabase programming
Database programming
 
Microsoft R - ScaleR Overview
Microsoft R - ScaleR OverviewMicrosoft R - ScaleR Overview
Microsoft R - ScaleR Overview
 
Dev Sql Beyond Relational
Dev Sql Beyond RelationalDev Sql Beyond Relational
Dev Sql Beyond Relational
 
A Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta LakeA Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta Lake
 
DC-2008 Architecture Forum Open session
DC-2008 Architecture Forum Open sessionDC-2008 Architecture Forum Open session
DC-2008 Architecture Forum Open session
 
Sql session qt cs
Sql session qt csSql session qt cs
Sql session qt cs
 
Ado.net & data persistence frameworks
Ado.net & data persistence frameworksAdo.net & data persistence frameworks
Ado.net & data persistence frameworks
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02
 
ASP.NET 3.5 SP1
ASP.NET 3.5 SP1ASP.NET 3.5 SP1
ASP.NET 3.5 SP1
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Type
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
 
PT- Oracle session01
PT- Oracle session01 PT- Oracle session01
PT- Oracle session01
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Structuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingStructuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and Streaming
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries Database Management Lab -SQL Queries
Database Management Lab -SQL Queries
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Robust Real-Time Synchronization between Textual and Graphical Editors

  • 1. Robust Real-Time Synchronization between Textual and Graphical Editors Oskar van Rest Guido Wachsmuth Jim Steel Jörn Guy Süß Eelco Visser
  • 2. 2 / 25 Entity Language
  • 3. 3 / 25 Behavior Trees Modeling in terms of requirements and behavior
  • 4. 4 / 25 SPARQL Query RDF data textually or graphically
  • 6. 6 / 25 Grammar-to-metamodel lexical syntax [a-zA-Z][a-zA-Z0-9]* -> ID context-free syntax "module" ID Type* -> Start {"Module"} "entity" ID "{" Property* "}" -> Type {"Entity"} "datatype" ID -> Type {"DataType"} "attr" ID ":" ID -> Property {"Attribute"} "ref" ID ":" ID -> Property {"Reference"} namespaces Module Entity DataType Property binding rules Module(n, _): defines Module n scopes Entity, DataType Attribute(n, t): defines Property n refers to DataType t ...
  • 7. 7 / 25 Tree-to-model & Model-to-tree Module( "Library" , [ Entity( "Book" , [ Attribute("title", "String") , Reference("author", "Author") ] ) , Entity("Author", []) , DataType("String") ] )
  • 8. 8 / 25 Runtime Architecture synchronize tree-to-model diff calc. + merge diff calc. + merge model-to-tree parse
  • 9. 9 / 25 Runtime Architecture real-time = small changes = precise diff calc. = precise layout preservation tree-to-model diff calc. + merge diff calc. + merge model-to-tree parse synchronize
  • 10. 10 / 25 Graphical Layout Preservation (1) Conventional approach: ● Replace entire model with new one ● Re-link layout based on names/indices ● Fails when names/indices change entity Book2 { attr title : String ref author : Author } entity Author {} entity Book { attr title : String ref author : Author } entity Author {}sync. change sync.
  • 11. 11 / 25 diff calc. + merge Graphical Layout Preservation (2) New approach: Change rather than replace model Update graph. represent. accordingly 3 4 synchronize
  • 12. 12 / 25 diff calc. + merge Textual Layout Preservation (1) Compare ASTs and merge changes into text: ● Preserve unchanged elements ● Pretty-print new elements ● Pretty-print changed elements, but reassign layout
  • 13. 13 / 25 Textual Layout Preservation (2) Pretty-printers are generated from SDF3 definition:
  • 14. 14 / 25 Textual Layout Preservation (3) Use origin information to: ● Merge text (use origin position) ● Improve diff calc. (try match origin term, otherwise use heuristics) origin position origin term origin term diff calc. + merge
  • 15. 15 / 25 Error Recovery Apply recovery rules: ● Recovery rules generated from the grammar ● Malformed text → well-formed AST Parse errors (1)
  • 16. 16 / 25 Error Recovery Treat unrecoverable text regions as layout: ● Layout preserved during graphical editing ● Graphical layout (currently) lost Parse errors (2)
  • 17. 17 / 25 Error Recovery Leave unresolved references out of model: ● Violations of lower bound constraints allowed ● Elements still visualized when possible Unresolved references
  • 18. 18 / 25 Error Recovery Introduce defaults to avoid syntax errors: ● Defaults can be user-defined ● Defaults may result in temp. unresolved references Graphical syntax errors
  • 19. 19 / 25 Editor Services Undo-Redo: ● Maintain single (shared) operation history Selection sharing: Persistence: ● Persist text and graph ● Persist text (auto-layout diagram) ● Persist AST/model (auto-layout diagram + pretty-print text)
  • 20. 20 / 25 Structural heterogeneity (1) Generated metamodels not always suitable for particular graphical syntax: context-free syntax "[" integers:{INT ","}* "]" -> Start {"IntSeq"} [5, 2, 6, 3] indefinable mapping textual syntax grammar generated and non- generated metamodels graphical syntax
  • 21. 21 / 25 Problem*: [textual syntax] ≈ [grammar] = [metamodel] ≈ [graphical syntax] Structural heterogeneity (2) *[x] = structure of x
  • 22. 22 / 25 Structural heterogeneity (3) Solution*: [textual syntax] ≈ [grammar] ≠ [metamodel] ≈ [graphical syntax] *[x] = structure of x newnew
  • 23. 23 / 25 Future Work (1) Multi-file support n files 1 view
  • 24. 24 / 25 Future Work (2) Synchronization between textual editors
  • 25. 25 / 25The Spoofax Language Workbench – www.spoofax.org Robust Real-Time Synchronization between Textual and Graphical Editors