Speciale Evaluering Af Java Til Udvikling Af Indlejrede

Total Page:16

File Type:pdf, Size:1020Kb

Speciale Evaluering Af Java Til Udvikling Af Indlejrede Speciale Teknisk Informationsteknologi / Distribuerede Realtidssystemer Evaluering af Java til udvikling af indlejrede realtidssystemer ved brug af en eksisterende ”Java Optimized Processor” af Jan Egberg Lauritzen Mads Pedersen 12. december 2005 ______________________________ Jan Egberg Lauritzen, studerende ______________________________ ______________________________ Mads Pedersen, studerende Finn Overgaard Hansen, vejleder Evaluering af Java til udvikling af indlejrede realtidssystemer ved brug af en eksisterende JOP Resumé I dette speciale er anvendeligheden af Java til udvikling af indlejrede realtidssystemer evalueret baseret på en ”Java Optimized Processor”-platform (JOP). Processoren er en implementation af en JVM i en FPGA. Evalueringen viser, at Java kan bruges til realtidskritiske applikationer ved at bruge JOP som platform, idet udførslen af et Java-program er deterministisk på denne platform. Der beskrives en proprietær realtidsprofil, der er udviklet til JOP og som er inspireret af Ravenscar-Java. Realtidsapplikationer kan optimeres ved at flytte tidskritiske programdele nærmere hardware ved at ud- nytte fleksibiliteten i JOP, da den er baseret på en FPGA-platform. I specialet gives et eksempel på dette hardware/software co-design, hvor der opnås en betydelig optimering målt i clock cycles brugt på pro- cesseringen. For at undersøge udvikling med JOP er der med succes implementeret en frekvenstæller som eksempel på et hardwarenært realtidssystem. Nøgleord: Indlejrede realtidssystemer, Java, RTSJ, Ravenscar-Java, Java Optimized Processor, JOP, FPGA, VHDL, HW/SW co-design. Abstract English title: Evaluation of Java for developing embedded real-time systems using an existing “Java Optimized Proc- cesor” In this Master Thesis, the usage of Java for developing embedded real-time systems is evaluated based on a “Java Optimized Processor” platform (JOP). The processor is an implementation of a JVM in an FPGA. The evaluation shows that Java is suitable for real-time critical applications using JOP as the platform, because executing a Java program is deterministic on this platform. A proprietary real-time profile developed for JOP and inspired by Ravenscar-Java has been described. Real-time applications can be optimized by moving time critical program parts closer to hardware by using the flexibility in JOP as it is based on a FPGA platform. In the Master Thesis, an example of this hardware/software co-design is made. A noticeable optimization measured in clock cycles used in the processing is achieved. For examining development with JOP, a frequency counter as an example of a hardware close real-time system has been successfully implemented. Key words: Embedded real-time systems, Java, RTSJ, Ravenscar-Java, Java Optimized Processor, JOP, FPGA, VHDL, HW/SW co-design. Jan Egberg Lauritzen og Mads Pedersen Side 1 af 131 Evaluering af Java til udvikling af indlejrede realtidssystemer ved brug af en eksisterende JOP Indholdsfortegnelse Resumé ...................................................................................................................................................... 1 Abstract ..................................................................................................................................................... 1 Indholdsfortegnelse .................................................................................................................................. 2 Forord........................................................................................................................................................ 5 Læsevejledning................................................................................................................................. 5 Ansvarsfordeling............................................................................................................................... 6 Medfølgende CD .............................................................................................................................. 6 1 Introduktion.................................................................................................................................... 7 1.1 Baggrund................................................................................................................................. 7 1.2 Java til indlejrede realtidssystemer ......................................................................................... 7 1.3 Hvorfor JOP? .......................................................................................................................... 8 1.4 Mål med specialet ................................................................................................................... 8 1.5 Fremgangsmåde ...................................................................................................................... 9 1.6 Definitioner........................................................................................................................... 10 1.7 Introduktion til JOP............................................................................................................... 11 1.8 Relateret arbejde ................................................................................................................... 12 1.9 Specialets struktur................................................................................................................. 14 2 Realtidssystemer ........................................................................................................................... 15 1.1. Indledning ............................................................................................................................. 15 2.1 Historie.................................................................................................................................. 15 2.2 Kategorisering af realtid .......................................................................................................15 2.3 Realtid i specialet.................................................................................................................. 16 2.4 Tidsbegreb............................................................................................................................. 16 2.5 Specifikation af realtid.......................................................................................................... 17 2.6 Skedulering ........................................................................................................................... 18 2.6.1 Procesbegreb............................................................................................................ 18 2.6.2 Prioritering af processer og preemption................................................................... 18 2.6.3 Skeduleringsalgoritmer ............................................................................................ 18 2.6.4 Priority inversion ..................................................................................................... 20 2.7 Opsummering mht. JOP........................................................................................................ 21 2.8 Sammenfatning ..................................................................................................................... 22 3 Java og indlejrede realtidssystemer............................................................................................ 23 1.2. Indledning ............................................................................................................................. 23 3.1 Historie og baggrund............................................................................................................. 23 3.2 Java-platformen..................................................................................................................... 23 3.3 Muligheder for eksekvering af Java...................................................................................... 24 3.4 Java til indlejrede systemer................................................................................................... 25 3.5 Java til realtidssystemer ........................................................................................................ 26 3.5.1 Java vs. C/C++ og assembler................................................................................... 26 3.5.2 Java og realtid .......................................................................................................... 26 3.6 Sammenfatning ..................................................................................................................... 30 4 FPGA og VHDL............................................................................................................................ 31 1.3. Indledning ............................................................................................................................. 31 4.1 FPGA .................................................................................................................................... 31 4.1.1 Historie og baggrund................................................................................................ 31 4.1.2 Arkitektur................................................................................................................. 31 Jan Egberg Lauritzen og Mads Pedersen Side 2 af 131 Evaluering af Java til udvikling af indlejrede realtidssystemer ved brug af en eksisterende JOP 4.1.3 Detaljer omkring FPGA-platformene
Recommended publications
  • JCP at Javapolis 2007
    Javapolis News ❙ 14 December 2007 ❙ Nr 5 ❙ Published by Minoc Business Press 54 www.nonillion.com Parleys Want to become a NONILLIONAIRE ? mail us at : [email protected] Building Rich Internet Applications with Flex and JavaFX “There’s a well thought out com- an online environment using Adobe AIR. “Even when you ponent model for Flex”, he said. are offl ine, you still can update data. When the connec- “And there’s a thriving market tion comes back on, the system synchronizes automati- for components out there, both cally.” Open Source and commercial. So there are literally hundreds JavaPolis founder Stephan Janssen was next to explain of components available to how he decided to have Parleys.com rewritten using Flex. use in Flex.” And no, Flex isn’t Parleys.com offers a massive amount of Java talks – from there for fun and games only. JavaPolis, JavaOne and other Java events from all over “There are already a great the world – combining video images with the actual pres- number of business applica- entation slides of the speakers. Janssen programmed the tions running today, all built application for fun at fi rst, but with over 10 TB of streamed with Flex.” Eckel backed up video in just under a year, it’s clear Parleys.com sort of his statement with an ex- started to lead its own life. “The decision to write a new ample of an interface for an version was made six months ago”, he said. “It was still intranet sales application. too early to use JavaFX. And Silverlight? No thanks.” “Some people think Flex Flex allowed him to leverage the Java code of the earlier isn’t the right choice to version of Parleys.com and to resolve the Web 2.0 and make for business applica- AJAX issues he had en- countered while programming tions, because the render- the fi rst version.
    [Show full text]
  • IP Log for Eclipse.Platform Release 4.0, July 2010 Licenses
    IP Log for eclipse.platform Release 4.0, July 2010 Licenses • Eclipse Public License v1.0 Third-Party Code CQ Third-Party Code License Use ICU4J (core and extended ICU4J License (X License, 1065 function) and ICU4J MIT Style) Replacement plug-in Version: 3.6 ICU4J License (X License, 1116 ICU4J Version: 3.4.5.20061213 MIT Style) 1153 JSch 0.1.31 Version: 0.1.31 New BSD license Apache Lucene Version: 1.9.1 243 (Core+Contrib Analyzers Apache License, 2.0 Analysis Src) 257 APT Version: 1 New BSD license Mozilla Public License 1.1 (MPL), MIT Style with No 262 Cairo Version: 1.0.2 Endorsement Clause, Historical Permissive Notice & Disclaimer ICU4J License (X License, 280 ICU4J Version: 3.4 MIT Style) ICU4J License (X License, 281 ICU4J Version: 3.4.3 MIT Style) 293 jsch Version: 0.1.28 New BSD license 308 PNG unload Version: 1 MIT license 1232 Apache Ant Version: 1.7.0 Apache License, 2.0 ICU4J and ICU4J Replacement ICU4J License (X License, 1367 Version: 3.6.1 MIT Style) Olsen time zone data Version: 1368 Public Domain 2007e Work derived from IJG JPEG 1596 IJG License Version: Release 6b,337 unmodified 1826 JSch 0.1.35 New BSD license source & binary ICU4J and ICU4J replacement MIT License with "no unmodified 1919 Version: 3.8.1 edorsement" clause source & binary unmodified 2014 jsch Version: 0.1.37 New BSD license source & binary XHTML DTDs Version: unmodified 2044 W3C Document License Versions 1.0 and 1.1 (PB CQ331) source org.apache.ant Version: 1.6.5 2404 (ATO CQ1013) (using Orbit Apache License, 2.0 CQ2209) org.apache.lucene Version: 1.4.3 2405 (Core Source Only) (ATO Apache License, 2.0 CQ1014) (using Orbit CQ2210) Junit Version: 3.8.2 (ATO 2406 Common Public License 1.0 CQ299) (using Orbit CQ2206) Historical support for Java SSH modified 2410 Applet + Blowfish Version - v.
    [Show full text]
  • Evil Pickles: Dos Attacks Based on Object-Graph Engineering∗
    Evil Pickles: DoS Attacks Based on Object-Graph Engineering∗ Jens Dietrich1, Kamil Jezek2, Shawn Rasheed3, Amjed Tahir4, and Alex Potanin5 1 School of Engineering and Advanced Technology, Massey University Palmerston North, New Zealand [email protected] 2 NTIS – New Technologies for the Information Society Faculty of Applied Sciences, University of West Bohemia Pilsen, Czech Republic [email protected] 3 School of Engineering and Advanced Technology, Massey University Palmerston North, New Zealand [email protected] 4 School of Engineering and Advanced Technology, Massey University Palmerston North, New Zealand [email protected] 5 School of Engineering and Computer Science Victoria University of Wellington, Wellington, New Zealand [email protected] Abstract In recent years, multiple vulnerabilities exploiting the serialisation APIs of various programming languages, including Java, have been discovered. These vulnerabilities can be used to devise in- jection attacks, exploiting the presence of dynamic programming language features like reflection or dynamic proxies. In this paper, we investigate a new type of serialisation-related vulnerabilit- ies for Java that exploit the topology of object graphs constructed from classes of the standard library in a way that deserialisation leads to resource exhaustion, facilitating denial of service attacks. We analyse three such vulnerabilities that can be exploited to exhaust stack memory, heap memory and CPU time. We discuss the language and library design features that enable these vulnerabilities, and investigate whether these vulnerabilities can be ported to C#, Java- Script and Ruby. We present two case studies that demonstrate how the vulnerabilities can be used in attacks on two widely used servers, Jenkins deployed on Tomcat and JBoss.
    [Show full text]
  • Methoden Der Metaprogrammierung Zur Rekonfiguration Von Software
    Lehrstuhl für Realzeit-Computersysteme Methoden der Metaprogrammierung zur Rekonfiguration von Software eingebetteter Systeme Thomas Maier-Komor Vollständiger Abdruck der von der Fakultät für Elektrotechnik und Informationstech- nik der Technischen Universität München zur Erlangung des akademischen Grades eines Doktor-Ingenieurs (Dr.-Ing.) genehmigten Dissertation. Vorsitzender: Univ.-Prof. Dr. sc. techn. (ETH) A. Herkersdorf Prüfer der Dissertation: 1. Univ.-Prof. Dr.-Ing. G. Färber 2. Univ.-Prof. Dr. rer. nat. Dr. rer. nat. habil. U. Baumgarten Die Dissertation wurde am 27.6.2006, bei der Technischen Universität München ein- gereicht und durch die Fakultät für Elektrotechnik und Informationstechnik am 8.12.2006 angenommen. ii Abstract Der Entwurf von Software für eingebettete Systeme wird sowohl durch die Systemum- gebung als auch durch das System selbst stark beeinflusst. Beide Faktoren reduzieren die Wiederverwendbarkeit und die Erweiterbarkeit der Software in erheblichem Maße. Insbesondere können wirtschaftliche Überlegungen mitunter hohe Anforderungen an das Design stellen. Eine Lösung dieser Problematik kann nur mit klar definierten Abstrakti- onsebenen und geeigneten Schnittstellen zur Integration ermöglicht werden. Mit MetaC wird in dieser Arbeit eine Spracherweiterung vorgestellt, die neue Konzepte bietet, um die speziellen Anforderungen querschneidender Strukturen von eingebetteter Software anzusprechen. Insbesondere werden Methoden zur Verbesserung der Wiederver- wendbarkeit, Erweiterbarkeit und Abstraktion von Software für eingebettete
    [Show full text]
  • Design Patterns I Observer, Listener & MVC Design Patterns I - Gliederung
    Design Patterns I Observer, Listener & MVC Design Patterns I - Gliederung - Was sind Design Patterns? - Definition von Design Patterns - Entstehung - Nutzen & Verwendung - MVC - Model, View, Controller - Observer & Listener - JavaFX ActionEvent - Was sind Events? - Event Dispatch Chain - Event Type Hierarchy - MouseListener - KeyListener - Codebeispiel zu Key- & Mouselistener Was sind Design Patterns? Was sind Design Patterns? - Definition Entwurfsmuster (englisch design patterns) sind bewährte Lösungsschablonen für wiederkehrende Entwurfsprobleme [...]. Sie stellen damit eine wiederverwendbare Vorlage zur Problemlösung dar, die in einem bestimmten Zusammenhang einsetzbar ist. (Quelle: Wikipedia, Entwurfsmuster) Was sind Design Patterns? - Entstehung ● Sammlung von Entwurfsmustern von Architekt Christopher Alexander zwischen 1977 und 1979 ● Verwendung in der Software für die Erstellung grafischer Benutzeroberflächen mit Smalltalk von Kent Beck und Ward Cunningham 1987 ● Verbreitung durch Promotion Erich Gammas und schließlich Publikation des Buches Design Patterns – Elements of Reusable Object-Oriented Software zusammen mit Richard Helm, Ralph Johnson, John Vlissides (Gang of Four) 1994 Was sind Design Patterns? - Nutzen & Verwendung ● Vier Elemente eines Design Patterns: 1. Pattern Name 2. Problem 3. Solution 4. Consequences ● Drei Arten von Design Patterns: ○ Creational Patterns (Erzeugungsmuster) ○ Structural Patterns (Strukturmuster) ○ Behavioral Patterns (Verhaltensmuster) MVC - Model View Controller MVC - Definition Model View Controller
    [Show full text]
  • Testing Java with Jython and Pyunit
    Testing Java with Jython and PyUnit André Burgaud 2007-11-25 JUnit, the unit test framework written by Erich Gamma and Kent Beck, is not the only alternative for unit testing in the Java environment. This article provides a simple demonstration on how to use Jython, PyUnit and Ant to unit test a Java project. This article assumes that the reader has some basic knowledge of unit testing, Java, Jython or Python and possibly Apache Ant. For more information about each of those technologies, see section Resources at the end of this article. JyUnit, the companion code for this article, is a rewrite of the unit test example provided with JUnit, MoneyTest. It also includes an Ant file, build.xml, to facilitate the integration and automation of Jython and the unit test process. Requirements - Installation To try JyUnit, you need: • Java 2 SDK, Standard Edition: 1. Download and install the Java Development Kit (JDK), Version 1.4.2 or greater 2. Create an environment variable JAVA_HOME, pointing to the installation path of the JDK. This simplifies the installation of Apache Ant • Apache Ant: 1. Apache Ant is only needed to execute the tests from Ant and to demonstrate the possibilities of Jython integration with Ant. Without Ant, you can perform the tests using scripts .bat for Windows or .sh for UNIX/Linux. 2. Download and install [Apache Ant]((https://ant.apache.org/) 3. Add the directory bin of the ant directory installation to your PATH (For instance: C:\ant\bin, if Ant is installed in C:\ant on Windows) • Jython: 1.
    [Show full text]
  • Comparative Studies of 10 Programming Languages Within 10 Diverse Criteria Revision 1.0
    Comparative Studies of 10 Programming Languages within 10 Diverse Criteria Revision 1.0 Rana Naim∗ Mohammad Fahim Nizam† Concordia University Montreal, Concordia University Montreal, Quebec, Canada Quebec, Canada [email protected] [email protected] Sheetal Hanamasagar‡ Jalal Noureddine§ Concordia University Montreal, Concordia University Montreal, Quebec, Canada Quebec, Canada [email protected] [email protected] Marinela Miladinova¶ Concordia University Montreal, Quebec, Canada [email protected] Abstract This is a survey on the programming languages: C++, JavaScript, AspectJ, C#, Haskell, Java, PHP, Scala, Scheme, and BPEL. Our survey work involves a comparative study of these ten programming languages with respect to the following criteria: secure programming practices, web application development, web service composition, OOP-based abstractions, reflection, aspect orientation, functional programming, declarative programming, batch scripting, and UI prototyping. We study these languages in the context of the above mentioned criteria and the level of support they provide for each one of them. Keywords: programming languages, programming paradigms, language features, language design and implementation 1 Introduction Choosing the best language that would satisfy all requirements for the given problem domain can be a difficult task. Some languages are better suited for specific applications than others. In order to select the proper one for the specific problem domain, one has to know what features it provides to support the requirements. Different languages support different paradigms, provide different abstractions, and have different levels of expressive power. Some are better suited to express algorithms and others are targeting the non-technical users. The question is then what is the best tool for a particular problem.
    [Show full text]
  • Developing Java™ Web Applications
    ECLIPSE WEB TOOLS PLATFORM the eclipse series SERIES EDITORS Erich Gamma ■ Lee Nackman ■ John Wiegand Eclipse is a universal tool platform, an open extensible integrated development envi- ronment (IDE) for anything and nothing in particular. Eclipse represents one of the most exciting initiatives hatched from the world of application development in a long time, and it has the considerable support of the leading companies and organ- izations in the technology sector. Eclipse is gaining widespread acceptance in both the commercial and academic arenas. The Eclipse Series from Addison-Wesley is the definitive series of books dedicated to the Eclipse platform. Books in the series promise to bring you the key technical information you need to analyze Eclipse, high-quality insight into this powerful technology, and the practical advice you need to build tools to support this evolu- tionary Open Source platform. Leading experts Erich Gamma, Lee Nackman, and John Wiegand are the series editors. Titles in the Eclipse Series John Arthorne and Chris Laffra Official Eclipse 3.0 FAQs 0-321-26838-5 Frank Budinsky, David Steinberg, Ed Merks, Ray Ellersick, and Timothy J. Grose Eclipse Modeling Framework 0-131-42542-0 David Carlson Eclipse Distilled 0-321-28815-7 Eric Clayberg and Dan Rubel Eclipse: Building Commercial-Quality Plug-Ins, Second Edition 0-321-42672-X Adrian Colyer,Andy Clement, George Harley, and Matthew Webster Eclipse AspectJ:Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools 0-321-24587-3 Erich Gamma and
    [Show full text]
  • Functional Programming Patterns in Scala and Clojure Write Lean Programs for the JVM
    Early Praise for Functional Programming Patterns This book is an absolute gem and should be required reading for anybody looking to transition from OO to FP. It is an extremely well-built safety rope for those crossing the bridge between two very different worlds. Consider this mandatory reading. ➤ Colin Yates, technical team leader at QFI Consulting, LLP This book sticks to the meat and potatoes of what functional programming can do for the object-oriented JVM programmer. The functional patterns are sectioned in the back of the book separate from the functional replacements of the object-oriented patterns, making the book handy reference material. As a Scala programmer, I even picked up some new tricks along the read. ➤ Justin James, developer with Full Stack Apps This book is good for those who have dabbled a bit in Clojure or Scala but are not really comfortable with it; the ideal audience is seasoned OO programmers looking to adopt a functional style, as it gives those programmers a guide for transitioning away from the patterns they are comfortable with. ➤ Rod Hilton, Java developer and PhD candidate at the University of Colorado Functional Programming Patterns in Scala and Clojure Write Lean Programs for the JVM Michael Bevilacqua-Linn The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals.
    [Show full text]
  • Notices of the American Mathematical Society ABCD Springer.Com
    ISSN 0002-9920 Notices of the American Mathematical Society ABCD springer.com Highlights in Springer’s eBook Collection of the American Mathematical Society August 2009 Volume 56, Number 7 Guido Castelnuovo and Francesco Severi: NEW NEW NEW Two Personalities, Two The objective of this textbook is the Blackjack is among the most popular This second edition of Alexander Soifer’s Letters construction, analysis, and interpreta- casino table games, one where astute How Does One Cut a Triangle? tion of mathematical models to help us choices of playing strategy can create demonstrates how different areas of page 800 understand the world we live in. an advantage for the player. Risk and mathematics can be juxtaposed in the Students and researchers interested in Reward analyzes the game in depth, solution of a given problem. The author mathematical modelling in math- pinpointing not just its optimal employs geometry, algebra, trigono- ematics, physics, engineering and the strategies but also its financial metry, linear algebra, and rings to The Dixmier–Douady applied sciences will find this text useful. performance, in terms of both expected develop a miniature model of cash flow and associated risk. mathematical research. Invariant for Dummies 2009. Approx. 480 p. (Texts in Applied Mathematics, Vol. 56) Hardcover 2009. Approx. 140 p. 23 illus. Hardcover 2nd ed. 2009. XXX, 174 p. 80 illus. Softcover page 809 ISBN 978-0-387-87749-5 7 $69.95 ISBN 978-1-4419-0252-8 7 $49.95 ISBN 978-0-387-74650-0 7 approx. $24.95 For access check with your librarian Waco Meeting page 879 A Primer on Scientific Data Mining in Agriculture Explorations in Monte Programming with Python A.
    [Show full text]
  • Javamod: an Integrated Java Model for Java Software Visualization
    102 Third Program Visualization Workshop JavaMod: An Integrated Java Model for Java Software Visualization Micael Gallego-Carrillo, Francisco Gort´azar-Bellas, J. Angel´ Vel´azquez-Iturbide ViDo Group, Universidad Rey Juan Carlos, Madrid, Spain mgallego, pgortaza, a.velazquez @escet.urjc.es f g 1 Introduction Given the practical importance and complexity of object-oriented programming, there are many software visualization systems (VSs) for these languages. These systems use different forms of visualization to assist in understanding object-oriented applications. In particular, some VSs are designed to visualize programs written in the Java programming language (and they are often implemented in such a language, too). Java is an attractive language for visualization developers, because it is a "comfortable" language and it is simple to build visualizations in Java. In the particular case of Java VSs implemented in Java itself, there is an additional advantage: the Java Virtual Machine provides an interface to debug programs written in Java, namely JPDA (JPDA). This interface avoids the need of using external debuggers or of generating program traces. The former often involves obscure interfaces; the latter requires to introduce additional code within the target program in order to extract information at run-time. Our ultimate goal is to build a infrastructure adequate to the comprehensive, flexible and systematic design of Java visualizations. Many Java VSs have been developed using different Java program representations, for instance, Evolve (Wang, 2002) based on Step (Brown, 2003), Jeliot (Myller, 2004) based on a Java interpreter, and JIVE (Gestwicki and Jayaraman, 2002) based on JPDA. Our proposal provides an architecture to support three models of Java programs: source code, execution and trace.
    [Show full text]
  • Design Patterns Chapter 3
    A Brief Introduction to Design Patterns Jerod Weinman Department of Computer Science Grinnell College [email protected] Contents 1 Introduction 2 2 Creational Design Patterns 4 2.1 Introduction ...................................... 4 2.2 Factory ........................................ 4 2.3 Abstract Factory .................................... 5 2.4 Singleton ....................................... 8 2.5 Builder ........................................ 8 3 Structural Design Patterns 10 3.1 Introduction ...................................... 10 3.2 Adapter Pattern .................................... 10 3.3 Façade ......................................... 11 3.4 Flyweight ....................................... 12 3.5 Proxy ......................................... 13 3.6 Decorator ....................................... 14 4 Behavioral Design Patterns 20 4.1 Introduction ...................................... 20 4.2 Chain of Responsibility ................................ 20 4.3 Observer ........................................ 20 4.4 Visitor ......................................... 22 4.5 State .......................................... 25 1 Chapter 1 Introduction As you have probably experienced by now, writing correct computer programs can sometimes be quite a challenge. Writing the programs is fairly easy, it can be the “correct” part that maybe is a bit hard. One of the prime culprits is the challenge in understanding a great number of complex interactions. We all have probably experienced the crash of some application program
    [Show full text]