Fig 2 - uploaded by Joel Champeau
Content may be subject to copyright.
Implementation : excerpt of Kermeta code 

Implementation : excerpt of Kermeta code 

Source publication
Article
Full-text available
Model-Driven Engineering (MDE) is an ap-proach to software development that uses models as pri-mary artifacts, from which code, documentation and tests are derived. One way of assessing quality assurance in a given domain is to define domain metrics. We show that some of these metrics are supported by models. As text documents, models can be consid...

Context in source publication

Context 1
... to access to the metamodel The language or library for implementing metrics should include an easy way to navigate through the model and to access to the φ 1 to subclasses by polymorphism. NumberOfCityCon- metamodel. For instance, considering a model element, nectedToA5Metric overrides φ 1 to compute the number there should be a way to access to the referenced ele- of cities connected to the road named A5 . ments as well as the metaclass and its attributes. Kermeta satisfies all the issues cited above, except the first one. Even if a filtering function written in Kermeta Non-intrusivity We have experienced that it is often tempt- is syntactically close to its semantic, a domain expert ing to pollute models with metrics concerns. For exam- can not feel comfortable with writing pieces of Kermeta ple, to add an attribute marked : boolean to the root class code. It is outside of the scope of this contribution to of the domain model, to mark visited objects. However, specify visual or textual syntax usable by the domain this practice violates the separation of concerns principle. expert. A good metrics design practice is totally non-intrusive The prototype involves two main abstract classes Re- with respect to the semantic of the model. In the pre- flectiveWalk and SigmaMetric . To define a σ model met- vious example, the need to mark visited objects implies ric, the user just need to create a new class inheriting the use of M ap : Object → Boolean . from SigmaMetric and to write the associated filtering function. Our implementation One can find in the literature several proposals for the implementation of model metrics (see section 2) e.g., Java, SQL, Python, Xquery, XML- 4 Applications of the σ metric based DSL, OCL, and a graphical language. Proposals mix some of these languages. These proposals do not In this section, we present three case studies so as to adress all the issues cited above. We based our approach illustrate the genericity and the feasibility of the σ met- on the model-oriented programming language Kermeta ric. We first show that the σ metric allows the compu- [38]. tation of logical lines of code in usual languages such as Kermeta is a language based upon the EMF API. Java, the value-added of this approach is the ease of use This facilitates the accesses to models and the navigation compared to equivalent existing approaches. Then, we go through models and metamodels. Furthermore, our in- beyond software metrics and consider non code centric dustrial partners generally use Eclipse Modeling Frame- artifacts such as requirements and system engineering work (EMF) models. Kermeta features closures, which metrics. The application of the σ metric in these various are of great help for the filtering functions. Indeed, a fil- domains shows the genericity of the σ metric. Finally, tering function written in Kermeta is syntactically close since metamodels can be considered as models too, we to the underlying semantic hence very concise. present results of the σ metric at computing metamodel Polymorphism is useful to express modularized met- metrics in a full section. rics. An example of code is shown on figure 2. An abstract class SigmaMetric encapsulates the generic code of the generic σ metric. A class NumberOfCityMetric is defined 4.1 Case study: lines of code (LOC) as a subclass of the SigmaMetric class. NumberOfCityMetric implements the filtering function φ and poten- Kan states that “the lines of code (LOC) metric is any- tially delegates the definition of a subfiltering function thing but simple” [39] (p.88). Indeed, there are ...

Similar publications

Article
Full-text available
During the last decade a new trend of approaches has emerged, which considers models not just documentation artefacts, but also central artefacts in the software engineering field, allowing the creation or automatic execution of software systems starting from those models. These proposals have been classified generically as Model-Driven Engineering...
Conference Paper
Full-text available
To have a good command of the language, not only allows us to write effectively a message, but it also helps us to understand what the other person wants to communicate. Students are in the process of learning to master the language. In particular, as they increase their level of education, they find a series of new terms (lexicon), which need to b...

Citations

