Ontology Design Patterns with Applications to Software Measurement

Total Page:16

File Type:pdf, Size:1020Kb

Ontology Design Patterns with Applications to Software Measurement ONTOLOGY DESIGN PATTERNS WITH APPLICATIONS TO SOFTWARE MEASUREMENT A dissertation submitted to Kent State University in partial fulfillment of the requirements for the The degree of Doctor of Philosophy by Mazen S. Al-Zyoud December 2015 © Copyright All right reserved Except previously published material Dissertation wrote by Mazen S. Al-Zyoud B.S., Al al-Bayt University, Jordan, 2003 M.S., Al al-Bayt University, Jordan, 2009 Ph.D., Kent State University, USA, 2015 Approved by _____ Professor Austin Melton __, Chair, Doctoral Dissertation Committee _____ Professor Johnnie Baker ______ _, Members, Doctoral Dissertation Committee _____ Professor Angela Guercio ______. _____ Professor Alan Brandyberry . Professor Jeffrey A. Ciesla ______. Accepted by _____professor Javed I. Khan____ ___, Chair, Department of Computer Science _____Professor James L. Blank_________, Dean, College of Arts and Sciences ii Table of Contents TABLE OF CONTENTS ........................................................................................................... III LIST OF FIGURES .................................................................................................................. VII LIST OF TABLES ...................................................................................................................... IX DEDICATION.............................................................................................................................. X ACKNOWLEDGEMENTS ....................................................................................................... XI ABSTRACT ............................................................................................................................... XII CHAPTER 1 INTRODUCTION ................................................................................................. 1 1.1 GOALS OF THE RESEARCH .................................................................................................... 1 1.2 CONTRIBUTIONS .................................................................................................................. 2 1.3 PUBLICATION NOTES ........................................................................................................... 3 1.4 ORGANIZATION OF THE DISSERTATION ................................................................................ 3 CHAPTER 2 BACKGROUND MATERIAL ON SEMANTIC WEB AND ONTOLOGY DESIGN PATTERNS ................................................................................................................... 5 2.1 INTRODUCTION ABOUT SEMANTIC WEB ................................................................................ 5 2.2 SOFTWARE DESIGN PATTERNS .............................................................................................. 7 2.2.1 Structure of a design pattern in software engineering ................................................ 9 2.2.2 What are the relationships among these patterns? .................................................... 11 2.3 INTRODUCTION ABOUT ONTOLOGY .................................................................................... 11 2.3.1 Importance of ontology ............................................................................................. 12 2.3.2 Ontology languages .................................................................................................. 13 2.3.3 Classifying ontology ................................................................................................. 14 2.3.4 Methodology for development ontology .................................................................. 15 2.3.5 Competency questions .............................................................................................. 16 2.3.6 The web ontology language ...................................................................................... 17 2.3.7 Protégé ...................................................................................................................... 17 iii 2.4 ONTOLOGY ENGINEERING .................................................................................................. 18 2.4.1 Ontology development process ................................................................................. 18 2.5 ONTOLOGY DESIGN PATTERNS ODPS ................................................................................. 20 2.5.1 Ontology design pattern benefits .............................................................................. 21 2.5.2 Classification of ontology design patterns ................................................................ 21 2.5.3 Types of ontology design patterns for semantic web ................................................ 22 2.5.4 Content ontology design patterns (CPs) ................................................................... 24 2.5.5 Architectural ODPs ................................................................................................... 27 CHAPTER 3 A CONTENT ONTOLOGY DESIGN PATTERNS FOR ONTOLOGY IN ACADEMY/UNIVERSITY DOMAIN ..................................................................................... 28 3.1 INTRODUCTION AND MOTIVATION ...................................................................................... 28 3.1.1 Patterns design .......................................................................................................... 29 3.1.2 Conceptual setting ..................................................................................................... 30 3.1.3 Domain space ............................................................................................................ 30 3.1.4 Summary of terms ..................................................................................................... 31 3.2 STEPS TO SUBMIT A CPS IN ODPS PORTAL ......................................................................... 32 3.3 COURSE CONTENT ONTOLOGY DESIGN PATTERN (COURSE CPS) ........................................ 32 3.3.1 Description of the course CPs ................................................................................... 32 3.4 PROFESSOR CONTENT ONTOLOGY DESIGN PATTERN (PROFESSOR CPS) .............................. 41 3.4.1 Description of the professor CPs .............................................................................. 41 3.5 A RECOMMENDED PROCEDURE FOR CREATING A CPS ........................................................ 50 3.6 A RECOMMENDED GUIDELINE FOR SELECTING AN ONTOLOGY DESIGN PATTERN ................ 54 CHAPTER 4 BACKGROUND MATERIAL ON THE SOFTWARE DEVELOPMENT LIFE CYCLE AND SOFTWARE MEASUREMENT ............................................................ 58 4.1 INTRODUCTION TO SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC) ................................... 58 4.2 PHASES OF THE SOFTWARE DEVELOPMENT LIFE CYCLE .................................................... 59 4.3 BENEFITS OF THE SOFTWARE DEVELOPMENT LIFECYCLE PROCESS ..................................... 60 4.4 SOFTWARE DEVELOPMENT LIFE CYCLE MODELS ............................................................... 60 4.4.1 Agile SDLC model ................................................................................................... 61 iv 4.5 INTRODUCTION TO SOFTWARE MEASUREMENT................................................................... 62 4.5.1 Software metrics ....................................................................................................... 63 4.5.2 Classification of software metrics ............................................................................. 65 4.5.3 Software measurement process ................................................................................. 66 CHAPTER 5 AN ONTOLOGY DESIGN PATTERN FOR ONTOLOGY IN SOFTWARE MEASUREMENT ACTIVITY ................................................................................................. 68 5.1 INTRODUCTION AND MOTIVATION ...................................................................................... 68 5.1.1 Patterns design .......................................................................................................... 69 5.1.2 Conceptual setting ..................................................................................................... 70 5.1.3 Domain space ............................................................................................................ 70 5.1.4 Summary of terms ..................................................................................................... 70 5.2 STEPS TO SUBMIT AN ARCHITECTURAL ODPS IN ODPS PORTAL ........................................ 72 5.3 DESCRIPTION OF THE SKELETON MEASUREMENT PROGRAM ARCHITECTURAL ONTOLOGY DESIGN PATTERNS ...................................................................................................................... 72 5.3.1 Case study to use the architectural ontology design pattern ..................................... 81 CHAPTER 6 TOWARD A CORE ONTOLOGY FOR SOFTWARE MEASUREMENTS PLAN ............................................................................................................................................ 84 6.1 INTRODUCTION .................................................................................................................. 84 6.2 SOFTWARE QUALITY METRICS ............................................................................................ 85 6.2.1 The benefit of quality metrics ................................................................................... 86 6.2.2 Standard
Recommended publications
  • The Semantic Web - ISWC 2004
    Lecture Notes in Computer Science 3298 The Semantic Web - ISWC 2004 Third International Semantic Web Conference, Hiroshima, Japan, November 7-11, 2004. Proceedings Bearbeitet von Sheila A. McIlraith, Dimitris Plexousakis, Frank van Harmelen 1. Auflage 2004. Taschenbuch. xxxv, 844 S. Paperback ISBN 978 3 540 23798 3 Format (B x L): 15,5 x 23,5 cm Gewicht: 970 g Weitere Fachgebiete > EDV, Informatik > Datenbanken, Informationssicherheit, Geschäftssoftware > Datenkompression, Dokumentaustauschformate schnell und portofrei erhältlich bei Die Online-Fachbuchhandlung beck-shop.de ist spezialisiert auf Fachbücher, insbesondere Recht, Steuern und Wirtschaft. Im Sortiment finden Sie alle Medien (Bücher, Zeitschriften, CDs, eBooks, etc.) aller Verlage. Ergänzt wird das Programm durch Services wie Neuerscheinungsdienst oder Zusammenstellungen von Büchern zu Sonderpreisen. Der Shop führt mehr als 8 Millionen Produkte. Preface The 3rd International Semantic Web Conference (ISWC 2004) was held Novem- ber 7–11, 2004 in Hiroshima, Japan. If it is true what the proverb says: “Once by accident, twice by habit, three times by tradition,” then this third ISWC did indeed firmly establish a tradition. After the overwhelming interest in last year’s conference at Sanibel Island, Florida, this year’s conference showed that the Semantic Web is not just a one-day wonder, but has established itself firmly on the research agenda. At a time when special interest meetings with a Seman- tic Web theme are springing up at major conferences in numerous areas (ACL, VLDB, ECAI, AAAI, ECML, WWW, to name but a few), the ISWC series has established itself as the primary venue for Semantic Web research. Response to the call for papers for the conference continued to be strong.
    [Show full text]
  • APPLYING MODEL-VIEW-CONTROLLER (MVC) in DESIGN and DEVELOPMENT of INFORMATION SYSTEMS an Example of Smart Assistive Script Breakdown in an E-Business Application
    APPLYING MODEL-VIEW-CONTROLLER (MVC) IN DESIGN AND DEVELOPMENT OF INFORMATION SYSTEMS An Example of Smart Assistive Script Breakdown in an e-Business Application Andreas Holzinger, Karl Heinz Struggl Institute of Information Systems and Computer Media (IICM), TU Graz, Graz, Austria Matjaž Debevc Faculty of Electrical Engineering and Computer Science, University of Maribor, Maribor, Slovenia Keywords: Information Systems, Software Design Patterns, Model-view-controller (MVC), Script Breakdown, Film Production. Abstract: Information systems are supporting professionals in all areas of e-Business. In this paper we concentrate on our experiences in the design and development of information systems for the use in film production processes. Professionals working in this area are neither computer experts, nor interested in spending much time for information systems. Consequently, to provide a useful, useable and enjoyable application the system must be extremely suited to the requirements and demands of those professionals. One of the most important tasks at the beginning of a film production is to break down the movie script into its elements and aspects, and create a solid estimate of production costs based on the resulting breakdown data. Several film production software applications provide interfaces to support this task. However, most attempts suffer from numerous usability deficiencies. As a result, many film producers still use script printouts and textmarkers to highlight script elements, and transfer the data manually into their film management software. This paper presents a novel approach for unobtrusive and efficient script breakdown using a new way of breaking down text into its relevant elements. We demonstrate how the implementation of this interface benefits from employing the Model-View-Controller (MVC) as underlying software design paradigm in terms of both software development confidence and user satisfaction.
    [Show full text]
  • Design Patterns in Ocaml
    Design Patterns in OCaml Antonio Vicente [email protected] Earl Wagner [email protected] Abstract The GOF Design Patterns book is an important piece of any professional programmer's library. These patterns are generally considered to be an indication of good design and development practices. By giving an implementation of these patterns in OCaml we expected to better understand the importance of OCaml's advanced language features and provide other developers with an implementation of these familiar concepts in order to reduce the effort required to learn this language. As in the case of Smalltalk and Scheme+GLOS, OCaml's higher order features allows for simple elegant implementation of some of the patterns while others were much harder due to the OCaml's restrictive type system. 1 Contents 1 Background and Motivation 3 2 Results and Evaluation 3 3 Lessons Learned and Conclusions 4 4 Creational Patterns 5 4.1 Abstract Factory . 5 4.2 Builder . 6 4.3 Factory Method . 6 4.4 Prototype . 7 4.5 Singleton . 8 5 Structural Patterns 8 5.1 Adapter . 8 5.2 Bridge . 8 5.3 Composite . 8 5.4 Decorator . 9 5.5 Facade . 10 5.6 Flyweight . 10 5.7 Proxy . 10 6 Behavior Patterns 11 6.1 Chain of Responsibility . 11 6.2 Command . 12 6.3 Interpreter . 13 6.4 Iterator . 13 6.5 Mediator . 13 6.6 Memento . 13 6.7 Observer . 13 6.8 State . 14 6.9 Strategy . 15 6.10 Template Method . 15 6.11 Visitor . 15 7 References 18 2 1 Background and Motivation Throughout this course we have seen many examples of methodologies and tools that can be used to reduce the burden of working in a software project.
    [Show full text]
  • A Design Pattern Generation Tool
    Project Number: GFP 0801 A DESIGN PATTERN GEN ERATION TOOL A MAJOR QUALIFYING P ROJECT REPORT SUBMITTED TO THE FAC ULTY OF WORCESTER POLYTECHNIC INSTITUTE IN PARTIAL FULFILLME NT OF THE REQUIREMEN TS FOR THE DEGREE OF BACHELOR O F SCIENCE BY CAITLIN VANDYKE APRIL 23, 2009 APPROVED: PROFESSOR GARY POLLICE, ADVISOR 1 ABSTRACT This project determines the feasibility of a tool that, given code, can convert it into equivalent code (e.g. code that performs the same task) in the form of a specified design pattern. The goal is to produce an Eclipse plugin that performs this task with minimal input, such as special tags.. The final edition of this plugin will be released to the Eclipse community. ACKNOWLEGEMENTS This project was completed by Caitlin Vandyke with gratitude to Gary Pollice for his advice and assistance, as well as reference materials and troubleshooting. 2 TABLE OF CONTENTS Abstract ....................................................................................................................................................................................... 2 Acknowlegements ................................................................................................................................................................... 2 Table of Contents ..................................................................................................................................................................... 3 Table of Illustrations .............................................................................................................................................................
    [Show full text]
  • Trombert-Paviot, Alan Rector, Robert Baud, Pieter
    HIMJ: Reviewed articles The development of CCAM: The new French coding system of clinical HIMJ HOME procedures Beatrice Trombert-Paviot, Alan Rector, Robert Baud, Pieter CONTENTS Zanstra, Caroline Martin, Egbert van der Haring, Lucienne Clavel and Jean Marie Rodrigues GUIDELINES Abstract MISSION A new French coding system of clinical procedures, the Classification Commune Des Actes Medicaux (CCAM), has been developed at the turn of the millennium (between 1996 and CONTACT US 2001). Two methodologies were used: a traditional domain- experts consensus method, and an artificial-intelligence-based semantic representation. An economic evaluation of clinical procedures was also undertaken for the rating for fee-for- service payment. We present the methodologies used and stress how the European Union research project, ‘European Consortium, Generalised Architecture for Languages, Encyclopaedias and Nomenclatures in Medicine’ (GALEN), facilitated the sharing and maintaining of consistent medical knowledge. This country case study highlights the significant cost to individual countries in developing their own HIMAA classifications in isolation. It also demonstrates the benefits of Locked Bag 2045 North Ryde, NSW contributing to international efforts such as GALEN that enable Australia 1670 harmonisation, yet still allow for diversity. ABN 54 008 451 910 Key words : Artificial intelligence; coding system; clinical procedures; terminology; GALEN Introduction Following an Act passed in the National Assembly and issued in January 1993, the Ministry
    [Show full text]
  • Design Patterns
    CSE 403: Software Engineering, Winter 2016 courses.cs.washington.edu/courses/cse403/16wi/ Design Patterns Emina Torlak [email protected] Outline • Overview of design patterns • Creational patterns • Structural patterns • Behavioral patterns 2 introoverview of design patterns What is a design pattern? 4 What is a design pattern? • A standard solution to a common programming problem • a design or implementation structure that achieves a particular purpose • a high-level programming idiom 4 What is a design pattern? • A standard solution to a common programming problem • a design or implementation structure that achieves a particular purpose • a high-level programming idiom • A technique for making code more flexible or efficient • reduce coupling among program components • reduce memory overhead 4 What is a design pattern? • A standard solution to a common programming problem • a design or implementation structure that achieves a particular purpose • a high-level programming idiom • A technique for making code more flexible or efficient • reduce coupling among program components • reduce memory overhead • Shorthand for describing program design • a description of connections among program components • the shape of a heap snapshot or object model 4 Why should you care? • You could come up with these solutions on your own … • But you shouldn't have to! • A design pattern is a known solution to a known problem. 5 Types of design patterns • Creational patterns • how objects are instantiated • Structural patterns • how objects / classes can
    [Show full text]
  • Ontologies and the Semantic Web
    Ontologies and the Semantic Web Ian Horrocks <[email protected]> Information Management Group School of Computer Science University of Manchester The Semantic Web Today’s Web • Distributed hypertext/hypermedia • Information accessed via (keyword based) search and browse • Browser tools render information for human consumption What is the Semantic Web? • Web was “invented” by Tim Berners-Lee (amongst others), a physicist working at CERN • His vision of the Web was much more ambitious than the reality of the existing (syntactic) Web: “… a set of connected applications … forming a consistent logical web of data …” “… an extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation …” • This vision of the Web has become known as the Semantic Web Hard Work using “Syntactic Web” Find images of Peter Patel-Schneider, Frank van Harmelen and Alan Rector… Rev. Alan M. Gates, Associate Rector of the Church of the Holy Spirit, Lake Forest, Illinois Impossible (?) using “Syntactic Web” • Complex queries involving background knowledge – Find information about “animals that use sonar but are neither bats nor dolphins” , e.g., Barn Owl • Locating information in data repositories – Travel enquiries – Prices of goods and services – Results of human genome experiments • Finding and using “web services” – Given a DNA sequence, identify its genes, determine the proteins they can produce, and hence the biological processes they control • Delegating complex tasks to web “agents” – Book me a holiday next weekend somewhere warm, not too far away, and where they speak either French or English What is the Problem? Consider a typical web page: • Markup consists of: – rendering information (e.g., font size and colour) – Hyper-links to related content • Semantic content is accessible to humans, but not (easily) to computers… What is the (Proposed) Solution? • Add semantic annotations to web resources Dr.
    [Show full text]
  • Object-Oriented Design Patterns
    Object-Oriented Design Patterns David Janzen EECS 816 Object-Oriented Software Development University of Kansas Outline • Introduction – Design Patterns Overview – Strategy as an Early Example – Motivation for Creating and Using Design Patterns – History of Design Patterns • Gang of Four (GoF) Patterns – Creational Patterns – Structural Patterns – Behavioral Patterns Copyright © 2006 by David S. 2 Janzen. All rights reserved. What are Design Patterns? • In its simplest form, a pattern is a solution to a recurring problem in a given context • Patterns are not created, but discovered or identified • Some patterns will be familiar? – If you’ve been designing and programming for long, you’ve probably seen some of the patterns we will discuss – If you use Java Foundation Classes (Swing), Copyright © 2006 by David S. 3 you have certaJiannzleyn. Aulls rieghdts rsesoervmed.e design patterns Design Patterns Definition1 • Each pattern is a three-part rule, which expresses a relation between – a certain context, – a certain system of forces which occurs repeatedly in that context, and – a certain software configuration which allows these forces to resolve themselves 1. Dick Gabriel, http://hillside.net/patterns/definition.html Copyright © 2006 by David S. 4 Janzen. All rights reserved. A Good Pattern1 • Solves a problem: – Patterns capture solutions, not just abstract principles or strategies. • Is a proven concept: – Patterns capture solutions with a track record, not theories or speculation 1. James O. Coplien, http://hillside.net/patterns/definition.html Copyright © 2006 by David S. 5 Janzen. All rights reserved. A Good Pattern • The solution isn't obvious: – Many problem-solving techniques (such as software design paradigms or methods) try to derive solutions from first principles.
    [Show full text]
  • Knowledge Driven Software and “Fractal Tailoring”: Ontologies in Development Environments for Clinical Systems
    Knowledge Driven Software and “Fractal Tailoring”: Ontologies in development environments for clinical systems Alan RECTOR School of Computer Science, University of Manchester, UK Abstract. Ontologies have been highly successful in applications involving annotation and data fusion. However, ontologies as the core of “Knowledge Driven Architectures” have not achieved the same influence as “Model Driven Architectures”, despite the fact that many biomedical applications require features that seem achievable only via ontological technologies – composition of descriptions, automatic classification and inference, and management of combinatorial explosions in many contexts. Our group adopted Knowledge Driven Architectures based on ontologies to address these problems in the early 1990s. In this paper we discuss first the use cases and requirements and then some of the requirements for more effective use of Knowledge Driven Architectures today: clearer separation of language and formal ontology, integration with contingent knowledge, richer and better distinguished annotations, higher order representations, integration with data models, and improved auxiliary structures to allow easy access and browsing by users. Keywords. Ontology based systems, Model driven architecture, OWL Citation. Rector A; Knowledge driven software and “fractal tailoring”: Ontologies in development environments for clinical systems. 2010; Formal Ontology in Information Systems (FOIS 2010): IOS Press; 17-30. 1. Introduction In the past fifteen years, the notion of “ontology” has gone from being an obscure “O” word to almost a synonym for “good”. Everybody thinks, and is often told, that they need ontologies. At the same time ontologies have, on the one hand, become dissociated from other forms of knowledge representation and, on the other hand, been taken by some to be all of knowledge representation.
    [Show full text]
  • Design Patterns for Developing Dynamically Adaptive
    Design Patterns for Developing Dynamically Adaptive Systems ∗ Andres J. Ramirez and Betty H.C. Cheng Michigan State University 3115 Engineering Building East Lansing, Michigan 48824 {ramir105, chengb}@cse.msu.edu ABSTRACT 1. INTRODUCTION As applications grow in size and complexity, and computing As applications grow in size, complexity, and heterogene- infrastructure continues to evolve, it becomes increasingly ity in response to growing computational needs, it is increas- difficult to build a system that satisfies all requirements and ingly difficult to build a system that satisfies all require- constraints that might arise during its lifetime. As a result, ments and design constraints that it will encounter during there is an increasing need for software to adapt in response its lifetime. Many of these systems are required to run con- to new requirements and environmental conditions after it tinuously, disallowing long downtimes where humans look has been deployed. Due to their high complexity, adaptive for places to modify the code. As a result, it is important programs are generally difficult to specify, design, verify, and to be able to adapt an application’s behavior at run time in validate. In addition, the current lack of reusable design ex- response to changing requirements and environmental condi- pertise that can be leveraged from one adaptive system to tions [21]. IBM proposed autonomic computing [16] to meet another further exacerbates the problem. To address this this need, where a system manages itself based on high-level problem, we studied over thirty adaptation-related research objectives from a systems administrator, thus promoting and project implementations available from the literature self-management and self-reconfiguration.
    [Show full text]
  • Masquerading and Adaptation Design Patterns in Python (Pdf)
    Click to Edit Title Masquerading and Adaptation Click to Edit DesignPresenter P atInformationterns in Python O’Reilly Open Source Convention July 26–30, 2004 Alex Martelli <[email protected]> July 26–30, 2004 Portland, OR STRAKT © 2004 AB Strakt 1 This talk's audience...: "fair" to "excellent" grasp of Python and OO development "none" to "good" grasp of Design Patterns in general want to learn more about: DPs, masquerading, adaptation, DPs for Python, DP/language issues © 2004 AB Strakt 2 STRAKT What we'll cover...: Design Patterns, including "myths and realities" the Holder and Wrapper Python idioms the Adapter DP the Facade DP the Currying DP and Python callback systems the Decorator DP the Protocol Adaptation proposal (PEP 246) ...and, iff time allows...: • the Proxy DP • the Bridge DP © 2004 AB Strakt 3 STRAKT Next up...: Design Patterns, myths and realities Holder and Wrapper Adapter Facade Currying Decorator Protocol Adaptation (PEP 246) Proxy Bridge © 2004 AB Strakt 4 STRAKT Design Patterns rich, thriving subculture of the OO development culture Gamma, Helms, Johnson, Vlissides, "Design Patterns", Addison-Wesley more introductory: Shalloway, Trott, "Design Patterns Explained" (AW) PLoP conferences & books © 2004 AB Strakt 5 STRAKT ...but also... Design Patterns risked becoming a "fad" or "fashion" recently • cause: the usual, futile search for Image has been scaled down. See full-size image. Remove Frame the "silver bullet"...! Back to Results www.avshop.com/productimages/ products/4514-300.jp • 277 x 300 pixels - 8k This image may be subject to copyright. let's not throwBelow the is the imagedesign in its origi nalpat contextterns on the page: www.avshop.com/ catalog/product.html?productid=451 out with the silver bullet! beam allows you to see clearly in the Catalog Quick Order darkest places.
    [Show full text]
  • Design Patterns and Software Engineering Techniques for Java, and How They May Apply to Chisel
    HOW IT IS DONE IN JAVA Design Patterns and Software Engineering Techniques for Java, and how they may apply to Chisel CS 294-88: Declarative Hardware Design Martin Maas, 03/05/2013 Introduction I Java has been very popular language in production use for a long time (especially enterprise applications). I Significant performance overheads (GC, JIT,...), yet people are using it for big, mission-critical applications. I Reason (arguably): Enforces rigorous design methodology; availability of a large set of design patterns and tools. I Many of these should be applicable to Chisel (Scala is fundamentally similar to Java, concepts may carry over). I Much of this will be familiar to you already - this talk is intended to organize the content and create a basis for discussion of how to use these techniques in Chisel. Talk Organization 1. Design Strategies 2. Dependency Injection 3. Testing & Mocking 4. Java Tools Part I: Design Strategies Strategy 1: Use Interfaces whenever feasibly possible I Na¨ıveStrategy: When using a component, refer to it by its class type and create an instance of that class. Foo foo = new Foo(); I Problem #1: What if we suddenly need to use a different implementation (e.g. for testing)? I Aside: Could use inheritance, but this breaks abstraction - ideally, declare all classes that are not specifically designed to be inherited from as final. I Problem #2: What if we have a class that wants to provide multiple functionalities? I For example: Consider some class SignalToImageDSP representing a pipeline stage that takes signal data and produces image data. Strategy 1: Use Interfaces whenever feasibly possible I Use when initializing a pipeline: SignalDSP prevStage= new SignalDSP(); SignalToImageDSP stage= new SignalToImageDSP(prevStage); ImageDSP nextStage= new ImageProc(stage); I Say we decide at some point that we want to use a truncated version of the pipeline, where the image data is approximated without using sensors.
    [Show full text]