1,528 research outputs found

    Parsing Fortran-77 with proprietary extensions

    Full text link
    Far from the latest innovations in software development, many organizations still rely on old code written in "obsolete" programming languages. Because this source code is old and proven it often contributes significantly to the continuing success of these organizations. Yet to keep the applications relevant and running in an evolving environment, they sometimes need to be updated or migrated to new languages or new platforms. One difficulty of working with these "veteran languages" is being able to parse the source code to build a representation of it. Parsing can also allow modern software development tools and IDEs to offer better support to these veteran languages. We initiated a project between our group and the Framatome company to help migrate old Fortran-77 with proprietary extensions (called Esope) into more modern Fortran. In this paper, we explain how we parsed the Esope language with a combination of island grammar and regular parser to build an abstract syntax tree of the code.Comment: Accepted at ICSME'23 Industrial trac

    PCG: A prototype incremental compilation facility for the SAGA environment, appendix F

    Get PDF
    A programming environment supports the activity of developing and maintaining software. New environments provide language-oriented tools such as syntax-directed editors, whose usefulness is enhanced because they embody language-specific knowledge. When syntactic and semantic analysis occur early in the cycle of program production, that is, during editing, the use of a standard compiler is inefficient, for it must re-analyze the program before generating code. Likewise, it is inefficient to recompile an entire file, when the editor can determine that only portions of it need updating. The pcg, or Pascal code generation, facility described here generates code directly from the syntax trees produced by the SAGA syntax directed Pascal editor. By preserving the intermediate code used in the previous compilation, it can limit recompilation to the routines actually modified by editing

    C to O-O Translation: Beyond the Easy Stuff

    Full text link
    Can we reuse some of the huge code-base developed in C to take advantage of modern programming language features such as type safety, object-orientation, and contracts? This paper presents a source-to-source translation of C code into Eiffel, a modern object-oriented programming language, and the supporting tool C2Eif. The translation is completely automatic and supports the entire C language (ANSI, as well as many GNU C Compiler extensions, through CIL) as used in practice, including its usage of native system libraries and inlined assembly code. Our experiments show that C2Eif can handle C applications and libraries of significant size (such as vim and libgsl), as well as challenging benchmarks such as the GCC torture tests. The produced Eiffel code is functionally equivalent to the original C code, and takes advantage of some of Eiffel's object-oriented features to produce safe and easy-to-debug translations

    Software maintenance: generating front ends for cross referencer tools

    Get PDF
    This thesis surveys the activities performed in software maintenance and identifies some of the software tools which can be utilised by the maintenance programmer. The most expensive phase of software maintenance is surveyed in more detail and tools to support this activity are identified. A new class of cross referencer tool was designed and investigated. The novel aspect of the cross referencer is that it can be used on more than one language, by utihzing grammar driven generators to customize and make maximum re-use of the language independent components, allowing language specific implementations to be generated with minimal effort. The cross referencer also extends an idea of having different levels of detail in cross reference listings by allowing the tool implementor to specify the contents of each level of detail. A proposed experimental toolkit for the automatic construction of these cross referencer front end tools, from non procedural specifications, is designed and investigated

    Reverse Software Engineering

    Get PDF
    The goal of Reverse Software Engineering is the reuse of old outdated programs in developing new systems which have an enhanced functionality and employ modern programming languages and new computer architectures. Mere transliteration of programs from the source language to the object language does not support enhancing the functionality and the use of newer computer architectures. The main concept in this report is to generate a specification of the source programs in an intermediate nonprocedural, mathematically oriented language. This specification is purely descriptive and independent of the notion of the computer. It may serve as the medium for manually improving reliability and expanding functionally. The modified specification can be translated automatically into optimized object programs in the desired new language and for the new platforms. This report juxtaposes and correlates two classes of computer programming languages: procedural vs. nonprocedural. The nonprocedural languages are also called rule based, equational, functional or assertive. Non-procedural languages are noted for the absence of side effects and the freeing of a user from thinking like a computer when composing or studying a procedural language program. Nonprocedural languages are therefore advantageous for software development and maintenance. Non procedural languages use mathematical semantics and therefore are more suitable for analysis of the correctness and for improving the reliability of software. The difference in semantics between the two classes of languages centers on the meaning of variables. In a procedural language a variable may be assigned multiple values, while in a nonprocedural language a variable may assume one and only one value. The latter is the same convention as used in mathematics. The translation algorithm presented in this report consists of renaming variables and expanding the logic and control in the procedural program until each variable is assigned one and only one value. The translation into equations can then be performed directly. The source program and object specification are equivalent in that there is a one to one equality of values of respective variables. The specification that results from these transformations is then further simplified to make it easy to learn and understand it when performing maintenance. The presentation of translation algorithms in this report utilizes FORTRAN as the source language and MODEL as the object language. MODEL is an equational language, where rules are expressed as algebraic equations. MODEL has an effective translation into the object procedural languages PL/1, C and Ada

    Extracting Functionally Equivalent Object-Oriented Designs from Legacy Imperative Code

    Get PDF
    This research defines a methodology for automatically extracting functionally equivalent object-oriented designs from legacy imperative programs. The Parameter-Based Object Identification (PBOI) methodology is based on fundamental ideas that relate programs written in imperative languages such as C or COBOL to objects and classes written in object-oriented languages such as Ada 95 or C ++. Transformations have been developed that formalize the PBOI methodology and a formal proof is provided showing the extracted object-oriented design is functionally equivalent to the legacy imperative system. To focus the task of re-engineering, generic models of imperative programming languages and object-oriented programming languages have been developed. The formal transformations convert imperative subprograms represented in the Generic Imperative Model (GIM) into classes and objects represented in the Generic Object-Oriented Design Model (GOM). A taxonomy of imperative subprograms has also been developed which classifies all imperative subprograms into one of six categories. A proof-of-concept prototype has been developed and a 3000-line FORTRAN-77 system has been converted to an object-oriented design as a feasibility demonstration

    Evolving software reengineering technology for the emerging innovative-competitive era

    Get PDF
    This paper reports on a multi-tool commercial/military environment combining software Domain Analysis techniques with Reusable Software and Reengineering of Legacy Software. It is based on the development of a military version for the Department of Defense (DOD). The integrated tools in the military version are: Software Specification Assistant (SSA) and Software Reengineering Environment (SRE), developed by Computer Command and Control Company (CCCC) for Naval Surface Warfare Center (NSWC) and Joint Logistics Commanders (JLC), and the Advanced Research Project Agency (ARPA) STARS Software Engineering Environment (SEE) developed by Boeing for NAVAIR PMA 205. The paper describes transitioning these integrated tools to commercial use. There is a critical need for the transition for the following reasons: First, to date, 70 percent of programmers' time is applied to software maintenance. The work of these users has not been facilitated by existing tools. The addition of Software Reengineering will also facilitate software maintenance and upgrading. In fact, the integrated tools will support the entire software life cycle. Second, the integrated tools are essential to Business Process Reengineering, which seeks radical process innovations to achieve breakthrough results. Done well, process reengineering delivers extraordinary gains in process speed, productivity and profitability. Most importantly, it discovers new opportunities for products and services in collaboration with other organizations. Legacy computer software must be changed rapidly to support innovative business processes. The integrated tools will provide commercial organizations important competitive advantages. This, in turn, will increase employment by creating new business opportunities. Third, the integrated system will produce much higher quality software than use of the tools separately. The reason for this is that producing or upgrading software requires keen understanding of extremely complex applications which is facilitated by the integrated tools. The radical savings in the time and cost associated with software, due to use of CASE tools that support combined Reuse of Software and Reengineering of Legacy Code, will add an important impetus to improving the automation of enterprises. This will be reflected in continuing operations, as well as in innovating new business processes. The proposed multi-tool software development is based on state of the art technology, which will be further advanced through the use of open systems for adding new tools and experience in their use

    Optimising Code Generation with haggies

    Full text link
    This article describes haggies, a program for the generation of optimised programs for the efficient numerical evaluation of mathematical expressions. It uses a multivariate Horner-scheme and Common Subexpression Elimination to reduce the overall number of operations. The package can serve as a back-end for virtually any general purpose computer algebra program. Built-in type inference that allows to deal with non-standard data types in strongly typed languages and a very flexible, pattern-based output specification ensure that haggies can produce code for a large variety of programming languages. We currently use haggies as part of an automated package for the calculation of one-loop scattering amplitudes in quantum field theories. The examples in this articles, however, demonstrate that its use is not restricted to the field of high energy physics.Comment: 66 pages, 5 figures, program files for download at http://www.nikhef.nl/~thomasr

    An Investigation Into the Generality of a Graphical Representation of Program Code for Source to Source Translation

    Get PDF
    This thesis addresses the problem of defining a source-to-source translation system for reusable software components. It describes the development of an interoperable language for writing software components, and presents a system to translate components written in the interoperable language to a set of compatible target languages. The common features in a set of popular programming languages are analyzed to inform the design of the interoperable language. An evaluation is performed by using the source-to-source translator to convert two well-known open source Java libraries to C++ and Python, and the accuracy and performance of the resulting translations are assessed
    corecore