Software Reengineering: Technology a Case Study and Lessons Learned U.S

Total Page:16

File Type:pdf, Size:1020Kb

Software Reengineering: Technology a Case Study and Lessons Learned U.S Computer Systems Software Reengineering: Technology A Case Study and Lessons Learned U.S. DEPARTMENT OF COMMERCE National Institute of Mary K. Ruhl and Mary T. Gunn Standards and Technology NIST NIST i PUBUCATiONS 100 500-193 1991 V DATE DUE '11// fr . — >^c"n.u, jnc. i(8-293 ~ 1— NIST Special Publication 500-193 Software Reengineering: A Case Study and Lessons Learned Mary K. Ruhl and Mary T. Gunn Computer Systems Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899 September 1991 U.S. DEPARTMENT OF COMMERCE Robert A. Mosbacher, Secretary NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY John W. Lyons, Director Reports on Computer Systems Technology The National Institute of Standards and Technology (NIST) has a unique responsibility for computer systems technology within the Federal government. NIST's Computer Systems Laboratory (CSL) devel- ops standards and guidelines, provides technical assistance, and conducts research for computers and related telecommunications systems to achieve more effective utilization of Federal information technol- ogy resources. CSL's responsibilities include development of technical, management, physical, and ad- ministrative standards and guidelines for the cost-effective security and privacy of sensitive unclassified information processed in Federal computers. CSL assists agencies in developing security plans and in improving computer security awareness training. This Special Publication 500 series reports CSL re- search and guidelines to Federal agencies as well as to organizations in industry, government, and academia. National Institute of Standards and Technology Special Publication 500-193 Natl. Inst. Stand. Technol. Spec. Publ. 500-193, 39 pages (Sept. 1991) CODEN: NSPUE2 U.S. GOVERNMENT PRINTING OFFICE WASHINGTON: 1991 For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402 Abstract This report is aimed at managers and technical personnel (both Federal Government and industry) who need to understand: • the concepts and issues of software reengineering, • the use of Computer-Aided Software Engineering (CASE) tools in the reengineering process, • and the application of this technology to organizational problems. Software reengineering involves the use of existing software and documentation to specify requirements, design, documentation, and to produce software for a target platform. CASE tools are expected to play an important role in automating parts of the reengineering process. In this report software reengineering and other related terms are defined and possible benefits that relate to this technology are described. The use of CASE tools for reengineering are examined. A case study that examines the feasibility and cost-effectiveness of software reengineering is described. Study results are addressed along with recommendations for organizations that are considering the use of reengineering. Keywords CASE (Computer-Aided Software Engineering) tools, design recovery, reengineering strategies, reverse engineering, software reengineering. Acknowledgments Special thanks to Wayne McCoy and Bruce Rosen of NIST for their valuable comments and guidance. We would also like to thank our reviewers: Dolores Wallace, and Neva Carlson of NIST; George Baird and Dr. Paul Oliver of Booz, Allen, and Hamilton Inc.; and Dolores Martinez, Cathy McKinney, Dan Scott, and George Wall of IRS. iii Executive Summary Software reengineering involves the use of existing software and documentation to specify requirements, design, documentation, and to produce software for a target platform. Many Federal government agencies and other organizations are evaluating the migration of older software to more powerful, more open computing environments. Additional system concerns include the high cost of software maintenance, the need to gain a better understanding of existing systems, and the impact of reduced computer systems budgets. Federal agencies are looking to software reengineering as a solution to these problems. A case study conducted by the National Institute of Standards and Technology (NIST) and the Internal Revenue Service (IRS) indicates that software reengineering can be a cost-effective, viable solution for extending the lifetime of an application system. The degree to which it is cost-effective depends on the goals for reengineering, the condition of the original application system and documentation, available automated tool support, and the involved personnel. The context for reengineering should be established in terms of the corporate goals for the organization before undertaking the task of reengineering. It is also important to clearly define the system goals and motivations for reengineering. Clearly defined goals are needed to determine a suitable approach for reengineering. A variety of approaches can be employed to gain the benefits of reengineering. These approaches differ by the amount of design that is to be retained from the original system, the organization's reengineering goals, the condition of the current system, and the resources to be allocated to the project. Before determining a reengineering approach, the application system should undergo a thorough evaluation to determine what is worth retaining for future use and what is not. During the evaluation, data definitions and usage, code, documentadon, maintenance history, and appropriate metrics should be analyzed to determine the current condition of the system. The case study indicates that full support for software reengineering from CASE tools is currently lacking in several aspects. Most currently available CASE tools are directed at one particular aspect of software reengineering and are targeted for a certain environment. Therefore, expectations for automated support from CASE tools must be realistic. Provisions in terms of personnel, effort and tools must be made to compensate for the lack of full support of the reengineering process by currently available off-the-shelf tools. Performing reengineering requires a highly trained staff with experience in the current and target system, the automated tools, and the specific programming languages involved. Application system experts must be involved throughout the reengineering process; they are essential for design recovery. Software reengineering is a complex and difficult process. The success of an organization's application of this technology wiU be determined by the level of commitment made by the organization. iv Table of Contents 1. Introduction 1 2. Software Reengineering and CASE Technology 2 2. 1 Definitions and Related Terms 2 2.2 Motivations For Reengineering 3 2.3 The Use of CASE Tools for Reengineering 4 2.4 The Repository 5 3. A Government Case Study 7 3.1 Background and Goals 7 3.2 Technical Approach 8 3.3 Issues 9 3.4 Findings 10 3.4.1 Process 10 3.4.2 Metrics Analysis 11 3.4.3 Reengineering Tools 12 4. Conclusions and Recommendations 13 4.1 General 13 4.2 Corporate, System, and Reengineering Goals 15 4.3 Condition of Original System and Documentation 17 4.4 Resources 20 4.4.1 Automated Tool Support 20 4.4.2 Personnel 22 5. Final Remarks 23 6. References 25 Appendix A: Function Point Analysis 27 Appendix B: Result Metrics Analysis 29 Appendix C: Glossary 33 V 1. Introduction Many federal agencies are faced today with the problem of operating and maintaining obsolete software and hardware. Gains in microprocessor, operating system, and communication technologies have enabled faster and more flexible computing than that which was possible when many of today's operational government systems were created. To achieve improvements in system operation and performance while protecting their software investment, many organizations want to migrate existing software to new computing platforms. The high cost of software maintenance (enhancement, adaptation to new environments, and error correction) is another problem facing many organizations. Usage of disciplined design, implementation, testing and maintenance methodologies helps to ease the maintenance costs, but estimates for software maintenance are still high — consisting of 60 to 80% of today's total software cost. The documentation of a software system is rarely up-to-date. Changes to the code are typically made without a corresponding change to the documentation. Inconsistency between documentation and code can make software maintenance difficult. In addition, the documentation may be incomplete. Unrecorded information may be known only to those who deal with the system on a daily basis and this information can become lost over the years due to personnel changes. Inconsistent and incomplete documentation complicates and lengthens the maintenance process and cause a dependence on certain system personnel for operation. In the 1960s, 80% of the total system cost (amount expended over the lifetime of the system) was appropriated for hardware and 20% for software. In 1985 these estimates had been reversed, with software consuming 80% of the system budget [FAIR85]. The reasons behind this trend are the dramatic decrease in hardware costs (due to advances in semiconductor fabrication technology), the labor-intensive nature of software, and the increase in personnel costs. The proportion of expenditure on software emphasizes the importance of structure and maintainability of software, and demands that software have a long lifetime. There is another economic factor driving the use of software reengineering. Cuts in government and industry budgets have reduced
Recommended publications
  • ASSESSING the MAINTAINABILITY of C++ SOURCE CODE by MARIUS SUNDBAKKEN a Thesis Submitted in Partial Fulfillment of the Requireme
    ASSESSING THE MAINTAINABILITY OF C++ SOURCE CODE By MARIUS SUNDBAKKEN A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Computer Science WASHINGTON STATE UNIVERSITY School of Electrical Engineering and Computer Science DECEMBER 2001 To the Faculty of Washington State University: The members of the Committee appointed to examine the thesis of MARIUS SUNDBAKKEN find it satisfactory and recommend that it be accepted. Chair ii ASSESSING THE MAINTAINABILITY OF C++ SOURCE CODE Abstract by Marius Sundbakken, M.S. Washington State University December 2001 Chair: David Bakken Maintenance refers to the modifications made to software systems after their first release. It is not possible to develop a significant software system that does not need maintenance because change, and hence maintenance, is an inherent characteristic of software systems. It has been estimated that it costs 80% more to maintain software than to develop it. Clearly, maintenance is the major expense in the lifetime of a software product. Predicting the maintenance effort is therefore vital for cost-effective design and development. Automated techniques that can quantify the maintainability of object- oriented designs would be very useful. Models based on metrics for object-oriented source code are necessary to assess software quality and predict engineering effort. This thesis will look at C++, one of the most widely used object-oriented programming languages in academia and industry today. Metrics based models that assess the maintainability of the source code using object-oriented software metrics are developed. iii Table of Contents 1. Introduction .................................................................................................................1 1.1. Maintenance and Maintainability.......................................................................
    [Show full text]
  • Software Maintenance Maintenance Is Inevitable Types of Maintenance
    SoftWindows 8/18/2003 Software Maintenance • Managing the processes of system change Reverse Engineering (Software Maintenance & Reengineering) © SERG Maintenance is Inevitable • The system requirements are likely to change while the system is being developed because the environment is changing. • When a system is installed in an environment it changes that environment and therefore changes the system requirements. Reverse Engineering (Software Maintenance & Reengineering) © SERG Types of Maintenance • Perfective maintenance – Changing a system to make it meet its requirements more effectively. • Adaptive maintenance – Changing a system to meet new requirements. • Corrective maintenance – Changing a system to correct deficiencies in the way meets its requirements. Reverse Engineering (Software Maintenance & Reengineering) © SERG Distributed Objects 1 SoftWindows 8/18/2003 Distribution of Maintenance Effort Corrective maintenance (17%) Adaptive maintenance Perfective (18%) maintenance (65%) Reverse Engineering (Software Maintenance & Reengineering) © SERG Evolving Systems • It is usually more expensive to add functionality after a system has been developed rather than design this into the system: – Maintenance staff are often inexperienced and unfamiliar with the application domain. – Programs may be poorly structured and hard to understand. – Changes may introduce new faults as the complexity of the system makes impact assessment difficult. – The structure may be degraded due to continual change. – There may be no documentation available to describe the program. Reverse Engineering (Software Maintenance & Reengineering) © SERG The Maintenance Process • Maintenance is triggered by change requests from customers or marketing requirements. • Changes are normally batched and implemented in a new release of the system. • Programs sometimes need to be repaired without a complete process iteration but this is dangerous as it leads to documentation and programs getting out of step.
    [Show full text]
  • System Software Maintenance and Support 24X7
    SYSTEM SOFTWARE MAINTENANCE AND SUPPORT SERVICES - PREMIUM These Premium System Software Maintenance and Support Service terms and conditions (“Terms and Conditions”) apply to any quote, order, order acknowledgment, and invoice, and any sale or provision of Premium System Software Maintenance and Support Services as defined herein provided to Customer by Viavi Solutions Inc. (“Viavi”), in addition to Viavi’s General Terms (“General Terms”) and/or Software License Terms, which are incorporated by reference herein and are either attached hereto, available at www.viavisolutions.com/terms or available upon request. k) Severity Level means classification of a problem determined by Viavi personnel 1. PURPOSE AND SCOPE based upon the Customer’s assessment of business impact. The three (3) Severity Levels that apply to the Services are as follows: These Terms and Conditions describe the Services that Viavi will provide to, and perform for, Customer. These Terms and Conditions apply to Services for standard Software, as 1) Problem Report – Critical means conditions that severely affect the defined herein, and are limited to the System configuration specified in a Statement of primary functionality of the System and because of the business impact to the Work (“SOW”) or other ordering document (i.e., a quote, order, order acknowledgment customer requires non-stop immediate corrective action, regardless of time of day or invoice) which contains a description of the System. All Services and Documentation or day of the week as viewed by a customer
    [Show full text]
  • A Scalable Provenance Evaluation Strategy
    Debugging Large-scale Datalog: A Scalable Provenance Evaluation Strategy DAVID ZHAO, University of Sydney 7 PAVLE SUBOTIĆ, Amazon BERNHARD SCHOLZ, University of Sydney Logic programming languages such as Datalog have become popular as Domain Specific Languages (DSLs) for solving large-scale, real-world problems, in particular, static program analysis and network analysis. The logic specifications that model analysis problems process millions of tuples of data and contain hundredsof highly recursive rules. As a result, they are notoriously difficult to debug. While the database community has proposed several data provenance techniques that address the Declarative Debugging Challenge for Databases, in the cases of analysis problems, these state-of-the-art techniques do not scale. In this article, we introduce a novel bottom-up Datalog evaluation strategy for debugging: Our provenance evaluation strategy relies on a new provenance lattice that includes proof annotations and a new fixed-point semantics for semi-naïve evaluation. A debugging query mechanism allows arbitrary provenance queries, constructing partial proof trees of tuples with minimal height. We integrate our technique into Soufflé, a Datalog engine that synthesizes C++ code, and achieve high performance by using specialized parallel data structures. Experiments are conducted with Doop/DaCapo, producing proof annotations for tens of millions of output tuples. We show that our method has a runtime overhead of 1.31× on average while being more flexible than existing state-of-the-art techniques. CCS Concepts: • Software and its engineering → Constraint and logic languages; Software testing and debugging; Additional Key Words and Phrases: Static analysis, datalog, provenance ACM Reference format: David Zhao, Pavle Subotić, and Bernhard Scholz.
    [Show full text]
  • Software Engineering Software Maintenance
    SOFTWARE ENGINEERING SOFTWARE MAINTENANCE Software maintenance is the process of modification or making changes in the system after delivery to overcome errors and faults in the system that were not uncovered during the early stages of the development cycle. LEARNING OBJECTIVES • To study on why maintenance is an issue. • To study on reverse engineering and limitations. • To organize data. • To check what the system does. SOFTWARE MAINTENANCE The IEEE Standard for Software Maintenance (IEEE 1219) gave the definition for software maintenance as “The process of modifying a software system or component after delivery to correct faults, improves performance or other attributes, or adapt to a changed environment.” Maintenance Principles 100 Hardware Development 60 Software 20 Maintenance Percent of total cost total of Percent 1995 2000 2010 The IEEE/EIA 12207 Standard defines maintenance as modification to code and associated documentation due to a problem or the need for improvement. Nature of Maintenance Modification requests are logged and tracked, the impact of proposed changes are determined, code and other software artifacts are modified, testing is conducted, and a new version of the software product is released. Maintainers can learn from the developer´s knowledge of the software. Need for Maintenance Maintenance must be performed in order to: • Correct faults. • Improve the design. • Implement enhancements. • Interface with other systems. • Adapt programs so that different hardware, software, system features, and telecommunications facilities can be used. • Migrate legacy software. • Retire software Tasks of a maintainer The maintainer does the following functions: • Maintain control over the software´s day-to-day functions. • Maintain control over software modification.
    [Show full text]
  • Implementing a Vau-Based Language with Multiple Evaluation Strategies
    Implementing a Vau-based Language With Multiple Evaluation Strategies Logan Kearsley Brigham Young University Introduction Vau expressions can be simply defined as functions which do not evaluate their argument expressions when called, but instead provide access to a reification of the calling environment to explicitly evaluate arguments later, and are a form of statically-scoped fexpr (Shutt, 2010). Control over when and if arguments are evaluated allows vau expressions to be used to simulate any evaluation strategy. Additionally, the ability to choose not to evaluate certain arguments to inspect the syntactic structure of unevaluated arguments allows vau expressions to simulate macros at run-time and to replace many syntactic constructs that otherwise have to be built-in to a language implementation. In principle, this allows for significant simplification of the interpreter for vau expressions; compared to McCarthy's original LISP definition (McCarthy, 1960), vau's eval function removes all references to built-in functions or syntactic forms, and alters function calls to skip argument evaluation and add an implicit env parameter (in real implementations, the name of the environment parameter is customizable in a function definition, rather than being a keyword built-in to the language). McCarthy's Eval Function Vau Eval Function (transformed from the original M-expressions into more familiar s-expressions) (define (eval e a) (define (eval e a) (cond (cond ((atom e) (assoc e a)) ((atom e) (assoc e a)) ((atom (car e)) ((atom (car e)) (cond (eval (cons (assoc (car e) a) ((eq (car e) 'quote) (cadr e)) (cdr e)) ((eq (car e) 'atom) (atom (eval (cadr e) a))) a)) ((eq (car e) 'eq) (eq (eval (cadr e) a) ((eq (caar e) 'vau) (eval (caddr e) a))) (eval (caddar e) ((eq (car e) 'car) (car (eval (cadr e) a))) (cons (cons (cadar e) 'env) ((eq (car e) 'cdr) (cdr (eval (cadr e) a))) (append (pair (cadar e) (cdr e)) ((eq (car e) 'cons) (cons (eval (cadr e) a) a)))))) (eval (caddr e) a))) ((eq (car e) 'cond) (evcon.
    [Show full text]
  • Comparative Studies of Programming Languages; Course Lecture Notes
    Comparative Studies of Programming Languages, COMP6411 Lecture Notes, Revision 1.9 Joey Paquet Serguei A. Mokhov (Eds.) August 5, 2010 arXiv:1007.2123v6 [cs.PL] 4 Aug 2010 2 Preface Lecture notes for the Comparative Studies of Programming Languages course, COMP6411, taught at the Department of Computer Science and Software Engineering, Faculty of Engineering and Computer Science, Concordia University, Montreal, QC, Canada. These notes include a compiled book of primarily related articles from the Wikipedia, the Free Encyclopedia [24], as well as Comparative Programming Languages book [7] and other resources, including our own. The original notes were compiled by Dr. Paquet [14] 3 4 Contents 1 Brief History and Genealogy of Programming Languages 7 1.1 Introduction . 7 1.1.1 Subreferences . 7 1.2 History . 7 1.2.1 Pre-computer era . 7 1.2.2 Subreferences . 8 1.2.3 Early computer era . 8 1.2.4 Subreferences . 8 1.2.5 Modern/Structured programming languages . 9 1.3 References . 19 2 Programming Paradigms 21 2.1 Introduction . 21 2.2 History . 21 2.2.1 Low-level: binary, assembly . 21 2.2.2 Procedural programming . 22 2.2.3 Object-oriented programming . 23 2.2.4 Declarative programming . 27 3 Program Evaluation 33 3.1 Program analysis and translation phases . 33 3.1.1 Front end . 33 3.1.2 Back end . 34 3.2 Compilation vs. interpretation . 34 3.2.1 Compilation . 34 3.2.2 Interpretation . 36 3.2.3 Subreferences . 37 3.3 Type System . 38 3.3.1 Type checking . 38 3.4 Memory management .
    [Show full text]
  • Read Ms. Shaw's First Amended Complaint
    Janet L. Goldstein Peter W. Chatfield THE MARTYN FIRM, PLLC PHILLIPS & COHEN LLP 1054 31st Street, NW 2000 Massachusetts Ave., NW Washington, D.C. 20007 Washington, D.C. 20036 Tel: (202) 965-3060 Tel: (202) 833-4567 Fax: (202) 965-3063 Fax: (202) 833-1815 Jonathan A. Willens (JW-9180) JONATHAN A. WILLENS LLC 217 Broadway, Suite 707 New York, New York 10007 Tel: (212) 619-3749 Fax: (800) 879-7938 Attorneys for qui tam plaintiff Ann-Marie Shaw UNITED STATES DISTRICT COURT FOR THE EASTERN DISTRICT OF NEW YORK UNITED STATES OF AMERICA ) 06 CV 3552 (DLI) (SMG) ex rel. ANN-MARIE SHAW ) and ) AMENDED COMPLAINT ) FOR VIOLATIONS OF STATE OF CALIFORNIA ex rel.ANN-MARIE SHAW ) FEDERAL AND STATE DISTRICT OF COLUMBIA ex rel.ANN-MARIE SHAW ) FALSE CLAIMS ACTS STATE OF FLORIDA ex rel.ANN-MARIE SHAW ) STATE OF HAWAII ex rel.ANN-MARIE SHAW ) STATE OF ILLINOIS ex rel.ANN-MARIE SHAW ) COMMONWEALTH OF MASSACHUSETTS ) ex rel.ANN-MARIE SHAW ) STATE OF NEVADA ex rel.ANN-MARIE SHAW ) COMMONWEALTH OF VIRGINA ) ex rel.ANN-MARIE SHAW ) STATE & CITY OF NEW YORK ) ex rel.ANN-MARIE SHAW, ) ) JURY TRIAL DEMANDED Plaintiffs, ) ) FILED UNDER SEAL v. ) ) CA, INC., ) ) Defendant. ) _______________________________________________ ) Through her attorneys, plaintiff and qui tam relator Ann-Marie Shaw, for her Amended Complaint against Defendant CA, Inc. (“CA”), formerly known as Computer Associates International, Inc. or “Computer Associates,” alleges as follows: FACTS COMMON TO ALL COUNTS A. Introduction 1. This is a civil action to recover damages and civil penalties arising from false and/or fraudulent statements, records, and claims made and caused to be made by the Defendant CA and/or its agents and employees in violation of the Federal Civil False Claims Act, 31 U.S.C.
    [Show full text]
  • Techniques for Software Maintenance 57 02 58
    01 Techniques for Software Maintenance 57 02 58 03 59 04 60 Kostas Kontogiannis 05 61 Department of Electrical and Computer Engineering, National Technical University of Athens, 06 62 Athens, Greece 07 63 08 64 09 65 10 66 Abstract 11 Software maintenance constitutes a major phase of the software life cycle. Studies indicate that software 67 12 maintenance is responsible for a significant percentage of a system’s overall cost and effort. The software 68 13 engineering community has identified four major types of software maintenance, namely, corrective, 69 14 perfective, adaptive, and preventive maintenance. Software maintenance can be seen from two major points 70 15 of view. First, the classic view where software maintenance provides the necessary theories, techniques, 71 16 methodologies, and tools for keeping software systems operational once they have been deployed to their 72 17 operational environment. Most legacy systems subscribe to this view of software maintenance. The second 73 18 view is a more modern emerging view, where maintenance is an integral part of the software development 74 19 process and it should be applied from the early stages in the software life cycle. Regardless of the view by 75 which we consider software maintenance, the fact is that it is the driving force behind software evolution, a 20 76 very important aspect of a software system. This entry provides an in-depth discussion of software 21 77 Q1 maintenance techniques, methodologies, tools, and emerging trends. 22 78 23 79 24 80 25 INTRODUCTION type of software maintenance is referred to as Adaptive 81 26 82 Software Maintenance and refers to activities that aim to 27 83 Software maintenance is an integral part of the software modify models and artifacts of existing systems so that 28 84 life cycle and has been identified as an activity that affects these systems can be integrated with new systems or 29 85 in a major way the overall system cost and effort.
    [Show full text]
  • Computer Performance Evaluation Users Group (CPEUG)
    COMPUTER SCIENCE & TECHNOLOGY: National Bureau of Standards Library, E-01 Admin. Bidg. OCT 1 1981 19105^1 QC / 00 COMPUTER PERFORMANCE EVALUATION USERS GROUP CPEUG 13th Meeting NBS Special Publication 500-18 U.S. DEPARTMENT OF COMMERCE National Bureau of Standards 3-18 NATIONAL BUREAU OF STANDARDS The National Bureau of Standards^ was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology and facilitate their effective application for public benefit. To this end, the Bureau conducts research and provides: (1) a basis for the Nation's physical measurement system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to pro- mote public safety. The Bureau consists of the Institute for Basic Standards, the Institute for Materials Research, the Institute for Applied Technology, the Institute for Computer Sciences and Technology, the Office for Information Programs, and the Office of Experimental Technology Incentives Program. THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United States of a complete and consist- ent system of physical measurement; coordinates that system with measurement systems of other nations; and furnishes essen- tial services leading to accurate and uniform physical measurements throughout the Nation's scientific community, industry, and commerce. The Institute consists of the Office of Measurement Services, and the following
    [Show full text]
  • Needed Reduction and Spine Strategies for the Lambda Calculus
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector INFORMATION AND COMPUTATION 75, 191-231 (1987) Needed Reduction and Spine Strategies for the Lambda Calculus H. P. BARENDREGT* University of Ngmegen, Nijmegen, The Netherlands J. R. KENNAWAY~ University qf East Anglia, Norwich, United Kingdom J. W. KLOP~ Cenfre for Mathematics and Computer Science, Amsterdam, The Netherlands AND M. R. SLEEP+ University of East Anglia, Norwich, United Kingdom A redex R in a lambda-term M is called needed if in every reduction of M to nor- mal form (some residual of) R is contracted. Among others the following results are proved: 1. R is needed in M iff R is contracted in the leftmost reduction path of M. 2. Let W: MO+ M, + Mz --t .._ reduce redexes R,: M, + M,, ,, and have the property that Vi.3j> i.R, is needed in M,. Then W is normalising, i.e., if M, has a normal form, then Ye is finite and terminates at that normal form. 3. Neededness is an undecidable property, but has several efhciently decidable approximations, various versions of the so-called spine redexes. r 1987 Academic Press. Inc. 1. INTRODUCTION A number of practical programming languages are based on some sugared form of the lambda calculus. Early examples are LISP, McCarthy et al. (1961) and ISWIM, Landin (1966). More recent exemplars include ML (Gordon etal., 1981), Miranda (Turner, 1985), and HOPE (Burstall * Partially supported by the Dutch Parallel Reduction Machine project. t Partially supported by the British ALVEY project.
    [Show full text]
  • Typology of Programming Languages E Evaluation Strategy E
    Typology of programming languages e Evaluation strategy E Typology of programming languages Evaluation strategy 1 / 27 Argument passing From a naive point of view (and for strict evaluation), three possible modes: in, out, in-out. But there are different flavors. Val ValConst RefConst Res Ref ValRes Name ALGOL 60 * * Fortran ? ? PL/1 ? ? ALGOL 68 * * Pascal * * C*?? Modula 2 * ? Ada (simple types) * * * Ada (others) ? ? ? ? ? Alphard * * * Typology of programming languages Evaluation strategy 2 / 27 Table of Contents 1 Call by Value 2 Call by Reference 3 Call by Value-Result 4 Call by Name 5 Call by Need 6 Summary 7 Notes on Call-by-sharing Typology of programming languages Evaluation strategy 3 / 27 Call by Value – definition Passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument. def foo(val): val = 1 i = 12 foo(i) print (i) Call by value in Python – output: 12 Typology of programming languages Evaluation strategy 4 / 27 Pros & Cons Safer: variables cannot be accidentally modified Copy: variables are copied into formal parameter even for huge data Evaluation before call: resolution of formal parameters must be done before a call I Left-to-right: Java, Common Lisp, Effeil, C#, Forth I Right-to-left: Caml, Pascal I Unspecified: C, C++, Delphi, , Ruby Typology of programming languages Evaluation strategy 5 / 27 Table of Contents 1 Call by Value 2 Call by Reference 3 Call by Value-Result 4 Call by Name 5 Call by Need 6 Summary 7 Notes on Call-by-sharing Typology of programming languages Evaluation strategy 6 / 27 Call by Reference – definition Passing arguments to a function copies the actual address of an argument into the formal parameter.
    [Show full text]