TL;DR: The application of Xbase is presented by means of a domain model language which serves as a tutorial example and by the implementation of the programming language Xtend, a functional and object-oriented general purpose language for the Java Virtual Machine (JVM).
Abstract: Xtext is an open-source framework for implementing external, textual domain-specific languages (DSLs). So far, most DSLs implemented with Xtext and similar tools focus on structural aspects such as service specifications and entities. Because behavioral aspects are significantly more complicated to implement, they are often delegated to general-purpose programming languages. This approach introduces complex integration patterns and the DSL's high level of abstraction is compromised.We present Xbase as part of Xtext, an expression language that can be reused via language inheritance in any DSL implementation based on Xtext. Xbase expressions provide both control structures and program expressions in a uniform way. Xbase is statically typed and tightly integrated with the Java type system. Languages extending Xbase inherit the syntax of a Java-like expression language as well as language infrastructure components, including a parser, an unparser, a linker, a compiler and an interpreter. Furthermore, the framework provides integration into the Eclipse IDE including debug and refactoring support.The application of Xbase is presented by means of a domain model language which serves as a tutorial example and by the implementation of the programming language Xtend. Xtend is a functional and object-oriented general purpose language for the Java Virtual Machine (JVM). It is built on top of Xbase which is the reusable expression language that is the foundation of Xtend.
TL;DR: Xtext as mentioned in this paper is an open source Eclipse framework for implementing domain specific languages together with IDE functionalities, including Xtext and Xtend, which is a Java-like language tightly integrated with Java.
Abstract: Learn how to implement a DSL with Xtext and Xtend using easy-to-understand examples and best practices About This BookLeverage the latest features of Xtext and Xtend to develop a domain-specific language Integrate Xtext with popular third party IDEs and get the best out of both worlds Discover how to test a DSL implementation and how to customize runtime and IDE aspects of the DSL Who This Book Is For This book is targeted at programmers and developers who want to create a domain-specific language with Xtext They should have a basic familiarity with Eclipse and its functionality Previous experience with compiler implementation can be helpful but is not necessary since this book will explain all the development stages of a DSL What You Will LearnWrite Xtext grammar for a DSL; Use Xtend as an alternative to Java to write cleaner, easier-to-read, and more maintainable code; Build your Xtext DSLs easily with Maven/Tycho and Gradle; Write a code generator and an interpreter for a DSL; Explore the Xtext scoping mechanism for symbol resolution; Test most aspects of the DSL implementation with JUnit; Understand best practices in DSL implementations with Xtext and Xtend; Develop your Xtext DSLs using Continuous Integration mechanisms; Use an Xtext editor in a web applicationIn DetailXtext is an open source Eclipse framework for implementing domain-specific languages together with IDE functionalities It lets you implement languages really quickly; most of all, it covers all aspects of a complete language infrastructure, including the parser, code generator, interpreter, and more This book will enable you to implement Domain Specific Languages (DSL) efficiently, together with their IDE tooling, with Xtext and Xtend Opening with brief coverage of Xtext features involved in DSL implementation, including integration in an IDE, the book will then introduce you to Xtend as this language will be used in all the examples throughout the book You will then explore the typical programming development workflow with Xtext when we modify the grammar of the DSL Further, the Xtend programming language (a fully-featured Java-like language tightly integrated with Java) will be introduced We then explain the main concepts of Xtext, such as validation, code generation, and customizations of runtime and UI aspects You will have learned how to test a DSL implemented in Xtext with JUnit and will progress to advanced concepts such as type checking and scoping You will then integrate the typical Continuous Integration systems built in to Xtext DSLs and familiarize yourself with Xbase By the end of the book, you will manually maintain the EMF model for an Xtext DSL and will see how an Xtext DSL can also be used in IntelliJ Style and approach A step-by step-tutorial with illustrative examples that will let you master using Xtext and implementing DSLs with its custom language, Xtend
TL;DR: This work has worked on compiling ATL code to Java code using the active operations library, and can handle a significant subset of ATL, and shows that the code it generates provides similar performance to hand-written Java or Xtend code.
Abstract: Incrementally executing model transformations offers several benefits such as updating target models in-place (instead of creating a new copy), as well as generally propagating changes faster (compared with complete re-execution). Active operations have been shown to of- fer performant OCL-based model transformation incrementality with use- ful properties like fine-grained change propagation, and the preservation of collection ordering. However, active operations have so far only been available as a Java library. This compels users to program at a relatively low level of abstraction, where most technical details are still present. Writing transformations at this level of abstraction is a tedious and error prone work. Using languages like Xtend alleviates some but not all issues. In order to provide active operation users with a more user-friendly front-end, we have worked on compiling ATL code to Java code using the active operations library. Our compiler can handle a significant subset of ATL, and we show that the code it generates provides similar performance to hand-written Java or Xtend code. Furthermore, this compiler also enables new possibilities like defining derived properties by leveraging the ATL refining mode.
TL;DR: This paper uses the Java compatible languageXtend and its metaprogramming mechanism active annotations to alter the semantics of existing Xtend constructs to describe REST APIs within Xtends internal DSL, and presents two opposing approaches to describe existing REST APIs and to generate type-safe client side Java libraries from these descriptions.
Abstract: Web-services with REST APIs comprise the majority of the programmable web. To access these APIs more safely and conveniently, language specific client libraries can hide REST details behind regular programming language idioms. Manually building such libraries is straightforward, but tedious and error prone. Fortunately, model-based development provides different methods to automate their development. In this paper, we present our experiences with two opposing approaches to describe existing REST APIs and to generate type-safe client side Java libraries from these descriptions. First, we use an EMF-metamodel and a code generator external DSL. Secondly, we use the Java compatible language Xtend and its metaprogramming mechanism active annotations, which allows us to alter the semantics of existing Xtend constructs to describe REST APIs within Xtend internal DSL. Furthermore, we present related approaches and discuss our findings comparatively.