Deep dive into Xtext scoping - local and global scopes explained, by H. Schill & S. Zarnekow

Subscribers:
24,000
Published on ● Video Link: https://www.youtube.com/watch?v=8WDyST9EIZc



Duration: 35:32
919 views
3


In Xtext's grammar language syntax and structure of models are defined at a single location in a very concise way. The nesting structure and the references between objects are expressed which goes beyond plain abstract syntax trees. By just pointing to a type of an object, we describe the shape of a syntax graph. But the grammar alone has no meaning to describe the visibility rules inside of a resource or across resource boundaries. Therefore Xtext has a concept of scopes that are modeled as a chain of responsibility. Xtext comes with a good default scoping semantic that fits for most simple problems, but when the amount of models grows or your problem cannot be handled by the default you have to get in touch with the scoping API. Or as others have said it: Beyond here are dragons.

Most Xtext users know how to implement scoping rules that are applied within the same resource. After all, the API is pretty straight forward. Referencing objects located in other resources is usually more tricky. Here the so called global scope provider is doing it’s job. By default, the global scope contains every object that has a name. Again, that’s good as a starting point and will work in most of the cases, but for serious languages, it doesn't cut it. Memory consumption and performance will play a bigger role as the amount of models grows. There is no turning back: As a language engineer, you really need to understand what’s going on under the covers to define scaling implementations.

In this session we will provide a thorough explaination of the most important concepts of Xtext’s way of scoping. You will learn, that an object might have different names in different contexts and what's behind nested scopes, shadowing and filtering. We will discuss typical problems and solutions along with best practices for scoping. In the end, it's about the right compromise between implementation effort, memory consumption and performance.




Other Videos By Eclipse Foundation


2017-07-11A new framework for Text Edition in Platform: why, what, how? by Mickael Istria
2017-07-11Testing Eclipse plugins: from unit to end to end testing
2017-07-11sensiNact: Open platform for smarter cities - applications in European and Japanese cities
2017-07-11How can you contribute to Eclipse, by Olivier Prouvost
2017-07-11Lean and Easy IoT Applications with OSGi and Eclipse Concierge, by Jan S. Rellermeyer
2017-07-11Visual Studio Team Services can help Eclipse developers? You're kidding me! by François Bouteruche
2017-07-11Learnings from Excel, by Holger Schill & Sebastian Zarnekow
2017-07-11The EMF Parsley DSL: an extensive use case of Xtext/Xbase powerful mechanisms
2017-07-11Introduction to expression languages in Xtext, by Karsten Thoms
2017-07-11EcoreTools Next: Executable DSL made (more) accessible, by Cedric Brun
2017-07-11Deep dive into Xtext scoping - local and global scopes explained, by H. Schill & S. Zarnekow
2017-07-11How EASE unleashes the scientific power of Airbus' engineers in Eclipse, by Alain Bernard
2017-07-11Ignite talks, session 2
2017-07-11Debug Java code like a Pro, by Mikaël Barbero
2017-07-11Driving Intelligent Transportation System with Capella, by Jerome Montigny
2017-07-11Jenkins at Scale, Baptiste Mathus & Michael Pailloncy
2017-07-11TypeScript, Future of JavaScript and rise of the transpilers, by Sebastien Pertus
2017-07-11Theia - One IDE Framework For Desktop & Cloud, by
2017-07-11InTheMoodForLife, Open Source Sleep analyser for mood disorders, First award, by S. LAMBOUR
2017-07-11The Big Data Puzzle Where Does the Eclipse Piece Fit? by J. Langley
2017-07-11Building an IoT product from scratch using Eclipse IoT Technologies