In this paper we propose a new mechanism for Dynamic Rebinding, a particular kind of Dynamic Software Updating that focuses on modifying the workflow of a program. This mechanism is built upon the concurrency model of...
详细信息
In this paper we propose a new mechanism for Dynamic Rebinding, a particular kind of Dynamic Software Updating that focuses on modifying the workflow of a program. This mechanism is built upon the concurrency model of Concurrent object Groups that is adopted in programming languages like Coboxes, Creol or ABS. Using this model, which extends and solves some of the limitations of Active objects, it becomes possible for an update to wait for the program to reach a local quiescent state and then perform the update without creating any inconsistency in the program's state. We validate our mechanism by formally proving that i) no updates are performed when the program has not reached a local quiescent state, ii) an update is guaranteed to be applied if we first wait for the program to reach a local quiescent state, and iii) it is possible to perform different updates atomically. We also provide a type system that checks the good usage of the rebinding operator. We implemented a prototype supporting our mechanism in the toolchain of the ABS language, and we tested the implementation by supporting dynamic changes in the server policy of an industrial case study from the eCommerce Fredhopper platform, offered by SDL. Without our rebinding mechanism, supporting such dynamic changes in a provably correct manner would not have been so simple. Finally, we developed an implementation of type checking for the ABS language extended with our rebinding primitives, and successfully tested it for the case study discussed in the paper. (C) 2016 Elsevier Inc. All rights reserved.
The number of approaches existing to enable a smooth interaction between Java and Prolog programs testifies the growing interest in solutions that combine the strengths of both languages. Most of these approaches prov...
详细信息
The number of approaches existing to enable a smooth interaction between Java and Prolog programs testifies the growing interest in solutions that combine the strengths of both languages. Most of these approaches provide limited support to allow programmers to customise how Prolog artefacts should be reified in the Java world, or how to reason about Java objects on the Prolog side. This is an error-prone task since often a considerable amount of mappings must be developed and organised. Furthermore, appropriate mappings may depend on the particular context in which a conversion is accomplished. Although some libraries alleviate this problem by providing higher-level abstractions to deal with the complexity of custom conversions between artefacts of the two languages, such libraries are difficult to implement and evolve, because of a lack of appropriate underlying building blocks for encapsulating, categorising and applying Java-Prolog conversion routines. We therefore introduce a new library, JPC, serving as a development tool for both programmers willing to categorise context-dependent conversion constructs in their Java-Prolog systems, and for architects implementing frameworks providing higher-level abstractions for better interoperability between these two languages. (C) 2015 Elsevier B.V. All rights reserved.
Reactive transport modeling contributes to understand geophysical and geochemical processes in subsurface environments. Operator splitting methods have been proposed as non-intrusive coupling techniques that optimize ...
详细信息
Reactive transport modeling contributes to understand geophysical and geochemical processes in subsurface environments. Operator splitting methods have been proposed as non-intrusive coupling techniques that optimize the use of existing chemistry and transport codes. In this spirit, we propose a coupler relying on external geochemical and transport codes with appropriate operator segmentation that enables possible developments of additional splitting methods. We provide an object-oriented implementation in TReacLab developed in the MATLAB environment in a free open source frame with an accessible repository. TReacLab contains classical coupling methods, template interfaces and calling functions for two classical transport and reactive software (PHREEQC and COMSOL). It is tested on four classical benchmarks with homogeneous and heterogeneous reactions at equilibrium or kinetically-controlled. We show that full decoupling to the implementation level has a cost in terms of accuracy compared to more integrated and optimized codes. Use of non-intrusive implementations like TReacLab are still justified for coupling independent transport and chemical software at a minimal development effort but should be systematically and carefully assessed.
On-demand collective irrigation networks are hydraulic systems designed to deliver and distribute irrigation water from the water source to the irrigation perimeter, while providing users with the flexibility to decid...
详细信息
On-demand collective irrigation networks are hydraulic systems designed to deliver and distribute irrigation water from the water source to the irrigation perimeter, while providing users with the flexibility to decide on the time, the duration and the frequency with which they intend to use their hydrant. This paper presents the newly developed software NIREUS, which is developed for implementing the performance analysis of such networks. The performance analysis with NIREUS gives an overview of the operational status of the network under study by implementing the model of the indexed characteristic curves, while on the other hand, NIREUS determines the pipes/hydrants of the network that present, or are most likely to present, operational problems by implementing the performance analysis at hydrant level. This information is particularly useful for the management of existing networks as well as for the planning of future interventions and rehabilitation activities. The paper also describes the main functions of NIREUS and the characteristics that differentiate it from other existing software. Moreover, a new indicator which is incorporated in NIREUS is presented, in which the whole magnitude of the operational efficiency of a hydrant is depicted. The validation of the new software is made through a comparative application of NIREUS and COPAM to an existing on-demand pressurized collective irrigation network. Results proved the usefulness of NIREUS in highlighting both the weak and the strong parts of the network. The validation procedure gave a very close approximation of the respective values calculated with COPAM with the relative error ranging between 0.0% to 0.36% for the indexed characteristic curve of C50 and 0.01% to 0.22% for the indexed characteristic curves of C70. (C) 2017 Elsevier B.V. All rights reserved.
The field of computational constitutive modelling for engineering applications is an active research tread in academia. New advanced models and formulations are constantly proposed. However, when dealing with implemen...
详细信息
The field of computational constitutive modelling for engineering applications is an active research tread in academia. New advanced models and formulations are constantly proposed. However, when dealing with implementation aspects, often the main concern is to provide a minimal environment to show a certain model and its applications, with implementations made from scratch. Though advanced, usually such implementations lack of generality and are well-suited for a certain numerical method while not compatible with other ones, making it difficult to reuse the code in other contexts. The objectoriented Paradigm (OOP) to programming have been widely applied in the last years for the realization of numerous academic numerical simulation softwares, due to its fundamental properties of abstraction, inheritance and polymorphism that allow the creation of programs well-suited for an easy collaboration between developers with expertise in different fields of engineering and mechanics. As showed in this paper, the same properties can be effectively extended also to the constitutive aspects of a model. The application of the OOP to the constitutive modelling of a wide range of materials of engineering interest is investigated, aiming to the creation of a computational framework for constitutive models that is fully independent on the other components of a code and easy to expand. (C) 2017 Elsevier Ltd. All rights reserved.
'Extract Method' is considered one of the most frequently applied and beneficial refactorings, since the corresponding Long Method smell is among the most common and persistent ones. Although Long Method is co...
详细信息
'Extract Method' is considered one of the most frequently applied and beneficial refactorings, since the corresponding Long Method smell is among the most common and persistent ones. Although Long Method is conceptually related to the implementation of diverse functionalities within a method, until now, this relationship has not been utilized while identifying refactoring opportunities. In this paper we introduce an approach (accompanied by a tool) that aims at identifying source code chunks that collaborate to provide a specific functionality, and propose their extraction as separate methods. The accuracy of the proposed approach has been empirically validated both in an industrial and an open-source setting. In the former case, the approach was capable of identifying functionally related statements within two industrial long methods (approx. 500 LoC each), with a recall rate of 93 percent. In the latter case, based on a comparative study on open-source data, our approach ranks better compared to two well-known techniques of the literature. To assist software engineers in the prioritization of the suggested refactoring opportunities the approach ranks them based on an estimate of their fitness for extraction. The provided ranking has been validated in both settings and proved to be strongly correlated with experts' opinion.
A key issue involved with software engineering education consists of how to guarantee that adequate software engineering principles are being followed at the code level, thus reinforcing that students produce high-qua...
详细信息
A key issue involved with software engineering education consists of how to guarantee that adequate software engineering principles are being followed at the code level, thus reinforcing that students produce high-quality code. Reviewing and grading student projects to verify whether they followed such principles is a time-consuming task, since this typically involves manual code inspection. In this paper, we exploit code quality tools and metrics to automatically assess student projects with respect to methods with many responsibilities (i.e., where the Extract Method refactoring should be applied), and evaluate their effectiveness. We conducted a study using two sets of student projects, developed in two academic semesters. Our results indicate that, to reduce the effort required to grade projects, two traditional code metrics, namely method lines of code and number of statements, perform best, and other metrics can be selected according to the system being implemented. (C) 2017 Wiley Periodicals, Inc.
The new Reference Resistance Design (RRD) method, recently developed by Rotter [1], for the manual dimensioning of metal shell structures effectively permits an analyst working with only a calculator or spreadsheet to...
详细信息
The new Reference Resistance Design (RRD) method, recently developed by Rotter [1], for the manual dimensioning of metal shell structures effectively permits an analyst working with only a calculator or spreadsheet to take full advantage of the realism and accuracy of an advanced nonlinear finite element (FE) calculation. The method achieves this by reformulating the outcomes of a vast programme of parametric FE calculations in terms of six algebraic parameters and two resistances, each representing a physical aspect of the shell's behaviour. The formidable challenge now is to establish these parameters and resistances for the most important shell geometries and load cases. The systems that have received by far the most research attention for RRD are that of a cylindrical shell under uniform axial compression and uniform bending. Their partial algebraic characterisations required thousands of finite element calculations to be performed across a four-dimensional parameter hyperspace (i.e. length, radius to thickness ratio, imperfection amplitude, linear strain hardening modulus). Handling so many nonlinear finite element models is time-consuming and the quantities of data generated can be overwhelming. This paper illustrates a computational strategy to deal with both issues that may help researchers establish sets of RRD parameters for other important shell systems with greater confidence and accuracy. The methodology involves full automation of model generation, submission, termination and processing with object-oriented scripting, illustrated using code and pseudocode fragments. (C) 2017 The Authors. Published by Elsevier Ltd.
Context Mutation testing has been mainly analyzed regarding traditional mutation operators involving structured programming constructs common in mainstream languages, but mutations at the class level have not been ass...
详细信息
Context Mutation testing has been mainly analyzed regarding traditional mutation operators involving structured programming constructs common in mainstream languages, but mutations at the class level have not been assessed to the same extent. This fact is noteworthy in the case of C++, despite being one of the most relevant languages including object-oriented features. objective: This paper provides a complete evaluation of class operators for the C++ programming language. MuCPP, a new system devoted to the application of mutation testing to this language, was developed to this end. This mutation system implements class mutation operators in a robust way, dealing with the inherent complexity of the language. Method: MuCPP generates the mutants by traversing the abstract syntax tree of each translation unit with the Clang API, and stores mutants as branches in the Git version control system. The tool is able to detect duplicate mutants, avoid system headers, and drive the compilation process. Then, MuCPP is used to conduct experiments with several open-source C++ programs. Results: The improvement rules listed in this paper to reduce unproductive class mutants have a significant impact in the computational cost of the technique. We also calculate the quantity and distribution of mutants generated with class operators, which generate far fewer mutants than their traditional counterparts. Conclusions: We show that the tests accompanying these programs cannot detect faults related to particular object-oriented features of C++. In order to increase the mutation score, we create new test scenarios to kill the surviving class mutants for all the applications. The results confirm that, while traditional mutation operators are still needed, class operators can complement them and help testers further improve the test suite. (C) 2016 Elsevier B.V. All rights reserved.
Aspect-orientedprogramming (AOP) is a programmatic methodology to handle better modularized code by separating crosscutting concerns from the traditional abstraction boundaries. Automated testing, as one of the most ...
详细信息
Aspect-orientedprogramming (AOP) is a programmatic methodology to handle better modularized code by separating crosscutting concerns from the traditional abstraction boundaries. Automated testing, as one of the most demanding needs of the software development to reduce both human effort and costs, is a delicate issue in testing aspect-oriented programs. Prior studies in the automated test generation for aspect-oriented programs have been very limited with respect to the need for both adequate tool support and capability concerning effectiveness and efficiency. This paper describes a new AOP-specific tool for testing aspect-oriented programs, called RAMBUTANS. The RAMBUTANS tool uses a directed random testing technique that is especially well suited for generating tests for aspectual features in AspectJ. The directed random aspect of the tool is parameterized by associating weights to aspects, advice, methods, and classes by controlling object and joint point creations during the test generation process. We present a comprehensive empirical evaluation of our tool against the current AOP test generation approaches on three industrial aspect-oriented projects. The results of the experimental and statistical tests showed that RAMBUTANS tool produces test suites that have higher fault-detection capability and efficiency for AspectJ-like programs.
暂无评论