Component-Based Software Recommended Reading DF14900 Software Engineering CUGS

Total Page:16

File Type:pdf, Size:1020Kb

Component-Based Software Recommended Reading DF14900 Software Engineering CUGS TDDD05 Component-Based Software Recommended Reading DF14900 Software Engineering CUGS Szyperski: Component Software – Beyond Object-Oriented nd Component-based Software Programming, 2 edition. Addison-Wesley, 2002. Douglas McIlroy. Mass-produced software components. http://cm.bell-labs.com/cm/cs/who/doug/components.txt Introduction and overview in: P. Naur and B. Randell, "Software Engineering, Report on a Christoph Kessler conference sponsored by the NATO Science Committee, Garmisch, Germany, 7th to 11th October 1968", Scientific Affairs Division, NATO, Brussels, 1969, 138-155. Christoph Kessler, IDA, Linköpings universitet, 2010. C. Kessler, IDA, Linköpings universitet. 1.2 TDDD05 / DF14900 Motivation for Component Based Mass-produced Software Components Development Managing system complexity: Garmisch 1968, NATO conference on software engineering Divide-and-conquer (Alexander the Great) McIlroy: Well known in other disciplines Mechanical engineering (e.g., German DIN 2221; IEEE standards) Every ripe industry is based on components, since these Electrical engineering allow to manage large systems Architecture Computer architecture Components should be produced in masses and composed to systems afterwards Outsourcing to component producers Goal: Reuse of partial solutions Easy configurability of the systems Variants, versions, product families C. Kessler, IDA, Linköpings universitet. 1.3 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.4 TDDD05 / DF14900 Mass-produced Software Components Mass-produced Software Components Later McIlroy was with Bell Labs ... InIn the the phrase phrase ` mass`mass production production techniques techniques,',' my my emphasis emphasis is is on on `techniques' and not on mass production plain. `techniques' and not on mass production plain. ... and invented pipes, diff, join, echo (UNIX). OfOf course, course, mass mass production, production, in in the the sense sense of of limitless limitless replication replication ofof a a prototype, prototype, is is trivial trivial for for software. software. Pipes are still today the most employed component system! ButBut certain certain ideas ideas from from industrial industrial technique technique I Iclaim claim are are relevant. relevant. -- The The idea idea of of subassemblies subassemblies carries carries over over directly directly and and is is well well exploited. exploited. - The idea of interchangeable parts corresponds roughly to our term - The idea of interchangeable parts corresponds roughly to our term Where are we today? `modularity,'`modularity,' and and is is fitfully fitfully respected. respected. -- The The idea idea of of machine machine tools tools has has an an analogue analogue in in assembly assembly programs programs andand compilers. compilers. YetYet this this fragile fragile analogy analogy is is belied belied when when we we seek seek forfor analogues analogues of of other other tangible tangible symbols symbols of of mass mass production. production. -- There There do do not not exist exist manufacturers manufacturers of of standard standard parts, parts, muchmuch less less catalogues catalogues of of standard standard parts. parts. -- One One may may not not order order parts parts to to individual individual specifications specifications of of size, size, ruggedness,ruggedness, speed, speed, capacity, capacity, precision precision or or character character set. set. C. Kessler, IDA, Linköpings universitet. 1.5 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.6 TDDD05 / DF14900 Real Component Systems Definition of “Component” Lego “A software component is a unit of composition with contractually specified interfaces and Square stones explicit context dependencies only. A software component Building plans can be deployed independently and is subject to composition by third parties.” IC‘s - C. Szyperski, ECOOP Workshop WCOP 1997. Hardware bus How do they differ from software? C. Kessler, IDA, Linköpings universitet. 1.7 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.8 TDDD05 / DF14900 More Definitions of “Component” (cont.) More Definitions of “Component” “A reusable software component is a logically cohesive, loosely coupled Heineman / Councill [Ch.1]: module that denotes a single abstraction” “A software component is a software element MetaGroup (OpenDoc): -Grady Booch that conforms to a component model “Software components are defined as prefabricated, and can be independently deployed and composed pretested, self-contained, reusable software modules without modification according to a composition standard. bundles of data and procedures - that perform specific functions.” A component model defines specific interaction and “A software component is a static abstraction with plugs.” composition standards. -Nierstrasz/Dami Sametinger: Composition is the combination of two or more software “Reusable software components are self-contained, components yielding a new component behavior at a different clearly identifyable pieces that describe and/or perform level of abstraction ... [which is] determined by the components specific functions, have clear interfaces, being combined and the way how they are combined.” appropriate documentation, and a defined reuse status.” C. Kessler, IDA, Linköpings universitet. 1.9 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.10 TDDD05 / DF14900 Are Objects Components?? Component as unit of composition Szyperski [CS 4.1]: No! U. Assmann (2003): An object is a unit of instantiation. A component is a container with It has a unique identity. variation points It may have state, and this can be (externally) observed extension points It encapsulates its state and behavior. that are adapted during composition Components are rather prototypes / blueprints / plans from which (stateful) objects can be instantiated A component is a reusable unit for composition e.g., a function definition, type definition, class or set of classes A component underlies a component model No (externally observable) state Only one copy required per context (e.g., process) abstraction level Unit of independent deployment composition time (static or runtime?) Unit of third-party composition C. Kessler, IDA, Linköpings universitet. 1.11 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.12 TDDD05 / DF14900 Component Systems (Component Platforms) Software Composition Systems A composition system has We call a technology in which component-based systems can be produced a component system or component platform. A component system has Component Model Composition Technique Component Model Composition Technique CompositionComposition for description of forfor compositions compositions of of LanguageLanguage for description of components componentscomponents components forfor programming-in-the- programming-in-the- largelarge andand architecture architecture C. Kessler, IDA, Linköpings universitet. 1.13 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.14 TDDD05 / DF14900 Issues in Component/Composition Systems The Ladder of Component and Composition Systems Component Model Software Compo- How do components look like? Aspect Systems View Systems sition Systems Secrets? (Location, lifetime, language, platform, …)? Aspect Separation Composition Composition Binding points, binding time? Operators Language Aspect-J COMPOST Interfaces, contracts, substitutability? Architecture as Aspect Darwin, CoSy, Parameterizability? Adaptability? Extensibility? Architecture Systems UNICON, BPEL Standardization of execution environment, services? Web Services Uniformly Interoperable SOAP, Composition Technique Standard Components WSDL How are components glued together, composed, merged, applied? Classical Standard Components .NET CORBA Component Systems Beans EJB Composition time (Compile- / Link- / Deployment- / Connection- / Run-time ...) Objects as Object-Oriented Systems C++ Java Run-Time Components Composition Language How are compositions of large systems described and managed? Modular Systems Modules as Compile- Modula Ada-85 Time Components C. Kessler, IDA, Linköpings universitet. 1.15 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.16 TDDD05 / DF14900 The Essence of the 60s-90s: Blackbox Composition LEGO Software Procedural systems Modular systems Components Object-oriented technology Component-based programming with COTS (Components-off-the-shelf) systems Connectors Component-based CORBA, EJB, DCOM, COM+, .NET applications Software architecture description languages Composition recipe Blackbox composition C. Kessler, IDA, Linköpings universitet. 1.17 TDDD05 / DF14900 C. Kessler, IDA, Linköpings universitet. 1.18 TDDD05 / DF14900 Procedural Systems Procedures as Composition System Caller Fortran, Algol, Pascal, C, ... (code) The procedure is the Linker Component Model Composition Technique component Content: binary code with symbols Connection by linking object files Callee (code) Binding points: linker symbols Program transformation on object files The activation record the procedures (with parameters) and Composition time: link-time, static instantiation global variables Run-time stack contents Component model is supported Callee- by almost all processors AR directly Caller AR addr. Return address Caller- Caller- Caller- JumpSubroutine instruction AR AR AR Composition Language Return instruction call ret C. Kessler, IDA, Linköpings universitet. 1.19 Run time TDDD05 / DF14900 C. Kessler, IDA,
Recommended publications
  • Why Untyped Nonground Metaprogramming Is Not (Much Of) a Problem
    NORTH- HOLLAND WHY UNTYPED NONGROUND METAPROGRAMMING IS NOT (MUCH OF) A PROBLEM BERN MARTENS* and DANNY DE SCHREYE+ D We study a semantics for untyped, vanilla metaprograms, using the non- ground representation for object level variables. We introduce the notion of language independence, which generalizes range restriction. We show that the vanilla metaprogram associated with a stratified normal oljjctct program is weakly stratified. For language independent, stratified normal object programs, we prove that there is a natural one-to-one correspon- dence between atoms p(tl, . , tr) in the perfect Herbrand model of t,he object program and solve(p(tl, , tT)) atoms in the weakly perfect Her\) and model of the associated vanilla metaprogram. Thus, for this class of programs, the weakly perfect, Herbrand model provides a sensible SC mantics for the metaprogram. We show that this result generalizes to nonlanguage independent programs in the context of an extended Hcr- brand semantics, designed to closely mirror the operational behavior of logic programs. Moreover, we also consider a number of interesting exterl- sions and/or variants of the basic vanilla metainterpreter. For instance. WC demonstrate how our approach provides a sensible semantics for a limit4 form of amalgamation. a “Partly supported by the Belgian National Fund for Scientific Research, partly by ESPRlT BRA COMPULOG II, Contract 6810, and partly by GOA “Non-Standard Applications of Ab- stract Interpretation,” Belgium. TResearch Associate of the Belgian National Fund for Scientific Research Address correspondence to Bern Martens and Danny De Schreye, Department of Computer Science, Katholieke Universiteit Leuven, Celestijnenlaan 200A. B-3001 Hevrrlee Belgium E-mail- {bern, dannyd}@cs.kuleuven.ac.be.
    [Show full text]
  • Practical Reflection and Metaprogramming for Dependent
    Practical Reflection and Metaprogramming for Dependent Types David Raymond Christiansen Advisor: Peter Sestoft Submitted: November 2, 2015 i Abstract Embedded domain-specific languages are special-purpose pro- gramming languages that are implemented within existing general- purpose programming languages. Dependent type systems allow strong invariants to be encoded in representations of domain-specific languages, but it can also make it difficult to program in these em- bedded languages. Interpreters and compilers must always take these invariants into account at each stage, and authors of embedded languages must work hard to relieve users of the burden of proving these properties. Idris is a dependently typed functional programming language whose semantics are given by elaboration to a core dependent type theory through a tactic language. This dissertation introduces elabo- rator reflection, in which the core operators of the elaborator are real- ized as a type of computations that are executed during the elab- oration process of Idris itself, along with a rich API for reflection. Elaborator reflection allows domain-specific languages to be imple- mented using the same elaboration technology as Idris itself, and it gives them additional means of interacting with native Idris code. It also allows Idris to be used as its own metalanguage, making it into a programmable programming language and allowing code re-use across all three stages: elaboration, type checking, and execution. Beyond elaborator reflection, other forms of compile-time reflec- tion have proven useful for embedded languages. This dissertation also describes error reflection, in which Idris code can rewrite DSL er- ror messages before presenting domain-specific messages to users, as well as a means for integrating quasiquotation into a tactic-based elaborator so that high-level syntax can be used for low-level reflected terms.
    [Show full text]
  • Metaprogramming with Julia
    Metaprogramming with Julia https://szufel.pl Programmers effort vs execution speed Octave R Python Matlab time, time, log scale - C JavaScript Java Go Julia C rozmiar kodu Sourcewego w KB Source: http://www.oceanographerschoice.com/2016/03/the-julia-language-is-the-way-of-the-future/ 2 Metaprogramming „Metaprogramming is a programming technique in which computer programs have the ability to treat other programs as their data. It means that a program can be designed to read, generate, analyze or transform other programs, and even modify itself while running.” (source: Wikipedia) julia> code = Meta.parse("x=5") :(x = 5) julia> dump(code) Expr head: Symbol = args: Array{Any}((2,)) 1: Symbol x 2: Int64 5 3 Metaprogramming (cont.) julia> code = Meta.parse("x=5") :(x = 5) julia> dump(code) Expr head: Symbol = args: Array{Any}((2,)) 1: Symbol x 2: Int64 5 julia> eval(code) 5 julia> x 5 4 Julia Compiler system not quite accurate picture... Source: https://www.researchgate.net/ publication/301876510_High- 5 level_GPU_programming_in_Julia Example 1. Select a field from an object function getValueOfA(x) return x.a end function getValueOf(x, name::String) return getproperty(x, Symbol(name)) end function getValueOf2(name::String) field = Symbol(name) code = quote (obj) -> obj.$field end return eval(code) end function getValueOf3(name::String) return eval(Meta.parse("obj -> obj.$name")) end 6 Let’s test using BenchmarkTools struct MyStruct a b end x = MyStruct(5,6) @btime getValueOfA($x) @btime getValueOf($x,"a") const getVal2 = getValueOf2("a") @btime
    [Show full text]
  • A Foundation for Trait-Based Metaprogramming
    A foundation for trait-based metaprogramming John Reppy Aaron Turon University of Chicago {jhr, adrassi}@cs.uchicago.edu Abstract We present a calculus, based on the Fisher-Reppy polymorphic Scharli¨ et al. introduced traits as reusable units of behavior inde- trait calculus [FR03], with support for trait privacy, hiding and deep pendent of the inheritance hierarchy. Despite their relative simplic- renaming of trait methods, and a more granular trait typing. Our ity, traits offer a surprisingly rich calculus. Trait calculi typically in- calculus is more expressive (it provides new forms of conflict- clude operations for resolving conflicts when composing two traits. resolution) and more flexible (it allows after-the-fact renaming) In the existing work on traits, these operations (method exclusion than the previous work. Traits provide a useful mechanism for shar- and aliasing) are shallow, i.e., they have no effect on the body of the ing code between otherwise unrelated classes. By adding deep re- other methods in the trait. In this paper, we present a new trait sys- naming, our trait calculus supports sharing code between methods. tem, based on the Fisher-Reppy trait calculus, that adds deep oper- For example, the JAVA notion of synchronized methods can im- ations (method hiding and renaming) to support conflict resolution. plemented as a trait in our system and can be applied to multiple The proposed operations are deep in the sense that they preserve methods in the same class to produce synchronized versions. We any existing connections between the affected method and the other term this new use of traits trait-based metaprogramming.
    [Show full text]
  • Metaprogramming in .NET by Kevin Hazzard Jason Bock
    S AMPLE CHAPTER in .NET Kevin Hazzard Jason Bock FOREWORD BY Rockford Lhotka MANNING Metaprogramming in .NET by Kevin Hazzard Jason Bock Chapter 1 Copyright 2013 Manning Publications brief contents PART 1DEMYSTIFYING METAPROGRAMMING ..............................1 1 ■ Metaprogramming concepts 3 2 ■ Exploring code and metadata with reflection 41 PART 2TECHNIQUES FOR GENERATING CODE ..........................63 3 ■ The Text Template Transformation Toolkit (T4) 65 4 ■ Generating code with the CodeDOM 101 5 ■ Generating code with Reflection.Emit 139 6 ■ Generating code with expressions 171 7 ■ Generating code with IL rewriting 199 PART 3LANGUAGES AND TOOLS ............................................221 8 ■ The Dynamic Language Runtime 223 9 ■ Languages and tools 267 10 ■ Managing the .NET Compiler 287 v Metaprogramming concepts In this chapter ■ Defining metaprogramming ■ Exploring examples of metaprogramming The basic principles of object-oriented programming (OOP) are understood by most software developers these days. For example, you probably understand how encapsulation and implementation-hiding can increase the cohesion of classes. Languages like C# and Visual Basic are excellent for creating so-called coarsely grained types because they expose simple features for grouping and hiding both code and data. You can use cohesive types to raise the abstraction level across a system, which allows for loose coupling to occur. Systems that enjoy loose cou- pling at the top level are much easier to maintain because each subsystem isn’t as dependent on the others as they could be in a poor design. Those benefits are realized at the lower levels, too, typically through lowered complexity and greater reusability of classes. In figure 1.1, which of the two systems depicted would likely be easier to modify? Without knowing what the gray circles represent, most developers would pick the diagram on the right as the better one.
    [Show full text]
  • A Fast, Verified, Cross-Platform Cryptographic Provider
    EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider Jonathan Protzenko∗, Bryan Parnoz, Aymeric Fromherzz, Chris Hawblitzel∗, Marina Polubelovay, Karthikeyan Bhargavany Benjamin Beurdouchey, Joonwon Choi∗x, Antoine Delignat-Lavaud∗,Cedric´ Fournet∗, Natalia Kulatovay, Tahina Ramananandro∗, Aseem Rastogi∗, Nikhil Swamy∗, Christoph M. Wintersteiger∗, Santiago Zanella-Beguelin∗ ∗Microsoft Research zCarnegie Mellon University yInria xMIT Abstract—We present EverCrypt: a comprehensive collection prone (due in part to Intel and AMD reporting CPU features of verified, high-performance cryptographic functionalities avail- inconsistently [78]), with various cryptographic providers able via a carefully designed API. The API provably supports invoking illegal instructions on specific platforms [74], leading agility (choosing between multiple algorithms for the same functionality) and multiplexing (choosing between multiple im- to killed processes and even crashing kernels. plementations of the same algorithm). Through abstraction and Since a cryptographic provider is the linchpin of most zero-cost generic programming, we show how agility can simplify security-sensitive applications, its correctness and security are verification without sacrificing performance, and we demonstrate crucial. However, for most applications (e.g., TLS, cryptocur- how C and assembly can be composed and verified against rencies, or disk encryption), the provider is also on the critical shared specifications. We substantiate the effectiveness of these techniques with
    [Show full text]
  • Specialising Dynamic Techniques for Implementing the Ruby Programming Language
    SPECIALISING DYNAMIC TECHNIQUES FOR IMPLEMENTING THE RUBY PROGRAMMING LANGUAGE A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Engineering and Physical Sciences 2015 By Chris Seaton School of Computer Science This published copy of the thesis contains a couple of minor typographical corrections from the version deposited in the University of Manchester Library. [email protected] chrisseaton.com/phd 2 Contents List of Listings7 List of Tables9 List of Figures 11 Abstract 15 Declaration 17 Copyright 19 Acknowledgements 21 1 Introduction 23 1.1 Dynamic Programming Languages.................. 23 1.2 Idiomatic Ruby............................ 25 1.3 Research Questions.......................... 27 1.4 Implementation Work......................... 27 1.5 Contributions............................. 28 1.6 Publications.............................. 29 1.7 Thesis Structure............................ 31 2 Characteristics of Dynamic Languages 35 2.1 Ruby.................................. 35 2.2 Ruby on Rails............................. 36 2.3 Case Study: Idiomatic Ruby..................... 37 2.4 Summary............................... 49 3 3 Implementation of Dynamic Languages 51 3.1 Foundational Techniques....................... 51 3.2 Applied Techniques.......................... 59 3.3 Implementations of Ruby....................... 65 3.4 Parallelism and Concurrency..................... 72 3.5 Summary............................... 73 4 Evaluation Methodology 75 4.1 Evaluation Philosophy
    [Show full text]
  • An Overview of Feature-Oriented Software Development
    Vol. 8, No. 4, July{August 2009 An Overview of Feature-Oriented Software Development Sven Apel, Department of Informatics and Mathematics, University of Passau, Germany Christian K¨astner, School of Computer Science, University of Magdeburg, Germany Feature-oriented software development (FOSD) is a paradigm for the construction, customization, and synthesis of large-scale software systems. In this survey, we give an overview and a personal perspective on the roots of FOSD, connections to other software development paradigms, and recent developments in this field. Our aim is to point to connections between different lines of research and to identify open issues. 1 INTRODUCTION Feature-oriented software development (FOSD) is a paradigm for the construction, customization, and synthesis of large-scale software systems. The concept of a fea- ture is at the heart of FOSD. A feature is a unit of functionality of a software system that satisfies a requirement, represents a design decision, and provides a potential configuration option. The basic idea of FOSD is to decompose a software system in terms of the features it provides. The goal of the decomposition is to construct well-structured software that can be tailored to the needs of the user and the appli- cation scenario. Typically, from a set of features, many different software systems can be generated that share common features and differ in other features. The set of software systems generated from a set of features is also called a software product line [45,101]. FOSD aims essentially at three properties: structure, reuse, and variation. De- velopers use the concept of a feature to structure design and code of a software system, features are the primary units of reuse in FOSD, and the variants of a software system vary in the features they provide.
    [Show full text]
  • Python 3 Metaprogramming Requirements
    Python 3 Metaprogramming David Beazley @dabeaz http://www.dabeaz.com Presented at PyCon'2013, Santa Clara, CA March 14, 2013 Copyright (C) 2013, http://www.dabeaz.com 1 Requirements • Python 3.3 or more recent • Don't even attempt on any earlier version • Support files: http://www.dabeaz.com/py3meta Copyright (C) 2013, http://www.dabeaz.com 2 Welcome! • An advanced tutorial on two topics • Python 3 • Metaprogramming • Honestly, can you have too much of either? • No! Copyright (C) 2013, http://www.dabeaz.com 3 Metaprogramming • In a nutshell: code that manipulates code • Common examples: • Decorators • Metaclasses • Descriptors • Essentially, it's doing things with code Copyright (C) 2013, http://www.dabeaz.com 4 Why Would You Care? • Extensively used in frameworks and libraries • Better understanding of how Python works • It's fun • It solves a practical problem Copyright (C) 2013, http://www.dabeaz.com 5 DRY Copyright (C) 2013, http://www.dabeaz.com 6 DRY Don't Repeat Yourself Copyright (C) 2013, http://www.dabeaz.com 7 DRY Don't Repeat Yourself Don't Repeat Yourself Copyright (C) 2013, http://www.dabeaz.com 8 Don't Repeat Yourself • Highly repetitive code sucks • Tedious to write • Hard to read • Difficult to modify Copyright (C) 2013, http://www.dabeaz.com 9 This Tutorial • A modern journey of metaprogramming • Highlight unique aspects of Python 3 • Explode your brain Copyright (C) 2013, http://www.dabeaz.com 10 Target Audience • Framework/library builders • Anyone who wants to know how things work • Programmers wishing to increase "job security" Copyright (C) 2013, http://www.dabeaz.com 11 Reading • Tutorial loosely based on content in "Python Cookbook, 3rd Ed." • Published May, 2013 • You'll find even more information in the book Copyright (C) 2013, http://www.dabeaz.com 12 Preliminaries Copyright (C) 2013, http://www.dabeaz.com 13 Basic Building Blocks statement1 def func(args): statement2 statement1 statement3 statement2 ..
    [Show full text]
  • Optimizing a Bank of Kalman Filters for Navigation Integrity
    Air Force Institute of Technology AFIT Scholar Theses and Dissertations Student Graduate Works 3-2021 Optimizing a Bank of Kalman Filters for Navigation Integrity Luis E. Sepulveda Follow this and additional works at: https://scholar.afit.edu/etd Part of the Computer Sciences Commons, and the Navigation, Guidance, Control and Dynamics Commons Recommended Citation Sepulveda, Luis E., "Optimizing a Bank of Kalman Filters for Navigation Integrity" (2021). Theses and Dissertations. 4908. https://scholar.afit.edu/etd/4908 This Thesis is brought to you for free and open access by the Student Graduate Works at AFIT Scholar. It has been accepted for inclusion in Theses and Dissertations by an authorized administrator of AFIT Scholar. For more information, please contact [email protected]. Optimizing Banks of Kalman Filters for Navigation Integrity using Parallel Computing and Efficient Software Design THESIS Luis E. Sepulveda, Captain, USAF AFIT-ENG-MS-21-M-079 DEPARTMENT OF THE AIR FORCE AIR UNIVERSITY AIR FORCE INSTITUTE OF TECHNOLOGY Wright-Patterson Air Force Base, Ohio DISTRIBUTION STATEMENT A APPROVED FOR PUBLIC RELEASE; DISTRIBUTION UNLIMITED. The views expressed in this document are those of the author and do not reflect the official policy or position of the United States Air Force, the United States Department of Defense or the United States Government. This material is declared a work of the U.S. Government and is not subject to copyright protection in the United States. AFIT-ENG-MS-21-M-079 OPTIMIZING BANKS OF KALMAN FILTERS FOR NAVIGATION INTEGRITY USING PARALLEL COMPUTING AND EFFICIENT SOFTWARE DESIGN THESIS Presented to the Faculty Department of Electrical and Computer Engineering Graduate School of Engineering and Management Air Force Institute of Technology Air University Air Education and Training Command in Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science Luis E.
    [Show full text]
  • Type-Safe Polyvariadic Event Correlation 3
    Type-safe Polyvariadic Event Correlation OLIVER BRAČEVAC, TU Darmstadt, Germany GUIDO SALVANESCHI, TU Darmstadt, Germany SEBASTIAN ERDWEG, Johannes Gutenberg University Mainz, Germany MIRA MEZINI, TU Darmstadt, Germany The pivotal role that event correlation technology plays in todays applications has lead to the emergence of different families of event correlation approaches with a multitude of specialized correlation semantics, including computation models that support the composition and extension of different semantics. However, type-safe embeddings of extensible and composable event patterns into statically-typed general- purpose programming languages have not been systematically explored so far. This is unfortunate, as type- safe embedding of event patterns is important to enable increased correctness of event correlation computa- tions as well as domain-specific optimizations. Event correlation technology has often adopted well-known and intuitive notations from database queries, for which approaches to type-safe embedding do exist. How- ever, we argue in the paper that these approaches, which are essentially descendants of the work on monadic comprehensions, are not well-suited for event correlations and, thus, cannot without further ado be reused/re- purposed for embedding event patterns. To close this gap we propose PolyJoin, a novel approach to type-safe embedding for fully polyvariadic event patterns with polymorphic correlation semantics. Our approach is based on a tagless final encoding with uncurried higher-order abstract syntax (HOAS) representation of event patterns with n variables, for arbitrary n ∈ N. Thus, our embedding is defined in terms of the host language without code generation and exploits the host language type system to model and type check the type system of the pattern language.
    [Show full text]
  • Compile-Time Reflection and Metaprogramming for Java
    Compile-time Reflection and Metaprogramming for Java Weiyu Miao Jeremy Siek University of Colorado at Boulder {weiyu.miao, jeremy.siek}@colorado.edu Abstract we also likely need to change the hasGetters for that class, therefore Java reflection enables us to write reusable programs that are inde- such implementation is not adaptable to the change of a class. pendent of certain classes. However, when runtime performance is With runtime reflection, we can write a hasGetters that is appli- a big concern, we propose to use compile-time reflection for writ- cable to any class. Following shows the partial implementation of ing metaprograms that generate non-reflective class/type specific the hasGetters. code, which has lower runtime cost. 1 public boolean hasGetters(Class cls) { We proposed both compile-time reflection and metaprogram- 2 Field[] fds = cls.getFields(); ming for Java, and extended our previous work on pattern-based 3 for(int i=0;i < fds.length; ++i) { traits. Pattern-based traits integrate pattern-based reflection with 4 Field fd = fds[i]; flexible composition of traits. They are capable of pattern-matching 5 String mn = ”get”+capitalize(fd.getName()); over class members and generating expressive code. We add and 6 Class fTy = fd.getType(); formalize pattern-based reflection at the statement-level, which 7 try { enables a meta program to generate statements. We add reified 8 Method m = cls.getMethod(mn, new Class[0]); 9 if (! m.getReturnType().equals(fTy)) { generics for pattern-based traits, which enables a pattern to iter- 10 ... /∗ print the message that field fd has no getter ∗/ ate over any class when traits are instantiated.
    [Show full text]