
Functional metamodels for systems and software Laurent Thiry, Bernard Thirion To cite this version: Laurent Thiry, Bernard Thirion. Functional metamodels for systems and software. Journal of Systems and Software, Elsevier, 2009, 82, pp.1125-1136. 10.1016/j.jss.2009.01.042. hal-00864184 HAL Id: hal-00864184 https://hal.archives-ouvertes.fr/hal-00864184 Submitted on 20 Sep 2013 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Manuscript Click here to view linked References Functional metamodels for systems and software Laurent Thiry, Bernard Thirion ENSISA, 12 rue des fr`eres Lumi`ere - 68093 Mulhouse (France) Abstract The modeling, analysis and design of systems is generally based on many formalisms to describe discrete and/or continuous behaviors, and to map these descriptions into a specific platform. In this context, the article proposes the concept of functional metamodeling to capture, then to integrate modeling languages. The concept offers an alternative to standard Model Driven Engineering (MDE) and is well adapted to mathematical descriptions such as the ones found in system modeling. As an application, a set of functional metamodels is proposed for dataflows (usable to model continuous behaviors), state-transition systems (usable to model discrete behaviors) and a metamodel for actions (to model interactions with a target platform and concurrent execution). A model of a control architecture for a legged robot is proposed as an application of these modeling languages. Key words: System modeling, functional metamodeling, Model Driven Engineering (MDE) 1. Introduction points of view, Figure 1. The most concrete is the one of systems experts that model, analyze or de- The analytical and computational modeling of sign systems. To do this, they need tools that are systems generally requires the composition of var- developed by software experts ; the tools have gen- ious models and formalisms for their study, their erally a ”formalism inside” (e.g. matrix algebra analysis or their design, Vangheluwe and de Lara for matlab). At a more generic level, recurrent ele- (2003). For example, dataflows, used to describe ments, on which the preceding tools are based, are continuous behaviors, must be composed with dis- capitalized by models experts ; in particular, the crete elements to capture operating modes, and latter provide concepts and means to manipulate with more software oriented elements, Henzinger modeling languages and models that will be used and Sifakis (2007). Moreover, computational mod- by software experts to develop more easily/quickly els can be described using an imperative language, specific tools, that will be used by systems experts. an object oriented language, a functional language, As a result, MDE proposes a set of dedicated etc. languages: Meta Object Facility (MOF) to specify The Model Driven Engineering (MDE) commu- metamodels, Object Constraint Language (OCL) nity has brought a reflection on what ”models” to add semantics or constraints on modeling el- of systems, or models of modeling languages also ements, Query/View/Transformation (QVT) to called metamodels are and what the relations be- relate (meta)models, etc. The description of for- tween models also called model transformations malisms inside MDE is generally object-oriented. are, Mellor et al. (2003). MDE is based on three The paper proposes an alternative approach that is function-oriented and is named functional meta- modeling. This approach has an impact on the three Email addresses: [email protected] (Laurent Thiry), [email protected] (Bernard Thirion). layers of Figure 1 and it proposes new means to Preprint submitted to Journal of Systems and Software 11 December 2008 and comprehensible way, the elements presented al- low the study of a wide range of systems such as the legged robot of part 5. And in contrast to ded- icated tools like Matlab/Simulink 1 , the framework System Experts Tool designers Generic environment M1 M2 M3 providers proposed can be easily adapted or extended. The paper is divided into six parts. Part 2 in- Model, Analyze Operationalize Propose troduces the concepts of systems, models and & Design & Integrate modeling (Systems) (Formalisms) architectures metamodels. Part 3 details the main contribu- tion of the paper with functional modeling ; i.e. <<basedOn>> <<basedOn>> what it is and what the benefits obtained are. Part 4 proposes an application of the concept to Fig. 1. Abstraction layers in MDE. systems. More precisely, this part describes five functional metamodels and a set of tools for the specify and to relate modeling languages ; these modeling/simulation of continuous, discrete and elements will be detailed in part 3. The concept concurrent systems. Continuous behaviors can be leads to particular tools ; examples will be given in modeled using either dataflows (such as the ones part 4. The specificity of the tools leads to another found in Matlab/Simulink), or mathematical series. way of modeling systems ; an illustration will be Discrete behaviors are modeled by state-transition presented in part 5. systems and logical formula expressing constraints The advantages of functional descriptions are that have to be satisfied/checked. Part 5 proposes a their formal/mathematical foundation, and their use of the framework to model the control architec- ability to describe other formalisms in a compact ture of a legged robot. Part 6 concludes by summing and rational manner. Despite these interests, func- up the main elements of the paper and presents the tional models and languages are rarely being con- perspectives considered. sidered in the domains of modeling, simulation, control, etc. Thus, to facilitate the use of func- 2. Systems, models and metamodels tional languages, the paper proposes a framework that explains how to describe, then to integrate, behavioral models (with continuous and discrete 2.1. Dynamical systems parts) and how to combine them with implemen- tation models (necessary for the deployment on a From a mathematical point of view, a system is target platform). The work presented also explains modeled by a time T , a set of states X, a set of inputs how to profit from the modern functional program- U, and a transition function F : X ×U → X, Lee and ming language Haskell, with high level constructs, Varaiya (2003). Figure 2 presents a classification of to model dynamical systems differently, Thiry and system models according to T and X, Maler (1998). Thirion (2008). A behavior is defined by an initial state x0 ∈ X, an So, with our proposition, a metamodel will corre- input u: T → U, a function x: T → X that satisfies spond to a set of functions that can be composed to x(0) = x0 and x(i + 1) = F (x(i), u(i)) for a discrete built expressions that are, de facto, models. Trans- time T , and dx(t)dt = F (x(t), u(t)) for a contin- formations are functions too and are based on the uous time T . The output of a system is given either previous definition. As an application, a set of func- by a function y: T × X × U → Y , where Y is the set tional metamodels is proposed for continuous be- of outputs, or by completing the transition function haviors (i.e. dataflow models), for discrete behaviors F : X × U → (X × Y ). U and Y may be numeri- (i.e. state-transition models) and for more software cal values (continuous case) and/or symbolic values oriented elements (i.e. with concurrent actions). As called events (discrete case). a complement, the article explains how to 1) get ei- The models above are used to describe most dy- ther a numerical representation, or an analytical rep- namical systems. However, for the implementation, resentation, of continuous dataflow models (using other elements have to be considered such as the Series, Mc Ilroy (1998)) ; 2) extend discrete behav- model of computation, Jantsch and Sander (2005). ioral models with temporal logic formulae represent- Particularly, most of the time a system is decom- ing abstract specifications usable for model check- ing, Clarke et al. (2000). Described in a compact 1 www.mathworks.fr X / T Continuous (|R) Discrete (|N) eling languages, Mellor et al. (2003). Each mod- Differential Finite eling language is defined by a metamodel, gener- 2 Continuous (|R|N) Algebraic Difference ally a MOF class diagram extended with logical Equations Equations constraints, Varro and Pataricza (2003). Figure 4 State- Discrete Naive Physics Transition presents the conceptual framework on which MDE Systems is based on. A system is modeled using a modeling language ; a model is an element of the modeling Fig. 2. Classification of system models. language which is the set of all models conforming to a metamodel, Favre (2004), and Varro (2002). A posed into many sub-systems, whose behavior is model transformation represents a relation between given by one of the previous models, and that have two modeling languages and is defined by a set of to evolve concurrently. As a consequence of this mappings between the corresponding metamodels. decomposition, it is necessary to precise the model As an illustration, the behavior of an oscillator can of computation considered, i.e. how time is shared be modeled by a regular expression (min.max)*. The between the various sub-systems and how these metamodel defines the syntax of regular expressions latter communicate. For continuous behaviors, a using basic elements min/max, sequences (.), repe- synchronous model of computation is mostly used titions (*), etc.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages18 Page
-
File Size-