A new type of software test, called mutation analysis, is introduced. A method of applying mutation analysis is described, and the design of several existing automated systems for applying mutation analysis to Fortran and Cobol programs is sketched. These systems have been the means for preliminary studies of the efficiency of mutation analysis and of the relationship between mutation and other systematic testing techniques. The results of several experiments to determine the effectiveness of mutation analysis are described, and examples are presented to illustrate the way in which the technique can be used to detect a wide class of errors, including many previously defined and studied in the literature. Finally, a number of empirical studies are suggested, the results of which may add confidence to the outcome of the mutation analysis of a program. This research was supported in part by The US Army Institute for Research in Management Information and Computer Science, ARO Grant No. DAAG29-78-G-0121 and The Office of Naval Research, Grant No. N00014-79-C-0231. School of Information and Computer Science Georgia Institute of Technology Atlanta, Georgia 30332 Department of Computer Science Yale University New Haven, Connecticut 06520 Department of Electrical Engineering and Computer Science University of California, Berkeley Berkeley, California, 94720 1
AN ABSTRACT OF THE PROJECT OF Sumana Mohan for the degree of Master of Science in Computer Science presented on Aug 10, 2009. Title: Indexing Web 2.0 Applications.
In this paper, we describe the how active learning techniques have been successfully applied in a CS 2 course.
The appropriate separation of concerns is a fundamental engineering principle. A concern, for software developers, is that which must be represented by code in a program; by extension, separation of concerns is the ability to represent a single concern in a single appropriate programming language construct. Advanced separation of concerns is a relatively recent technique in software development for dealing with the complexity of systems that contain crosscutting concerns, namely those individual concerns that cut across programs. Aspect-oriented programming (AOP), which is the area of this dissertation, offers a form of advanced separation of concerns in which primary and crosscutting concerns can be separated during problem solving. An aspect gathers into one place a concern that is or would otherwise be scattered throughout an object-oriented program or system. The primary aim of this dissertation—the AOPy project—is to investigate the usefulness of advanced separation of concerns that aspect-oriented programming offers. In other words, the AOPy Project determines whether the potential usefulness of aspect-oriented programming is currently actualized in practice. In determining its current practical usefulness, this dissertation also determines characteristics of and obstacles to usefulness of aspect-orientation in software development. Perhaps the most important contribution to understanding and addressing the problem of complexity in software systems that this dissertation makes is that the AOPy research project establishes a definition of compatibility of aspect-orientation and provides an analysis of sample instances during problem solving that indicate evidence of compatibility between object-orientation and aspect-orientation. Compatibility, as defined by the AOPy Project, exists when aspect-oriented ideas, terminology, and techniques are appropriately employed in the experimental problem-solving session. The primary scientific contribution of this dissertation, therefore, is a narrative description of the actual use of aspect-oriented programming in a series of controlled, problem-solving scenarios. Theories describing the use of aspect-oriented ideas, terminology, and techniques are generated and refined by means of Grounded Theory, a qualitative data analysis technique. Because this dissertation (1) analytically explores areas of compatibility of aspect-orientation with object-orientation and (2) defines areas of compatibility thwarted in practice, this research project can serve as a foundation for the development of aspect-oriented programming-based design methodologies that encourage compatibility and discourage non-compatibility. Therefore, the AOPy Project establishes a foundation for future research in both its methodology and its results and for future software development in practice. By contributing a definition of aspect-oriented compatibility and a framework within which it can be understood, this dissertation fosters the progression toward a seamless use of aspect-orientation between developer and task.
From the Publisher:Discover the basic concepts of object-oriented programming and the elements of object-oriented design. Timothy Budd teaches objects, class methods, inheritance (including multiple inheritance), polymorphism and principles in a language-independent manner, with examples from five different languages: C++, Delphi, Java, Objective-C, and Smalltalk.
(All chapters conclude with "Chapter Summary", "Further Information", "Study Questions", "Exercises", and "Programming Projects".) 1. The Management of Complexity. The Control of Complexity. Abstraction, Information Hiding, and Layering. Division into Parts. Encapsulation and Interchangeability. Interface and Implementation. The Service View. Repetition and Recursion. Composition. Layers of Specialization. Multiple Views. Patterns. 2. Abstract Data Types. What is a Type? Classes. Interfaces and Polymorphism. Abstract Data Types. The Fundamental ADTs. Collection. Bag. Set. Sorted, Comparator and Comparable. Stack, Queue and Deque. FindMin and FindNth. Indexed Collections and Sorting Algorithms. Map. Matrix. 3. Algorithms. Characteristics of Algorithms. Recipes as Algorithms. Analyzing Computer Algorithms. Specification of the Input. Description of the Result. Instruction Precision. Time to Execute. Space Utilization. Recursive Algorithms. 4. Execution-Time Measurement. Algorithmic Analysis and Big-Oh Notation. Execution Time of Programming Constructs. Constant Time. Simple Loops. Nested Loops. While Loops. Function Calls. Summing Algorithmic Execution Times. The Importance of Fast Algorithms. Benchmarking and Actual Execution Times. 5. Increasing Confidence in Correctness. Program Proofs. Invariants. Analyzing Loops. Asserting That the Outcome is Correct. Progress Toward an Objective. Manipulating Unnamed Quantities. Function Calls. Recursive Algorithms. Program Testing. 6. Vectors. The Vector Data Structure. Enumeration. Application-Silly Sentences. Application-Memory Game. Application-Shell Sort. A Visual Vector. 7. Sorting Vectors. Divide and Conquer. Binary Search. Sorted Vectors. Merge Sort. Partitioning. The Pivot Algorithm. Finding the nth Element. Quick Sort. 8. Linked Lists. Varieties of Linked Lists. LISP-Style Lists. The LinkedList Abstraction. Application-Asteroids Game. Application-Infinite-Precision Integers. 9. List Variations. Sorted Lists. Fast Merge. Execution Timings for Merge Operations. Self-Organizing Lists. Skip Lists. 10. Stacks. The Stack ADT. Checking for Balanced Parentheses. Towers of Hanoi, Revisited. A Four-Function Calculator. A Solitaire Program. Implementation of the Stack Abstraction. 11. Deques. A Fractal Snowflake. Depth- and Breadth-First Search. An Implementation: The IndexedDeque. 12. Queues. The Queue ADT. The Caterpillar Game. A Pastry Factory Simulation. Implementation of the Queue Abstraction. A Vector-Based Queue. The Ring Buffer Queue. Piped Input/Output Streams. 13. Trees. Binary Trees. Vector Implementation. Dynamic Memory Implementation. Application-Guess the Animal Game. Tree Traversals. Postorder Tree Traversal. Preorder Tree Traversal. In-Order Tree Traversal. Level-Order Tree Traversal. Euler Tours. Binary Tree Representation of General Trees. 14. Binary Search Trees. The Importance of Balance. AVL Trees. Application-Tree Sort. 15. Priority Queues. The Priority Queue ADT. Heaps. Skew Heaps. Application-Discrete Event-Driven Simulation. A Framework for Simulations. Ice Cream Store Simulation. 16. Hash Tables. Hash Functions. Hash Functions. Hash Functions in the Java Standard Library. Collision Resolution. Hash Table Sorting Algorithms. Counting Sort. Radix Sorting. Open-Address Hashing. The Hashtable Data Type. Application-Ranking Poker Hands. 17. Maps. Example Programs. Silly Sentence Generation, Revisited. An Address Database. A Concordance. An Implementation. Searching Problems and Maps. 18. Sets. Changing a Bag into a Set. Set Union, Intersection, and Differences. Sorted List Sets. Application-A Spelling Checker. The Union-Find Problem. The BitSet Abstraction. Application-Prime Number Sieve. 19. Matrices. Java Matrices. Application-Rain Game. Binary Matrices. Application-The Game of Life. Sparse Vectors. An Application-(Almost) Infinitely Large Hash Tables. Sparse Matrices. Noninteger Keys. 20. Graphs. Adjacency-Matrix Representation. Edge-List Representation. Weighted-Graph Representation. Weighted-Adjacency Matrix. Floyd's Algorithm. Weighted-Edge List Representation. Dijkstra's Algorithm. Other Graph Problems. Topological Sorting. Depth-First Search Spanning Tree. Problem-The Traveling Salesman. Appendix A. Java Syntax. Program Structure. Packages. Import Declarations. Class Declaration. Interface Declaration. Method Declaration. Constructors. Data Field Declaration. Statements. Declaration Statement. Assignment Statement. Procedure Calls. If Statement. Switch Statement. While Statement. For Statement. Return Statement. Throw Statement. Try Statement. Expressions. Literal. Variable. Data Field and Method Access. Operators. Object Creation. Arrays. Files. Appendix B. Import Libraries. Appendix C. Data Structures in the Java Standard Library. Collection. Enumerators and Iterators. Vectors. Lists. Stack, Queue, and Deque. Priority Queue. Binary Search Tree. Hash Tables. Set. Map. Bibliography. Index.
From the Publisher:In C++ for Java Programmers, the student gets an introduction to C++ that enlists their Java programming skills to get them comfortably programming in C++. This title is an appropriate supplement for any upper level course in which students are required to program in C++, or for anyone with experience in Java who is interested in an introduction to C++. The text first walks the Java programmer through features controlled by the Java language but left to the programmer in C++ (e.g., the use of pointers, controlling memory management). It then builds upon their Java experience to teach language features that are slightly different (e.g., the structure of a class definition, polymorphism). Characteristics of C++ that have no correlation in Java are then presented.
Preface I started writing my rst book, on Smalltalk, in 1983. I can distinctly remember thinking that I needed to write quickly, so as to not miss the crest of the Object-Oriented programming wave. Who would have thought that two decades later object-oriented programming would still be going strong. What a long strange trip its been. In the two decades that object-oriented programming has been studied, it has become the dominant programming paradigm. In the process it has changed almost every facet of computer science. And yet I nd that my goal for the third edition of this book has remained unchanged from the rst. It is still my hope to impart to my students, and by extension to my readers, an understanding of object-oriented programming based on general principles, and not speciic to any particular language. Languages come and go in this eld with dizzying rapidity. In the rst edition I discussed Objective-C and Apple's version of Object Pascal, both at that time widely used. Although both languages still exist, neither can at present be considered a dominant language. However, I continue to talk about Objective-C in the third edition, because from a language point of view it has many i n teresting and unique features. Between the rst edition and the third many languages seem to have disappeared such as Actor and Turing, others have come into existence such a s J a va, Eiiel and Self, many existing languages have acquired object extensions such as Common Lisp and Object Perl, and many h a ve burst on to the scene for a short while, then disappeared for example, Sather and Dylan. Then there is Beta, a language that hints at wonderful ideas behind an incomprehensible syntax. Prediction is diicult, particularly about the future. Will languages that are just now appearing, such a s R u b y, h a ve staying power or will they go the way o f Dylan? What about C? It is diicult to imagine that any language with Microsoft behind it will fail to be successful, but stranger things have happened. Personally, I think that C will last because it presents a route for Visual Basic programmers to nally progress to a better language, but that few Java or C++ programmers will migrate to the new language. Time will tell if my p o wers of foresight are better than those of …
Multiparadigm programming languages have been envisioned as a vehicle for constructing large and complex heterogeneous systems, such as a stock market exchange or a telecommunications network. General-purpose multiparadigm languages, as opposed to hybrid multiparadigm languages, embody several prevalent programming paradigms without being motivated by a single problem. One such language is Leda, which embodies the foundational paradigms of imperative, functional, logic, and object-oriented programming. We explore aspects of solving complex problems using Leda, in order to illustrate the benefits of using a multiparadigm language in expressing solutions to complex systems. We claim that general-purpose multiparadigm programming languages like Leda greatly expedite solutions to a variety of complex problems.
A source of great debate among educators is the choice of a programming language in the various computer science courses. In recent years the focus has shifted from features of various programming languages to arguments about the various paradigms that the languages embody. The approach suggested here is to expose students to all of the major paradigms, via the use of a multiparadigm language, as opposed to attempting to identify "the" correct paradigm. In this paper, we first describe the multiparadigm language Leda and its constituent paradigms. We then identify points in the curriculum at which to introduce a multiparadigm language, and some consequences of these choices.
Part 1 Terms, tools and technology: engineering software - responsibility-driven design, programming from reusable components, problem solving heuristics, chapter summary creating software components - classes, streams, chapter summary algorithms - descriptions of behaviour - recipes as algorithms, printing integers, integer exponents, greatest common divisor, chapter summary. Part 2 Analysis, algorithms and abstractions: strings - an example ADT - primitive strings, the string data abstraction, pattern matching, chapter summary classification of collections vectors and component reuse - templates, simple vectors, techniques for software reuse, other vector variations, function templates, chapter summary inheritance - power through polymorphism - static and dynamic types, frameworks and virtual methods, varieties of inheritance, iterators, forms of polymorphism, the slicing problem, chapter summary lists - a dynamic data structure - simple lists, list iterators, application - polynomial arithmetic, ordered lists, self-organizing lists, double ended lsits, other common variations, application - free lists, chapter summary stacks and queues - higher level abstractions - the abstract classes stack and queue, stacks, application - RPN calculator, application - coversion of infix to postfix, queues, application - breadth first search, application - a framework for backtracking, chapter summary trees - a nonlinear data structure - binary trees, operator precedence parsing, tree traversals, binary tree representation of general trees, chapter summary searching - divide and conquer, binary search, ordered vectors, binary search trees, AVL trees, application - tree sort, finding the Nth largest, chapter summary priority queues - heaps, skew heaps, application - discrete event-driven simulation, chapter summary hash tables - collision resolution using buckets, asymptotic analysis of hash table operations, hash table iterators, application - bucket sorting, hash functions, chapter summary sets and bags - unordered collections - set operations, bit vector sets, the abstract set operations, building sets from hash tables, chapter summary dictionaries and tables - associations, dictionaries as lists of associations, ordered dictionaries, dictionaries as hash tables, chapter summary graphs - adjacency matrix representation, edge list representation, weighted adjacency matrix, labelled edge list representation, finite automata, chapter summary files - external collections.
Offering an alternative approach to multiparadigm programming concepts, this work presents four major language paradigms - imperative, object-oriented, functional and logical - through a new, common language called Leda. It: introduces important emerging topic multiparadigm programming - a concept that could be characterized as the best of programming languages; provides a coherent basis for comparing multiple paradigms in a common framework through a single language; and gives both a technical overview and summaries on important topics in programming-language development.
Although standard tools have been used for lexical and syntactic analysis since the late 1970''s, no standard tools exist for the remaining parts of a compiler. Part of the reason for this deficiency is due to the difficulty of producing elegant tools capable of handling the large amount of variation involved in the compiling process. The Object-oriented Compiler Support toolkit is a suite of reusable software components designed to assist the compiler writer with symbol management, type checking, intermediate representation construction, optimization, and code generation. A collection of C++ classes defines a common interface to these tools. Variations in implementation are encapsulated in separately compiled modules that are selected and linked into the resulting compiler.
Compiler implementation is a difficult and intricate programming problem, due to the diversity of subproblems that must be solved. The compiler writer is faced with the challange of expressing solutions to these subproblems in some implementation language. With the advent of multiparadigm programming languages, diverse problem solving strategies and approaches can coexist within a single linguistic framework. The multiparadigm language Leda allows access to the imperative, logic, functional, and object-oriented paradigms within one programming language. Here we describe the experience of implementing a compiler in Leda, and examine how access to several paradigms affected our implementation.
CLEDA is a new programming language descended from the multiparadigm, strongly typed, compiled programming language LEDA. In addition to the four paradigms supported by LEDA, which are imperative, functional, object-oriented, and relational, CLEDA supports the constraint logic programming paradigm. CLEDA is intended to be used to write applications that involve constrained search problems. Constructs provided to support constraint logic programming include: * Built-in inference engine All Boolean expressions are "predicated" in the logic programming sense. Built-in operators "&" and "I" support left-most depth first search and automatic backtracking. Logical expressions can be used in any programming paradigms. * User definable constraint solver Constrained variables of a domain are represented in terms of objects of the corresponding class. Operations and predicated for the domain are written as methods of the class. To restore the necessary information upon backtracking, CLEDA introduces a new built-in operator "-", This operator is similar to the assignment operator ":=", but saves the necessary information to be recovered when backtracking occurs. This paper describes the design and implementation of the language CLEDA.