... safety-critical concerns and quality assurance) of information systems through appropriate metrics. For instance, in [18] authors propose a language for calculating metrics that determine the internal complexity, size, and quality of the domain models. Similarly in [19], a DSL for analyzing the source code of software systems is presented. ...
Conference Paper
Full-text available
The Enterprise Architecture (EA) provides a holistic view of an enterprise and seeks to align the business and IT. As the change in the business goals and strategies of an enterprise is inevitable, managing the evolution of the EA is a key challenge for modern enterprises. Furthermore, the EA metrics are instrumental in quantitatively measuring the progress of an enterprise towards its goals. The retrospective analysis of the EA metrics empower practitioners to take informed decisions while planning and selecting efficient alternatives to achieve the envisioned goal. The tool support for the EA metric analysis is still in its infancy. In this paper, we propose a model-based approach to capture the temporal aspects of the EA metrics and extend a model-based expression language to compute the EA metrics at any point of time in the past. This allows the visualization of the evolution of the EA metrics and as a consequence the evolution of the EA.
Conference Paper
Custom generators of graph-based models are used in MDE for many purposes such as functional testing and performance benchmarking of modeling environments to ensure the correctness and scalability of tools. However, while existing generators may generate large models in increasing size, these models are claimed to be simple and synthetic, which hinders their credibility for industrial and research benchmarking purposes. But how to characterize a realistic model used in software and systems engineering? This question is investigated in the paper by collecting over 17 different widely used graph metrics taken from other disciplines (e.g. network theory) and evaluating them on 83 instance models originating from six modeling domains. Our preliminary results show that certain metrics are similar within a domain, but differ greatly between domains, which makes them suitable input for future instance model generators to derive more realistic models.
Conference Paper
The use of a formal definition of measures upon a metamodel assures that measures capture the software artifacts they intend for, improve repeatability and could facilitate the implementation of measures extraction tools. However, it does not assure that the measure captures the measurement concept it claims (like size, coupling, etc). For that purpose many formal frameworks had been defined. The well-known property-based framework proposed by Briand et al. defines the most important measurement concepts regardless the specific software artifacts to which these concepts are applied. In this article we define a UML/OCL model from the Briand’s framework and we relate it with the formal definition of measures upon metamodels. We describe a set of well-formed properties that a measure should verify when capturing a measurement concept (which are derived from the model). We exemplify our approach through a thorough formal definition of UML statechart diagrams measures and its well-formed constraints of size measures.
Conference Paper
Full-text available
Companies using domain specific languages in a model-driven development process need to measure their models. However, developing and maintaining a measurement software for each domain specific modeling language is costly. Our contribution is a model-driven measurement approach. This measurement approach is model-driven from two viewpoints: 1) it measures models of a model-driven development process; 2) it uses models as unique and consistent metric specifications, w.r.t a metric specification metamodel. This declarative specification of metrics is then used to generate a fully fledged implementation. The benefit from applying the approach is evaluated by two applications. They indicate that this approach reduces the domain-specific measurement software development cost.
Article
Full-text available
Metrics offer a practical approach to evaluate properties of domain-specific models. However, it is costly to develop and maintain measurement software for each domain-specific modeling language. In this paper, we present a model-driven and generative approach to measuring models. The approach is completely domain-independent and operationalized through a prototype that synthesizes a measurement infrastructure for a domain-specific modeling language. This model-driven measurement approach is model-driven from two viewpoints: (1) it measures models of a domain-specific modeling language; (2) it uses models as unique and consistent metric specifications, with respect to a metric specification metamodel which captures all the necessary concepts for model-driven specifications of metrics. The benefit from applying the approach is evaluated by four case studies. They indicate that this approach significantly eases the measurement activities of model-driven development processes.
Conference Paper
A way to specify Aspect-based software architectures for real-time systems is introduced. Component models are specified taking the Model Driven Architecture (MDA) approach, and employing UML notations. First, the principle of the developing process based on the Aspect-Oriented approach and the new concepts of UML-specified component architectures are addressed. Then, the conceptual framework architecture for the design of embedded real-time systems is presented, in which platform-independent component models are built. AOP is a new software development paradigm, which could attain a higher level of separation of concerns in both functional and non-functional matters by introducing aspect, for the implementation of crosscutting concerns. Different aspects can be designed separately, and woven into systems. This article introduces the technology of MDA, aspect-oriented, real-time systems. The paper takes the Aspect-oriented to the MDA modeling by the UML extension mechanisms, and presents a method, which is Aspect-Oriented MDA. In this article, UML profile is utilized to construct the meta-modal specifications respectively for common Aspect-Oriented and AspectJ. So the core business logic and the crosscutting aspects can be modeled as separate, modular Aspect-Oriented PIM's and PSM's.
Conference Paper
Full-text available
This paper reports an industrial experiment made at Thales to use Model Driven Architecture (MDA) for system engineering. System engineering processes are currently mainly document-centric. The main experiment goal was to study the applicability of MDA at the system engineering level. The experiment consisted of setting up a model-driven simulation environment for a maritime surveillance system. The simu- lation is achieved thanks to 3 models conform to 3 metamodels. The implementation uses the Eclipse Modeling Framework and is written in the Java Programming language. This pilot project met the deadline, the budget and the threshold of desired functionalities. We report the main advances given by the MDA approach in the context of simulation for system engineering.