Modular Object-Oriented Programming with Units and Mixins

Total Page:16

File Type:pdf, Size:1020Kb

Modular Object-Oriented Programming with Units and Mixins Mo dular Ob ject-Oriented Programming with Units and Mixins Rob ert Bruce Findler Matthew Flatt Department of Computer Science Rice University Houston, Texas 77005-1892 class languages follow from a single language design prin- Abstract ciple: specify connectionsbetween modules or classes sepa- Mo dule and class systems haveevolved to meet the demand rately from their de nitions. for reuseable software comp onents. Considerable e ort has The shared principle of separating connections from def- b een invested in developing new mo dule and class systems, initions makes units and mixins synergistic. When units and in demonstrating howeach promotes co de reuse. How- and mixins are combined, a programmer can exploit the en- ever, relatively little has b een said ab out the interaction of capsulation and linking prop erties of units to control the these constructs, and how using mo dules and classes together application of mixin extensions (e.g.,tochange the class can improve programs. In this pap er, we demonstrate the extended by a particular mixin). synergy of a particular form of mo dules and classes|called In Section 5, we motivate in more detail the design b e- units and mixins, resp ectively|for solving complex reuse hind MzScheme's units and mixins, but their synergy is b est problems in a natural manner. demonstrated with an example. The bulk of this pap er therefore presents an in-depth example, showing how the synergy of units and mixins solves an old extensibility prob- 1 Intro duction lem [7, 40] in a natural manner. Section 2 describ es the extensibili ty problem, and Section 3 develops a rough solu- Mo dule and class systems b oth promote co de reuse. In the- tion the problem using conventional classes. Section 4 intro- ory,many uses of classes can b e simulated with mo dules, duces units and mixins to re ne and complete the solution. and viceversa. Exp erience shows, however, that program- Sections 5 and 6 extract lessons from the example for the mers need b oth constructs b ecause they serve di erentpur- design of mo dular ob ject-oriented programming languages. p oses [43]. A mo dule delineates b oundaries for separate de- Finally, Section 7 relates our work to other research. velopment. A class p ermits ne-grained reuse via selective inheritance and overriding. Since mo dules and classes aid di erent patterns of reuse, 2 The Extensibility Problem mo dern languages provide separate constructs for each. Un- fortunately, the reuse allowed byconventional mo dule and The following table summarizes the extensibili ty problem: class systems is limited. In these systems, mo dules and original variants extension classes are hard-wired to a sp eci c context, i.e., to sp eci c z }| { z }| { mo dules or to a sp eci c sup erclass. 2 ; In previous work, we separately describ ed the novel mo d- ( ule and class systems in MzScheme [12]. MzScheme's mo d- original draw draw( 2 ) draw( ) draw( ; ) ules [13], called units , are roughly likeJava packages, ex- op erations cept that units are linked through an external linking sp ec- shrink shrink( 2 ) shrink ( ) shrink ( ; ) n i cation, instead of through a xed internal sp eci cation. extension rotate rotate( 2 ) rotate ( ) rotate ( ; ) MzScheme's ob ject language [14] provides mixins , whichare likeJava classes except that a mixin is parameterized over its sup erclass, so it can b e applied multiple times to create The p ortion of the table contained in the dotted b ox repre- di erent derived classes from di erent base classes. The ad- sents a program comp onentthatprovides several op erations, vantages of units and mixins over conventional mo dule and draw and shrink, on a collection of data, geometric shap es like squares and circles. A programmer may wish to use This researchwas partially supp orted by a Lo dieska Sto ckbridge such a comp onent in three di erentcontexts: Vaughan Fellowship, NSF grants CCR-9619756, CDA-9713032,and CCR-9708957, and a Texas ATP grant. 1. The programmer may wish to include the comp onent as is. 2. The programmer may wish to extend the datatyp e with a variant, rep ositioned shap es, and adapt the col- lection of op erations accordingly. 3. The programmer may wish to add a new op eration, To app ear: ICFP { Sept. 27-29 1998, Baltimore, MD rotate. 1 ? ? ? ? ? ? ? ? ? ? ? Client Client Client Client Client (a) Original Datatyp e (b) New Variant (c) New Op eration Figure 1: Extensible programming on datatyp es Toavoid duplicate maintenance, or b ecause the comp onent 3 Extensible Programming with Classes is acquired in ob ject form, the comp onentmust b e organized Figure 1 outlines our solution to the extensibili ty problem: so that programmers can add b oth new forms of data and new op erations without modifying or recompiling Diagram (a) represents the original comp onent. The rhombus stands for the datatyp e, and the rectangles the original program comp onent, or denote the datatyp e's variants. The oval is a clientof its existing clients. the datatyp e comp onent. Such a program organization dramatically increases the p o- Diagram (b) shows the datatyp e extended with a new tential for software reuse and enables the smo oth integration variant. The extension is contained in the right inner of proprietary mo dules. dashed b ox. The solid b ox on the left represents the Neither standard functional nor ob ject-oriented strate- unmo di ed datatyp e co de from (a). The original client gies o er a satisfactory way to implement the comp onent is also preserved, and a new client of the datatyp e and its clients. In a functional language, the variants can b e exploits the variant extension. implemented as a typ e, with the op erations as functions on Diagram (c) shows extension in the other direction: the typ e. Using this approach, the set of op erations is easily adding a new op eration to the datatyp e. As b efore, extended, but adding a new variant requires mo difying the the extension is implemented by the inner dashed b ox functions. In an ob ject-oriented language, the variants can while the solid b ox represents the unmo di ed existing b e implemented as a collection of classes, with the op era- implementation from (b). The new squares in the ex- tions as metho ds common to all of the classes. Using this tension represent the implementation of the op eration approach, the datatyp e is easily extended with a new vari- for eachvariant. The existing clients have not b een ant, but adding a new op eration is typically implemented mo di ed, although they now refer to the extended vari- by mo difying the classes. ants. The existing literature provides three solutions to the problem. Kuhne's [24] solution, which relies on generic pro- The remainder of this section develops a concrete example, cedures with double-dispa tchin g, can interfere with the hi- an evolving shap e program [11, 23]. Since Figure 1 can b e erarchical structure of the program. Palsb erg and Jay's [32] approximated using conventional classes, we rst use only solution is based on re ection op erators and incurs a sub- language features available in a typical ob ject-oriented lan- stantial run-time p enalty. Krishnamurthi, Felleisen, and guage. But, classes are not enough; Section 4 intro duces Friedman [11, 23] prop ose an ecient solution that works units and mixins to complete the solution. with standard class mechanisms, but it requires the imple- mentation (and maintenance) of a complex programming 3.1 Shap e Datatyp e proto col. All of these solutions are partial b ecause they do not address the reuse of clients. In contrast, the combination Initially, our shap e datatyp e consists of three variants and of units and mixins solves the problem simply and elegantly, one op eration: rectangles, circles, and translated shap es for and it addresses the reuse of b oth the original comp onent drawing. The rectangle and circle variants contain numb ers and its clients. that describ e the dimensions of the shap e. The translated variant consists of twonumbers, and , and another x y 2 (define Shape (interface () draw)) (define BB-Shape (interface (Shape) bounding-box)) (define Rectangle (define BB-Rectangle (class* null (Shape)(width height) (class* Rectangle (BB-Shape)(width height) (public (public [draw (lambda (window x y) :: :)]))) [bounding-box (lambda () (make-object BB 0 0 width height))]) (define Circle (sequence (super-init width height)))) (class* null (Shape)(radius) (public (define BB-Circle [draw (lambda (window x y) :: :))])) (class* Circle (BB-Shape)(radius) (public (define Translated [bounding-box (class* null (Shape)(shape ) (lambda () (make-object BB (- radius)(- radius) x y (public radius radius))]) [draw (lambda (window x y) (sequence (super-init r)))) (send shape draw window (+ x )(+y )))]))) (define BB-Translated x y (class* Translated (BB-Shape)(shape ) x y (public Figure 2: Shap e classes [bounding-box (lambda () :::)]) (sequence (super-init shape )))) x y (define BB-Union (define display-shape (class* Union (BB-Shape)(left right) (lambda (shape) (public (if (not (is-a? shape Shape)) [bounding-box (lambda () :::)]) (error \expected a Shape")) (sequence (super-init left right)))) (let ([window :::]) (send shape draw window 00)))) (define BB (class* null () (left top right bottom) (display-shape (make-object Translated :::)) (make-object Rectangle 50 100) 30 30)) (define display-shape (lambda (shape) Figure 3: Two shap e clients (if (not (is-a? shape BB-Shape)) (error \expected a BB-Shape")) (let*([bb (send shape bounding-box)] [window :::][x :::][y :::]) shap e.
Recommended publications
  • Object-Oriented Programming in Scheme with First-Class Modules
    Ob jectOriented Programming in Scheme with FirstClass Mo dules and Op eratorBased Inheritance Guruduth Banavar Gary Lindstrom Department of Computer Science University of Utah Salt LakeCityUT Abstract Wecharacterize ob jectoriented programming as structuring and manipulating a uniform space of rstclass values representing modules a distillation of the notion of classes Op erators over mo dules individually achieve eects such as encapsulation sharing and static binding A variety of idioms of OO programming nd convenient expression within this mo del including several forms of single and multiple inheritance abstract classes class variables inheritance hierarchy combination and reection Weshow that this programming style simplies OO programming via enhanced uniformity and supp orts a exible mo del of ob jectorientation that provides an attractive alternative to metaprogramming Finallyweshow that these notions of OO programming are language indep endent by implementing a Mo dular Scheme prototyp e as a completion of a generic OO framework for mo dularity Pap er Category Research Topic Area Language design and implementation Intro duction Classbased ob jectoriented programming is usually thought of as creating a graph structured inher itance hierarchy of classes instantiating some of these classes and computing with these instances Instances are typically rstclass values in the language ie they can b e created stored accessed and passed into and out of functions Classes on the other hand are usually not rstclass values and inheritance is
    [Show full text]
  • Mixins and Traits
    ◦ ◦◦◦ TECHNISCHE UNIVERSITAT¨ MUNCHEN¨ ◦◦◦◦ ◦ ◦ ◦◦◦ ◦◦◦◦ ¨ ¨ ◦ ◦◦ FAKULTAT FUR INFORMATIK Programming Languages Mixins and Traits Dr. Michael Petter Winter 2016/17 What advanced techiques are there besides multiple implementation inheritance? Outline Design Problems Cons of Implementation Inheritance 1 Inheritance vs Aggregation 1 2 (De-)Composition Problems Lack of finegrained Control 2 Inappropriate Hierarchies Inheritance in Detail A Focus on Traits 1 A Model for single inheritance 1 2 Inheritance Calculus with Separation of Composition and Inheritance Expressions Modeling 2 3 Modeling Mixins Trait Calculus Mixins in Languages Traits in Languages 1 (Virtual) Extension Methods 1 Simulating Mixins 2 Squeak 2 Native Mixins Reusability ≡ Inheritance? Codesharing in Object Oriented Systems is often inheritance-centric. Inheritance itself comes in different flavours: I single inheritance I multiple inheritance All flavours of inheritance tackle problems of decomposition and composition The Adventure Game Door ShortDoor LockedDoor canPass(Person p) canOpen(Person p) ? ShortLockedDoor canOpen(Person p) canPass(Person p) The Adventure Game Door <interface>Doorlike canPass(Person p) canOpen(Person p) Short canPass(Person p) Locked canOpen(Person p) ShortLockedDoor ! Aggregation & S.-Inheritance Door must explicitely provide canOpen(Person p) chaining canPass(Person p) Doorlike must anticipate wrappers ) Multiple Inheritance X The Wrapper FileStream SocketStream read() read() write() write() ? SynchRW acquireLock() releaseLock() ! Inappropriate Hierarchies
    [Show full text]
  • Declaring Vars in Class Php
    Declaring Vars In Class Php Is Tobe Esculapian or misformed after aluminous Neall plopping so magnanimously? Forrest corresponds prolixly? Forbidden Osmund sometimes pargets any lilliputian yell guardedly. How variable as int, php in using interpolation rather than configured one of people prefer to override whatever information useful whenever you call it leads to expose parts that We daily work with advertisers relevant to our readers. Acceptable in php programmers and retry saving again, declaration must be. Declaring a property but a class is an exact task use one table the keyword public protected or private followed by a normal variable declaration If. If you wrong there holding an IE bug with var a foo only declaring a global for file scope. Your class declaration format is declared protected field? You help also define methods in the class that allow tool to manipulate the values of object properties and perform operations on objects. PHP Class Properties Tutorials by Supun Kavinda. An amazon associate we declare the class in declarations as containers for our clients in the usages of a name given client exits and in? How clean and in declaring a class declaration scope in the vars of that are their parent selector. Using long array syntax array 1 2 3 for declaring arrays is generally. By declaring a class declaration, classes and see for? It turns out some interview situations, every time to magento source and other class names but you have a common occurrence, therefore considered a value. The var keyword in PHP is used to declare the property or variable of class which is primitive by default The var keyword is alike as out when declaring variables or root of a class Note The var keyword was deprecated from version 50.
    [Show full text]
  • Equal Rights for Functional Objects Or, the More Things Change, The
    ACM OOPS Messenger 4,4 (Oct. 1993), 2-27. Equal Rights for Functional Objects1 or, The More Things Change, The More They Are the Same2 Henry G. Baker Nimble Computer Corporation 16231 Meadow Ridge Way, Encino, CA 91436 (818) 986-1436 (818) 986-1360 FAX August, October, 1990, October, 1991, and April, 1992 This work was supported in part by the U.S. Department of Energy Contract No. DE-AC03-88ER80663 We argue that intensional object identity in object-oriented programming languages and databases is best defined operationally by side-effect semantics. A corollary is that "functional" objects have extensional semantics. This model of object identity, which is analogous to the normal forms of relational algebra, provides cleaner semantics for the value-transmission operations and built-in primitive equality predicate of a programming language, and eliminates the confusion surrounding "call-by-value" and "call-by-reference" as well as the confusion of multiple equality predicates. Implementation issues are discussed, and this model is shown to have significant performance advantages in persistent, parallel, distributed and multilingual processing environments. This model also provides insight into the "type equivalence" problem of Algol-68, Pascal and Ada. 1. INTRODUCTION Parallel, distributed and persistent programming languages are leaving the laboratories for more wide-spread use. Due to the substantial differences between the semantics and implementations of these languages and traditional serial programming languages, however, some of the most basic notions of programming languages must be refined to allow efficient, portable implementations. In this paper, we are concerned with defining object identity in parallel, distributed and persistent systems in such a way that the intuitive semantics of serial implementations are transparently preserved.
    [Show full text]
  • Modular Programming with Functions
    CHAPTER 4 MODULAR PROGRAMMING WITH FUNCTIONS Copyright © 2013 Pearson Education, Inc. Modularity •A program may also contain other functions, and it may refer to functions in another file or in a library. These functions , or modules , are sets of statements that perform an operation or compute a value •To maintain simplicity and readability in long and complex programs, we use a short main, and other functions instead of using one long main function. •By separating a solution into a group of modules, each module is easier to understand, thus adhering to the basic guidelines of structured programming Copyright © 2013 Pearson Education, Inc. Modularity •Braking a problem into a set of modules has many advantages: 1. Every module can be written and tested separately from the rest of the program 2. A module is smaller than a complete program, so testing is easier 3. Once a module has been tested, it can be used in new program without having to retest it ( reusability ) 4. Use of modules ( modularity ) usually reduces the overall length of programs 5. Several programmers can work on the same project if it is separated into modules Copyright © 2013 Pearson Education, Inc. Modularity Main Modules Copyright © 2013 Pearson Education, Inc. Function Definition •A function consists of a definition statement followed by declarations and statements. The general form of a function is: return_type function_name(parameter_declarations) { declarations; statements; return expression; } •The parameter declarations represent the information passed to the function •Additional variables used by the function are defined in declarations statement •All functions should include a return statement Copyright © 2013 Pearson Education, Inc.
    [Show full text]
  • Scope in Fortran 90
    Scope in Fortran 90 The scope of objects (variables, named constants, subprograms) within a program is the portion of the program in which the object is visible (can be use and, if it is a variable, modified). It is important to understand the scope of objects not only so that we know where to define an object we wish to use, but also what portion of a program unit is effected when, for example, a variable is changed, and, what errors might occur when using identifiers declared in other program sections. Objects declared in a program unit (a main program section, module, or external subprogram) are visible throughout that program unit, including any internal subprograms it hosts. Such objects are said to be global. Objects are not visible between program units. This is illustrated in Figure 1. Figure 1: The figure shows three program units. Main program unit Main is a host to the internal function F1. The module program unit Mod is a host to internal function F2. The external subroutine Sub hosts internal function F3. Objects declared inside a program unit are global; they are visible anywhere in the program unit including in any internal subprograms that it hosts. Objects in one program unit are not visible in another program unit, for example variable X and function F3 are not visible to the module program unit Mod. Objects in the module Mod can be imported to the main program section via the USE statement, see later in this section. Data declared in an internal subprogram is only visible to that subprogram; i.e.
    [Show full text]
  • A Parallel Program Execution Model Supporting Modular Software Construction
    A Parallel Program Execution Model Supporting Modular Software Construction Jack B. Dennis Laboratory for Computer Science Massachusetts Institute of Technology Cambridge, MA 02139 U.S.A. [email protected] Abstract as a guide for computer system design—follows from basic requirements for supporting modular software construction. A watershed is near in the architecture of computer sys- The fundamental theme of this paper is: tems. There is overwhelming demand for systems that sup- port a universal format for computer programs and software The architecture of computer systems should components so users may benefit from their use on a wide reflect the requirements of the structure of pro- variety of computing platforms. At present this demand is grams. The programming interface provided being met by commodity microprocessors together with stan- should address software engineering issues, in dard operating system interfaces. However, current systems particular, the ability to practice the modular do not offer a standard API (application program interface) construction of software. for parallel programming, and the popular interfaces for parallel computing violate essential principles of modular The positions taken in this presentation are contrary to or component-based software construction. Moreover, mi- much conventional wisdom, so I have included a ques- croprocessor architecture is reaching the limit of what can tion/answer dialog at appropriate places to highlight points be done usefully within the framework of superscalar and of debate. We start with a discussion of the nature and VLIW processor models. The next step is to put several purpose of a program execution model. Our Parallelism processors (or the equivalent) on a single chip.
    [Show full text]
  • Learning Javascript Design Patterns
    Learning JavaScript Design Patterns Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Learning JavaScript Design Patterns by Addy Osmani Copyright © 2012 Addy Osmani. All rights reserved. Revision History for the : 2012-05-01 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449331818 for release details. ISBN: 978-1-449-33181-8 1335906805 Table of Contents Preface ..................................................................... ix 1. Introduction ........................................................... 1 2. What is a Pattern? ...................................................... 3 We already use patterns everyday 4 3. 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three ...................... 7 4. The Structure Of A Design Pattern ......................................... 9 5. Writing Design Patterns ................................................. 11 6. Anti-Patterns ......................................................... 13 7. Categories Of Design Pattern ............................................ 15 Creational Design Patterns 15 Structural Design Patterns 16 Behavioral Design Patterns 16 8. Design Pattern Categorization ........................................... 17 A brief note on classes 17 9. JavaScript Design Patterns .............................................. 21 The Creational Pattern 22 The Constructor Pattern 23 Basic Constructors 23 Constructors With Prototypes 24 The Singleton Pattern 24 The Module Pattern 27 iii Modules 27 Object Literals 27 The Module Pattern
    [Show full text]
  • The Evolution of Lisp
    1 The Evolution of Lisp Guy L. Steele Jr. Richard P. Gabriel Thinking Machines Corporation Lucid, Inc. 245 First Street 707 Laurel Street Cambridge, Massachusetts 02142 Menlo Park, California 94025 Phone: (617) 234-2860 Phone: (415) 329-8400 FAX: (617) 243-4444 FAX: (415) 329-8480 E-mail: [email protected] E-mail: [email protected] Abstract Lisp is the world’s greatest programming language—or so its proponents think. The structure of Lisp makes it easy to extend the language or even to implement entirely new dialects without starting from scratch. Overall, the evolution of Lisp has been guided more by institutional rivalry, one-upsmanship, and the glee born of technical cleverness that is characteristic of the “hacker culture” than by sober assessments of technical requirements. Nevertheless this process has eventually produced both an industrial- strength programming language, messy but powerful, and a technically pure dialect, small but powerful, that is suitable for use by programming-language theoreticians. We pick up where McCarthy’s paper in the first HOPL conference left off. We trace the development chronologically from the era of the PDP-6, through the heyday of Interlisp and MacLisp, past the ascension and decline of special purpose Lisp machines, to the present era of standardization activities. We then examine the technical evolution of a few representative language features, including both some notable successes and some notable failures, that illuminate design issues that distinguish Lisp from other programming languages. We also discuss the use of Lisp as a laboratory for designing other programming languages. We conclude with some reflections on the forces that have driven the evolution of Lisp.
    [Show full text]
  • Mixin-Based Programming in C++1
    Mixin-Based Programming in C++1 Yannis Smaragdakis Don Batory College of Computing Department of Computer Sciences Georgia Institute of Technology The University of Texas at Austin Atlanta, GA 30332 Austin, Texas 78712 [email protected] [email protected] Abstract. Combinations of C++ features, like inheritance, templates, and class nesting, allow for the expression of powerful component patterns. In particular, research has demonstrated that, using C++ mixin classes, one can express lay- ered component-based designs concisely with efficient implementations. In this paper, we discuss pragmatic issues related to component-based programming using C++ mixins. We explain surprising interactions of C++ features and poli- cies that sometimes complicate mixin implementations, while other times enable additional functionality without extra effort. 1 Introduction Large software artifacts are arguably among the most complex products of human intellect. The complexity of software has led to implementation methodologies that divide a problem into manageable parts and compose the parts to form the final prod- uct. Several research efforts have argued that C++ templates (a powerful parameteriza- tion mechanism) can be used to perform this division elegantly. In particular, the work of VanHilst and Notkin [29][30][31] showed how one can implement collaboration-based (or role-based) designs using a certain templatized class pattern, known as a mixin class (or just mixin). Compared to other techniques (e.g., a straightforward use of application frameworks [17]) the VanHilst and Notkin method yields less redundancy and reusable components that reflect the structure of the design. At the same time, unnecessary dynamic binding can be eliminated, result- ing into more efficient implementations.
    [Show full text]
  • The Best of Both Worlds?
    The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge Thesis submitted for the degree of Master in Informatics: Programming and Networks 60 credits Department of Informatics Faculty of mathematics and natural sciences UNIVERSITY OF OSLO Autumn 2019 The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge © 2019 Erik Bugge The Best of Both Worlds? http://www.duo.uio.no/ Printed: Reprosentralen, University of Oslo Abstract Programming paradigms are categories that classify languages based on their features. Each paradigm category contains rules about how the program is built. Comparing programming paradigms and languages is important, because it lets developers make more informed decisions when it comes to choosing the right technology for a system. Making meaningful comparisons between paradigms and languages is challenging, because the subjects of comparison are often so dissimilar that the process is not always straightforward, or does not always yield particularly valuable results. Therefore, multiple avenues of comparison must be explored in order to get meaningful information about the pros and cons of these technologies. This thesis looks at the difference between the object-oriented and functional programming paradigms on a higher level, before delving in detail into a development process that consisted of reimplementing parts of an object- oriented system into functional code. Using results from major comparative studies, exploring high-level differences between the two paradigms’ tools for modular programming and general program decompositions, and looking at the development process described in detail in this thesis in light of the aforementioned findings, a comparison on multiple levels was done.
    [Show full text]
  • Software Quality / Modularity
    Software quality EXTERNAL AND INTERNAL FACTORS External quality factors are properties such as speed or ease of use, whose presence or absence in a software product may be detected by its users. Other qualities applicable to a software product, such as being modular, or readable, are internal factors, perceptible only to computer professionals who have access to the actual software text. In the end, only external factors matter, but the key to achieving these external factors is in the internal ones: for the users to enjoy the visible qualities, the designers and implementers must have applied internal techniques that will ensure the hidden qualities. EXTERNAL FACTORS Correctness: The ability of software products to perform their tasks, as defined by their specification. Correctness is the prime quality. If a system does not do what it is supposed to do, everything else about it — whether it is fast, has a nice user interface¼ — matters little. But this is easier said than done. Even the first step to correctness is already difficult: we must be able to specify the system requirements in a precise form, by itself quite a challenging task. Robustness: The ability of software systems to react appropriately to abnormal conditions. Robustness complements correctness. Correctness addresses the behavior of a system in cases covered by its specification; robustness characterizes what happens outside of that specification. There will always be cases that the specification does not explicitly address. The role of the robustness requirement is to make sure that if such cases do arise, the system does not cause catastrophic events; it should produce appropriate error messages, terminate its execution cleanly, or enter a so-called “graceful degradation” mode.
    [Show full text]