共查询到20条相似文献,搜索用时 31 毫秒
1.
A significant current software engineering problem is the conceptual mismatch between the abstract concept of an association
as found in modelling languages such as UML and the lower level expressive facilities available in object-oriented languages
such as Java. This paper introduces some code generation patterns that aid the production of Java based implementations from
UML models. The work is motivated by a project to construct model driven development tools in support of the construction
of embedded systems. This involves the specification and implementation of a number of meta-models (or models of languages).
Many current UML oriented tools provide code generation facilities, in particular the generation of object-oriented code from
class diagrams. However, many of the more complex aspects of class diagrams, such as qualified associations are not supported.
In addition, several concepts introduced in UML version 2.0 are also not supported.The aim of the work presented in this paper
is to develop a number of code generation patterns that allow us to support the automatic generation of Java code from UML
class diagrams that support these new and complex association concepts. These patterns significantly improve the code generation
abilities of UML tools, providing a useful automation facility that bridges the gap between the concept of an association
and lower level object-oriented programming languages. 相似文献
2.
3.
Traditionally, industrial robots are programmed by highly specialized workers that either directly write code in platform-specific languages, or use dedicated hardware (teach-pendant) to move the robot through the desired via-points. Unsurprisingly, the inherently complex and time-consuming nature of this task is one of the factors that are still preventing industrial manipulators from being massively adopted by companies that require a high degree of flexibility in order to cope with limited production volumes and rapidly changing product requirements. In this context, the introduction of sensor-based walk-through programming approaches represents the ideal solution as far as the need to reduce programming complexity and time is concerned. Nevertheless, the main shortcomings of these solutions typically consist in limited reachable velocities during the programming phase due to safety constraints and in relying on open robot controllers. To this regard, this paper proposes a control architecture for walk-through programming of industrial manipulators specifically designed in order to (i) reach high velocities while guaranteeing the operator’s safety; (ii) allow straightforward integration with a generic closed robotic controller. The proposed solution is extensively validated on an industrial manipulator. 相似文献
4.
代码表征旨在融合源代码的特征,以获取其语义向量,在基于深度学习的代码智能中扮演着重要角色.传统基于手工的代码表征依赖领域专家的标注,繁重耗时,且无法灵活地复用于特定下游任务,这与绿色低碳的发展理念极不相符.因此,近年来,许多自监督学习的编程语言大规模预训练模型(如CodeBERT)应运而生,为获取通用代码表征提供了有效途径.这些模型通过预训练获得通用的代码表征,然后在具体任务上进行微调,取得了显著成果.但是,要准确表示代码的语义信息,需要融合所有抽象层次的特征(文本级、语义级、功能级和结构级).然而,现有模型将编程语言仅视为类似于自然语言的普通文本序列,忽略了它的功能级和结构级特征.因此,旨在进一步提高代码表征的准确性,提出了基于多模态对比学习的代码表征增强的预训练模型(representation enhanced contrastive multimodal pretraining, REcomp). REcomp设计了新的语义级-结构级特征融合算法,将它用于序列化抽象语法树,并通过多模态对比学习的方法将该复合特征与编程语言的文本级和功能级特征相融合,以实现更精准的语义建模.最后,... 相似文献
5.
For many years, the mainstream software development community has mostly viewed functional programming languages as academic curiosities. Thankfully, this is now changing, as more developers embrace functional languages with the hope of gaining from the higher levels of abstraction, source code brevity, and other benefits these languages offer. This is the first installment of Steve Vinoski's new column, "The Functional Web," which focuses on using functional languages for RESTful Web service application development. 相似文献
6.
Christian Hahn Cristián Madrigal-Mora Klaus Fischer 《Autonomous Agents and Multi-Agent Systems》2009,18(2):239-266
Various agent-oriented methodologies and metamodels exist to design and develop multiagent systems (MAS) in an abstract manner.
Frequently, these frameworks specialise on particular parts of the MAS and only few works have been invested to derive a common
standardisation. This limits the impact of agent-related systems in commercial applications. In this paper, we present a metamodel
for agent systems that abstracts from existing agent-oriented methodologies, programming languages, and platforms and could
thus be considered as platform-independent. This metamodel defines the abstract syntax of a proposed domain-specific modelling
language for MAS that is currently under development and provides furthermore the base to generate code out of the generated
designs. This is done by applying the principles of model-driven development (MDD) and providing two model transformations
that allow transforming the generated models into textual code that can be executed with JACK and JADE. 相似文献
7.
This article describes DSL3S, a domain specific modelling language for Spatial Simulation in the field of Geographic Information Systems (GIS). Techniques such as cellular automata and agent-based modelling have long been used to capture and simulate the temporal dynamics of spatial information. Tools commonly employed to implement spatial simulation models include code libraries and pre-compiled models; the former require advanced programming skills while the latter impose relevant constraints on application scope. Previous attempts to produce domain specific languages in the field have invariably resulted in new textual programming languages (e.g. SELES, NetLogo, Ocelet) that are platform specific and in some cases with weak GIS support and interoperability. DSL3S synthesises relevant concepts of spatial simulation in a UML profile, that allows the design of simulation models through the arrangement of graphical elements. An implementation of this language is also presented, that relies on Model Driven Development (MDD) tools distributed with the Eclipse IDE. This includes a code generation infrastructure, that produces ready to run simulations from DSL3S models, supported by the MASON simulation tool-kit. Finally, DSL3S models for three simple and classical simulations allows to better illustrate and discuss the usage of the language. 相似文献
8.
Data abstraction is one of the most fundamental principles of software engineering. The increasing realization of this is reflected in the design of programming languages, from the tentative user-defined data types of Pascal through to the more extensive facilities provided today by languages such as Ada and Modula-2.This tutorial paper examines how the data abstraction facilities provided by Modula-2 can be used in a sophisticated application. We demonstrate that data abstraction facilitates the production of code which is highly modularized, is easy to write and easy to read. The application, garbage collection, is an important part of system software, and is particularly interesting because it highlights the conflict between efficiency and expressive power. We show the extent to which a functional style of programming can be utilized in solving a problem which is inherently concerned with ‘state’, and we also show how formal semantics can be provided for the abstract data types. 相似文献
9.
10.
Nowadays, concurrent programs are an inevitable part of many software applications. They can increase the computation performance of the applications by parallelizing their computations. One of the approaches to realize the concurrency is using multi thread programming. However, these systems are structurally complex considering the control of the parallelism (such as thread synchronization and resource control) and also considering the interaction between their components. So, the design of these systems can be difficult and their implementation can be error-prone especially when the addressed system is big and complex. On the other hand, a Domain-specific Modeling Language (DSML) is one of the Model Driven Development (MDD) approaches which tackles this problem. Since DSMLs provide a higher abstraction level, they can lead to reduce the complexities of the concurrent programs. With increasing the abstraction level and generating the artifacts automatically, the performance of developing the software (both in design and implementation phases) is increased, and the efficiency is raised by reducing the probability of occurring errors. Thus, in this paper, a DSML is proposed for concurrent programs, called DSML4CP, to work in a higher level of abstraction than code level. To this end, the concepts of concurrent programs and their relationships are presented in a metamodel. The proposed metamodel provides a context for defining abstract syntax, and concrete syntax of the DSML4CP. This new language is supported by a graphical modeling tool which can visualize different instance models for domain problems. In order to clarify the expressions of the language; the static semantic controls are realized in the form of constraints. Finally, the architectural code generation is fulfilled via model transformation rules using the templates of the concurrent programs. To increase level of the DSML׳s leverage and to demonstrate the general support of concurrent programming by the DSML, the transformation mechanism of the tool supports two well-known and highly used programming languages for code generation; Java and C#. The performed experiments on two case studies indicate a high performance for proposed language. In this regard, the results show automatic generation of 79% of the final code and 86% of the functions/modules on average. 相似文献
11.
12.
The development of reliable software for industrial critical systems benefits from the use of formal models and verification tools for detecting and correcting errors as early as possible. Ideally, with a complete model-based methodology, the formal models should be the starting point to obtain the final reliable code and the verification step should be done over the high-level models. However, this is not the case for many projects, especially when integrating existing code. In this paper, we describe an approach to verify concurrent C code by automatically extracting a high-level formal model that is suitable for analysis with existing tools. The basic components of our approach are: (1) a method to construct a labeled transition system from the source code, that takes flow control and interaction among processes into account; (2) a modeling scheme of the behavior that is external to the program, namely the functionality provided by the operating system; (3) the use of demand-driven static analyses to make a further abstraction of the program, thus saving time and memory during its verification. The whole proposal has been implemented as an extension of the CADP toolbox, which already provides a variety of analysis modules for several input languages using labeled transition systems as the core model. The approach taken fits well within the existing architecture of CADP which does not need to be altered to enable C program verification. We illustrate the use of the extended CADP toolbox by considering examples of the VLTS benchmark suite and C implementations of various concurrent programs. 相似文献
13.
《Information and Software Technology》2012,54(10):1045-1066
ContextModel Driven Development (MDD) encourages the use of models for developing complex software systems. Following a MDD approach, modelling languages are used to diagrammatically model the structure and behaviour of object-oriented software, among which state-based languages (including UML state machines, finite state machines and Harel statecharts) constitute the most widely used to specify the dynamic behaviour of a system. However, generating code from state machine models as part of the final system constitutes one of the most challenging tasks due to its dynamic nature and because many state machine concepts are not supported by the object-oriented programming languages. Therefore, it is not surprising that such code generation has received great attention over the years.ObjectiveThe overall objective of this paper is to plot the landscape of published proposals in the field of object oriented code generation from state machine specifications, restricting the search neither to a specific context nor to a particular programming language.MethodWe perform a systematic, accurate literature review of published studies focusing on the object oriented implementation of state machine specifications.ResultsThe systematic review is based on a comprehensive set of 53 resources in all, which we have classified into two groups: pattern-based and not pattern-based. For each proposal, we have analysed both the state machine specification elements they support and the means the authors propose for their implementation. Additionally, the review investigates which proposals take into account desirable features to be considered in software development such as maintenance or reusability.ConclusionsOne of the conclusions drawn from the review is that most of the analysed works are based on a software design pattern. Another key finding is that many papers neither support several of the main components of the expressive richness of state machine specifications nor provide an implementation strategy that considers relevant qualitative aspects in software development. 相似文献
14.
This paper presents the combined use of meta-modelling and graph grammars for the generation of visual modelling tools for simulation formalisms. In meta-modelling, formalisms are described at a meta-level. This information is used by a meta-model processor to generate modelling tools for the described formalisms. We combine meta-modelling with graph grammars to extend the model manipulation capabilities of the generated modelling tools: edit, simulate, transform into another formalism, optimize and generate code. We store all (meta-)models as graphs, and thus, express model manipulations as graph grammars.We present the design and implementation of these concepts in AToM3 (A_To_ol for M_ulti-formalism, M_eta-M_odelling). AToM3 supports modelling of complex systems using different formalisms, all meta-modelled in their own right. Models in different formalisms may be transformed into a single common formalism for further processing. These transformations are specified by graph grammars. Mosterman and Vangheluwe [18] introduced the term multi-paradigm modelling to denote the combination of multiple formalisms, multiple abstraction levels, and meta-modelling. As an example of multi-paradigm modelling we present a meta-model for the Object-Oriented Continuous Simulation Language OOCSMP, in which we combine ideas from UML class diagrams (to express the OOCSMP model structure), Causal Block Diagrams (CBDs), and Statecharts (to specify the methods of the OOCSMP classes). A graph grammar is able to generate OOCSMP code, and then a compiler for this language (C-OOL) generates Java applets for the simulation execution. 相似文献
15.
Refactorings can be used to improve the structure of software artefacts while preserving the semantics of the encapsulated information. Various types of refactorings have been proposed and implemented for programming languages (e.g., Java or C#). With the advent of (MDSD), a wealth of modelling languages rises and the need for restructuring models similar to programs has emerged. Since parts of these modelling languages are often very similar, we consider it beneficial to reuse the core transformation steps of refactorings across languages. In this sense, reusing the abstract transformation steps and the abstract participating elements suggests itself. Previous work in this field indicates that refactorings can be specified generically to foster their reuse. However, existing approaches can handle certain types of modelling languages only and solely reuse refactorings once per language. In this paper, a novel approach based on role models to specify generic refactorings is presented. Role models are suitable for this problem since they support declaration of roles which have to be played in a certain context. Assigned to generic refactoring, contexts are different refactorings and roles are the participating elements. We discuss how this resolves the limitations of previous works, as well as how specific refactorings can be defined as extensions to generic ones. The approach was implemented in our tool Refactory based on the (EMF) and evaluated using multiple modelling languages and refactorings. In addition, this paper investigates on the recommendation of refactoring specifications. This is motivated by the fact that language designers have many possibilities to enable refactorings in their modelling languages with regard to the language structures. To overcome this problem and to support language designers in deciding which refactorings to enable, we propose a solution and a prototypical implementation. 相似文献
16.
Gordon Plotkin 《Formal Aspects of Computing》2002,13(3-5):364-385
The connection between operational and denotational semantics is of longstanding interest in the study of programming languages.
The emphasis has been on positive results, whether for adequacy or full abstraction. One normally considers the standard solution
of an evident natural domain equation for the language; this is generally adequate but not fully abstract if one uses any
of the usual categories of domains. One then tries other categories to get improved results.
Here we restrict ourselves to a standard category of domains and show, for an untyped λ-calculus with arithmetic, that inadequate
models exist if one considers non-standard solutions to the domain equation. One model is inadequate, simpliciter; a second
is adequate but inadequate when the language is extended by a “parallel or” construct; the third is adequate in the latter
sense, but in it the Y-combinator does not denote the least fixed point operator.
We also consider whether it is possible to do better than the standard solution as regards full abstraction. Surprisingly
this question only makes sense for solutions which are adequate for the extended language. For these the standard solution
is indeed closest to full abstraction, justifying the use of non-standard categories.
Received October 2000 / Accepted in revised form April 2001 相似文献
17.
Ileana Ober Marc Palyart Jean-Michel Bruel David Lugato 《Software and Systems Modeling》2018,17(1):319-342
This paper reports on a four-year project that aims to raise the abstraction level through the use of model-driven engineering (MDE) techniques in the development of scientific applications relying on high-performance computing. The development and maintenance of high-performance scientific computing software is reputedly a complex task. This complexity results from the frequent evolutions of supercomputers and the tight coupling between software and hardware aspects. Moreover, current parallel programming approaches result in a mixing of concerns within the source code. Our approach relies on the use of MDE and consists in defining domain-specific modeling languages targeting various domain experts involved in the development of HPC applications, allowing each of them to handle their dedicated model in a both user-friendly and hardware-independent way. The different concerns are separated thanks to the use of several models as well as several modeling viewpoints on these models. Depending on the targeted execution platforms, these abstract models are translated into executable implementations by means of model transformations. To make all of these effective, we have developed a tool chain that is also presented in this paper. The approach is assessed through a multi-dimensional validation that focuses on its applicability, its expressiveness and its efficiency. To capitalize on the gained experience, we analyze some lessons learned during this project. 相似文献
18.
Roland Pastorino Francesco Cosco Frank Naets Wim Desmet Javier Cuadrado 《Multibody System Dynamics》2016,37(1):127-143
The real-time simulation of multibody models on embedded systems is of particular interest for controllers and observers such as model predictive controllers and state observers, which rely on a dynamic model of the process and are customarily executed in electronic control units. This work first identifies the software techniques and tools required to easily write efficient code for multibody models to be simulated on ARM-based embedded systems. Automatic Programming and Source Code Translation are the two techniques that were chosen to generate source code for multibody models in different programming languages. Automatic Programming is used to generate procedural code in an intermediate representation from an object-oriented library and Source Code Translation is used to translate the intermediate representation automatically to an interpreted language or to a compiled language for efficiency purposes. An implementation of these techniques is proposed. It is based on a Python template engine and AST tree walkers for Source Code Generation and on a model-driven translator for the Source Code Translation. The code is translated from a metalanguage to any of the following four programming languages: Python-Numpy, Matlab, C++-Armadillo, C++-Eigen. Two examples of multibody models were simulated: a four-bar linkage with multiple loops and a 3D vehicle steering system. The code for these examples has been generated and executed on two ARM-based single-board computers. Using compiled languages, both models could be simulated faster than real-time despite the low resources and performance of these embedded systems. Finally, the real-time performance of both models was evaluated when executed in hard real-time on Xenomai for both embedded systems. This work shows through measurements that Automatic Programming and Source Code Translation are valuable techniques to develop real-time multibody models to be used in embedded observers and controllers. 相似文献
19.
Promoting replication of models is unarguably a positive step for agent based modelling, as replication promotes rigorous testing. Model replication remains rare, yet is vital to assessing the repeatability of existing agent based models. Notably, more work is needed to assess cross platform and language replication, which represent potential sources of variability between model results. An existing, complex agent based model was replicated using two widely used platforms (NetLogo and Repast). When results generated by the models were compared, the findings differed not only in magnitude but the trends produced by the data, resulting in different conclusions being drawn from each set of model predictions. The variation between the models is believed to be a result of the complexity of encoding a substantial theoretical model in particular programming languages. This highlights the express need to document replication of existing models in order to fully understand the potential limitations to replication. 相似文献
20.
Many languages for computer systems simulation (like GPSS and CSim) use a stochastic model of systems with the provision of adding procedural code for those aspects of the system that cannot be captured easily by a stochastic model. However, they do not support the hierachical simulation of complex systems well. Complex computer systems may have to be simulated at various levels of abstraction in the interests of tractability: the flexibility of being able to freely move between the different levels of abstraction is very desirable. For example, in the area of computer architecture, one might have analytical models, detailed simulation models and trace-driven models. In addition, these languages do not have user-friendly interfaces for specification of the simulated system. In this paper, we discuss the design and implementation of a simulation package for hierachical simulation of non-real-time computer systems: a Simulator Generator from a Graphical System Specification (SIGGSYS}). A new language for system specification has been designed. In addition, the package has the following components: • A graphical user interface to aid specification of the system to be simulated. • A rear end that generates C++ code that implements a simulator for the specified system. • A complete object library along with the header files that implement a functionally complete set of C++ base classes which can be built upon. C++ has been chosen as the intermediate language so that the modeller can use its support for object oriented programming. © 1997 John Wiley & Sons, Ltd. 相似文献