Design and Implementation of an Autonomic Code Generator Based on RTPA

Author(s):  
Yingxu Wang ◽  
Xinming Tan ◽  
Cyprian F. Ngolah

Real-Time Process Algebra (RTPA) is a denotational mathematics for the algebraic modeling and manipulations of software system architectures and behaviors by the Unified Data Models (UDMs) and Unified Process Models (UPMs). On the basis of the RTPA specification and refinement methodologies, automatic software code generation is enabled toward improving software development productivity. This paper examines designing and developing the RTPA-based software code generator (RTPA-CG) that transfers system models in RTPA architectures and behaviors into C++ or Java. A two-phrase strategy has been employed in the design of the code generator. The first phrase analyzes the lexical, syntactical, and type specifications of a software system modeled in RTPA, which results in a set of abstract syntax trees (ASTs). The second phrase translates the ASTs into C++ or Java based on predesigned mapping strategies and code generation rules. The toolkit of RTPA code generator encompasses an RTPA lexer, parser, type-checker, and a code builder. Experimental results show that system models in RTPA can be rigorously processed and corresponding C++/Java code can be automatically generated using the toolkit. The code generated is executable and effective under the support of an RTPA run-time library.

Author(s):  
Yingxu Wang ◽  
Xinming Tan ◽  
Cyprian F. Ngolah

Real-Time Process Algebra (RTPA) is a denotational mathematics for the algebraic modeling and manipulations of software system architectures and behaviors by the Unified Data Models (UDMs) and Unified Process Models (UPMs). On the basis of the RTPA specification and refinement methodologies, automatic software code generation is enabled toward improving software development productivity. This paper examines designing and developing the RTPA-based software code generator (RTPA-CG) that transfers system models in RTPA architectures and behaviors into C++ or Java. A two-phrase strategy has been employed in the design of the code generator. The first phrase analyzes the lexical, syntactical, and type specifications of a software system modeled in RTPA, which results in a set of abstract syntax trees (ASTs). The second phrase translates the ASTs into C++ or Java based on predesigned mapping strategies and code generation rules. The toolkit of RTPA code generator encompasses an RTPA lexer, parser, type-checker, and a code builder. Experimental results show that system models in RTPA can be rigorously processed and corresponding C++/Java code can be automatically generated using the toolkit. The code generated is executable and effective under the support of an RTPA run-time library.


Author(s):  
Loucas S. Louca ◽  
Jeffrey L. Stein ◽  
Gregory M. Hulbert

In recent years, algorithms have been developed to help automate the production of dynamic system models. Part of this effort has been the development of algorithms that use modeling metrics for generating minimum complexity models with realization preserving structure and parameters. Existing algorithms, add or remove ideal compliant elements from a model, and consequently do not equally emphasize the contribution of the other fundamental physical phenomena, i.e., ideal inertial or resistive elements, to the overall system behavior. Furthermore, these algorithms have only been developed for linear or linearized models, leaving the automated production of models of nonlinear systems unresolved. Other model reduction techniques suffer from similar limitations due to linearity or the requirement that the reduced models be realization preserving. This paper presents a new modeling metric, activity, which is based on energy. This metric is used to order the importance of all energy elements in a system model. The ranking of the energy elements provides the relative importance of the model parameters and this information is used as a basis to reduce the size of the model and as a type of parameter sensitivity information for system design. The metric is implemented in an automated modeling algorithm called model order reduction algorithm (MORA) that can automatically generate a hierarchical series of reduced models that are realization preserving based on choosing the energy threshold below which energy elements are not included in the model. Finally, MORA is applied to a nonlinear quarter car model to illustrate that energy elements with low activity can be eliminated from the model resulting in a reduced order model, with physically meaningful parameters, which also accurately predicts the behavior of the full model. The activity metric appears to be a valuable metric for automating the reduction of nonlinear system models—providing in the process models that provide better insight and may be more numerically efficient.


e-xacta ◽  
2016 ◽  
Vol 9 (1) ◽  
pp. 37
Author(s):  
Cristiano Martins Monteiro ◽  
Flavianne Braga Campos de Lima ◽  
Carlos Renato Storck

<p>A geração automática de código-fonte é uma prática adotada no desenvolvimento de softwares para agilizar, facilitar e padronizar a implementação dos projetos. Embora seja uma prática comum nas fábricas de software, não se conhece uma ferramenta que permita escolher o padrão de projeto a ser usado. O objetivo principal deste trabalho é apresentar um gerador de códigos para o desenvolvimento de sistemas Web a partir de uma modelagem entidade-relacionamento, uma linguagem de programação e um padrão de projeto determinados pelo usuário. Os objetivos específicos são propor uma arquitetura do sistema capaz de adequar e reaproveitar diferentes padrões de projeto, linguagens de programação e projetos cadastrados; permitir que o usuário cadastre, altere, exclua, importe e exporte um projeto; e gerar automaticamente o seu código-fonte e scripts de banco de dados. Este trabalho se justifica pela importância de reduzir erros de codificação; e evitar perca tempo ao realizar atividades rotineiras de implementação de padrões de projeto. Possibilitando assim, maior dedicação no planejamento das regras de negócios e redução de custos. A ferramenta proposta (GCER) foi desenvolvida em linguagem Java com o uso banco de dados Oracle 11g, e seguindo os padrões DAO e MVC. Os resultados foram avaliados através da geração e compilação de códigos de um projeto para cadastro de veículos. A geração com êxito evidencia a viabilidade da ferramenta proposta para a geração automática de códigos no processo de desenvolvimento de software.</p><p>Abstract</p><p>The automatic generation of source code is a practice adopted in the development of software to streamline, facilitate and standardize the implementation of projects. Although it be a common practice in software factories, it is not known a tool able to choose the design pattern to be used. The main objective of this paper is to present a code generator for the development of Web systems from an entity-relationship modeling, a programming language and a design pattern determined by the user. The specific objectives are to propose a system architecture able to suit and reuse different design patterns, programming languages and saved projects; allow the user to insert, update, delete, import and export a project; and automatically generate the source code and database scripts. This work is justified by the importance to reduce errors of coding; and to avoid waste of time in the development of Web systems performing routine tasks. Allowing, then, a greater dedication in the planning of business rules and the reduction of costs. The tool proposed (GCER) was developed in Java with the database using Oracle 11g, and following the DAO and MVC patterns. The results were evaluated by generating and compiling codes of a project for vehicle registration. The successful code generation demonstrate the feasibility of the proposed tool for the automatic generation of code in the software development process.</p>


