Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

VIATRA 2.0 Webinar


Published on

What's new in VIATRA 2.0 - Presentation at the Eclipse Community Meetup

Published in: Software
  • Be the first to comment

  • Be the first to like this

VIATRA 2.0 Webinar

  1. 1. What's new in Eclipse VIATRA 2.0 Dr. István RÁTH Managing Director IncQuery Labs Ltd.
  2. 2. VIATRA in a nutshell Model transformations Application domains Design tools for systems engineering Java API Xtend API Graph queries Reactive query and transformation engine VIATRA: open source foundations for design tools Contributors Users and partners Resources
  3. 3. VIATRA Query: Early validation of design rules SystemSignalGroup design rule (from AUTOSAR) • A SystemSignal and its group must be in the same IPdu • Challenge: find violations quickly in large models • New difficulties • reverse navigation • complex manual solution AUTOSAR: • standardized SW architecture of the automotive industry • now supported by modern design tools Design Rule/Well-formedness constraint: • each valid car architecture needs to respect • designers are immediately notified if violated Challenge: • >500 design rules in AUTOSAR tools • >1 million elements in AUTOSAR models • models constantly evolve by designers
  4. 4. route: Route sp: SwitchPosition switch: Switchsensor: Sensor follows switch sensor definedBy Complex model queries in Java 1 2 0 3 4 // Incoming transition for an entry state public void getRouteWithoutDefinition(route: Route) { if (route != null) { // Step 0 for (SwitchPosition sp: route.getFollows()) {// Step 1 if (sp.getSwitch() != null) // Step 2 if (sp.getSwitch().getSensor() != null) // Step 3 if (route != sp.getSwitch().getSensor()) { // Step 4 // do something } }}}
  5. 5. Complex model queries in the VIATRA Query Language (VQL) // Sensors that are associated with a switch that belongs to a route, but the sensor is not associated with the same route. pattern routeSensor(route:Route, sensor:Sensor) { Route.follows.switch.sensor(route, sensor); neg find definedBy(route, sensor); Route.length(route, length); check(length <= 0); } Negative pattern call Query definition Query parameters Type constraint Attribute or Reference navigation route: Route sp: SwitchPosition switch: Switchsensor: Sensor follows switch sensor definedBy Check expression for attribute values (integrates with Java via Xbase)
  6. 6. Real-world example VQLJava =
  7. 7. The VIATRA Model Query engine Query back-ends Live Search- based Hybrid • Performance-first • Indexing • in the initialization phase • ~10% of model loading time • Memory efficient • Still much faster than handwritten Java • Blazing fast (<10ms) • Query result change notifications • Requires more memory (+20-70% tool footprint) • Fine-grained fine- tuning between backend configurations Benchmarks
  8. 8. Model Transformation and Code Generation Source Model Target CodeCode DOM/AST M2M M2T Model-to-Model (M2M) Transformation • SRC: In-memory model (objects) • TRG: In-memory model (objects) Model-to-Text (M2T) Transformation • SRC: In-memory model (objects) • TRG: Textual code (string)
  9. 9. VIATRA Reactive Transformation Engine Reactive Model Transformations with VIATRA (“rule engine for MT”) Observed events Controlled events Notifications Messages Model Event What has happened? (external + internal) Condition When to react? (internal) Action What to do? (external+internal)
  10. 10. VIATRA Java/Xtend API pattern compositeState(state: State, region: Region) { CompositeElement(state); CompositeElement.regions(state, region); neg find initialStates(region, _); } private def getInitCompositeStateRule() { return createRule .name("initCompositeStateRule") .precondition(CompositeStateMatcher.querySpecification) .action(CRUDActivationStateEnum.CREATED) [ val currRegion = it.region currRegion.createChild(region_Vertices, scPackage.entry) ] .addLifeCycle(Lifecycles.getDefault).build } Model manipulation: • Internal DSL in Xtend • Unified interface for simple / transactional model edits • Primitives • create/Child • addTo • Remove • Set • moveTo Precondition: • Graph pattern in VQL
  11. 11. VIATRA Features & Add-ons Tools • Declarative and powerful query language • Integrates with Java using Xbase • Xtext-based Eclipse IDE • Reactive debugger • Maven builder • Test framework with coverage support APIs • Type safe and easy-to-use • Databinding • Derived features with notifications • Model-to-model and model-to- code transformation primitives • Java and Xtend friendly Runtime • Headless with minimal dependencies • Advanced performance optimizations • Various back-ends for different trade- offs • Unique feature: live queries and reactive transformations Add-ons • VIATRA Validation • VIATRA Viewers (view maintenance) • VIATRA-DSE (Design Space Exploration) • VIATRA-CEP (Complex Event Processing)
  12. 12. What’s new in VIATRA 2.0? • Simplification • Fewer third party dependencies • New language features • Lots of performance and memory optimizations • Much faster VQL compiler • Up to 80% less memory usage at runtime • Java compatibility: Java 8 required & used on API, Java 9/10 supported • Available in Eclipse Photon • 2.x will follow “2 new feature releases per year” cadence • VIATRA 1.7.x will be maintained for backward compatibility
  13. 13. IncQuery – cloud-based modeling beyond EMF Scalable Language tailored to models Validation and analytics features Hybrid database technology Tool / Repository Persistent index VIATRA query & xform engine In-memory index Containerized microservices  Horizontal scaling in the cloud • MagicDraw & Teamwork Cloud • NoSQL & graph DBs, … 1000x faster than conventional DB technology • OpenAPI / Swagger interfaces • High-performance indexing • Change updates via callbacks Built on V4MD: VIATRA for MagicDraw • Open source ”glue code” (EPL v2) • Demonstrates how to bind EMF-based tech to MagicDraw • Deployable as a MD plug-in built with Gradle •
  14. 14. VIATRA 2.1: Sirius VQL Editor
  15. 15. Takeaways • VIATRA 2.0 is now leaner and faster than ever:!#viatra-20 • Rich documentation and examples to help you get started with queries and transformations: • Find out more about VIATRA-based commercial tools at based-add-ons-commercial-modeling-tools • Watch out for VIATRA 2.0 in Eclipse Photon today!
  16. 16. Thank you! @IncQueryLabs