1978 ◽  
Vol 7 (88) ◽  
Author(s):  
Peter Kornerup ◽  
Bent Bruun Kristensen ◽  
Ole Lehrmann Madsen

The possibility of supporting high level languages through intermediate languages to be used for direct interpretation and as intermediate forms in compilers is investigated. An accomplished project in the construction of an interpreter and a code generator using one common intermediate form is evaluated. The subject is analyzed in general, and a proposal for an improved design scheme is given.


Effective software system must advance to stay pertinent, however this procedure of development can cause the product design to rot and prompt essentially diminished efficiency and even dropped projects. Remodularization tasks can be performed to fix the structure of a software system and evacuate the disintegration brought about by programming advancement. Software remodularization comprises in rearranging software entities into modules to such an extent that sets of substances having a place with similar modules are more comparable than those having a place with various modules.However, re-modularizing systems automatically is challenging in order to enhance their sustainability. In this paper, we have introduced a procedure of automatic software remodularization that helps software maintainers to enhance the software modularization quality by assessing the coupling and attachment among programming components. For precision coupling measures, the proposed technology uses structural coupling measurements. The proposed methodology utilizes tallying of class' part capacities utilized by a given class as a basic coupling measure among classes. The interaction between class files measures structural connections between software elements (classes). In this paper, probability based remodularization (PBR) approach has been proposed to remodularize the software systems. The file ordering process is done by performing probability based approach and remodularization is done based on the dependency strength or connectivity among the files. The proposed technique is experimented on seven software systems. The efficiency is measured by utilizing Turbo Modularization Quality (MQ) that promotes edge weighing module dependence graph (MDG). It very well may be presumed that when comparing performance with the subsisting techniques, for instance, Bunch – GA (Genetic Algorithm), DAGC (Development of Genetic Clustering Algorithm) and Estimation of Distribution Algorithm (EDA), the proposed methodology has greater Turbo MQ value and lesser time complexity with Bunch-GA in the software systems assessed


2021 ◽  
Author(s):  
◽  
Konstantīns Gusarovs

Software engineering is continuously evolving, and its tasks are expanding. Nowadays, it includes not only software code development, but business process analysis as well. Information that is gained as a result of such analysis can be used for model that describe processes under automation development. Model driven software engineering also includes application of such models for automated software code or other artefact generation. In comparison to so called “model-based” engineering, model driven engineering uses strictly defined models and its processing algorithms during whole software lifecycle. While ideas, that model driven software engineering is based upon, seem to provide several benefits – for example, initial system representation understood not only by developers, but also by business area experts and, possibly, customers – its adoption is still in the initial phase. This can be explained by both the low level of automation, as well as, inappropriate source model usage. In this thesis, author offers a possible solution to this problem by defining transformation rules for so called Two-Hemisphere Model. This model is a combination of business process and concept diagrams and offered transformation rules allow for a software code generation from it. Additionally, improvements for the Two-Hemisphere model are offered. These improvements are required for enabling of code generation. Also, an algorithm for defining class relationships that can be used also outside of model driven software engineering is described. In this thesis author provides an insight to defined transformation rules by using pseudocode, as well as, an example of its’ application and resulting Java programming language code that was generated from the example model.


Author(s):  
Yingxu Wang ◽  
Cyprian F. Ngolah ◽  
Hadi Ahmadi ◽  
Philip Sheu ◽  
Shi Ying

A Lift Dispatching System (LDS) is a typical real-time system that is highly complicated in design and implementation. This article presents the formal design, specification, and modeling of the LDS system using a denotational mathematics known as Real-Time Process Algebra (RTPA). The conceptual model of the LDS system is introduced as the initial requirements for the system. The architectural model of the LDS system is created using RTPA architectural modeling methodologies and refined by a set of Unified Data Models (UDMs). The static behaviors of the LDS system are specified and refined by a set of Unified Process Models (UPMs) for the lift dispatching and serving processes. The dynamic behaviors of the LDS system are specified and refined by process priority allocation and process deployment models. Based on the formal design models of the LDS system, code can be automatically generated using the RTPA Code Generator (RTPA-CG), or be seamlessly transferred into programs by programmers. The formal models of LDS may not only serve as a formal design paradigm of real-time software systems, but also a test bench of the expressive power and modeling capability of exiting formal methods in software engineering.


Sign in / Sign up

Export Citation Format

Share Document