Programming Languages Featherweight Java David Walker
|
|
- Jemimah York
- 7 years ago
- Views:
Transcription
1 Programming Languages Featherweight Java David Walker
2 Overview Featherweight Java (FJ), a minimal Javalike language. Models inheritance and subtyping. Immutable objects: no mutation of fields. Trivialized core language. 1
3 Abstract Syntax The abstract syntax of FJ is given by the following grammar: Classes C : : = class c extends c {c f; k d} Constructors k : : = c(c x) {super(x); this.f =x;} Methods d : : = c m(c x) {return e;} Types τ : : = c Expressions e : : = x e.f e.m(e) new c(e) (c) e Underlining indicates one or more. If e appears in an inference rule and e i does too, there is an implicit understandng that e i is one of the e s in e. And similarly with other underlined constructs. 2
4 Abstract Syntax Classes in FJ have the form: class c extends c {c f; k d} Class c is a sub-class of class c. Constructor k for instances of c. Fields c f. Methods d. 3
5 Abstract Syntax Constructor expressions have the form c(c x, c x) {super(x ); this.f=x;} Arguments correspond to super-class fields and sub-class fields. Initializes super-class. Initializes sub-class. 4
6 Abstract Syntax Methods have the form c m(c x) {return e;} Result class c. Argument class(es) c. Binds x and this in e. 5
7 Abstract Syntax Minimal set of expressions: Field selection: e.f. Message send: e.m(e). Instantiation: new c(e). Cast: (c) e. 6
8 FJ Example class Pt extends Object { int x; int y; } Pt (int x, int y) { super(); this.x = x; this.y = y; } int getx () { return this.x; } int gety () { return this.y; } 7
9 FJ Example class CPt extends Pt { color c; } CPt (int x, int y, color c) { super(x,y); this.c = c; } color getc () { return this.c; } 8
10 Class Tables and Programs A class table T is a finite function assigning classes to class names. A program is a pair (T, e) consisting of A class table T. An expression e. 9
11 Static Semantics Judgement forms: τ <: τ c c Γ e : τ d ok in c c ok T ok fields(c) = c f type(m, c) = c c subtyping subclassing expression typing well-formed method well-formed class well-formed class table field lookup method type 10
12 Static Semantics Variables: Γ(x) = τ Γ x : τ Must be declared, as usual. Introduced within method bodies. 11
13 Static Semantics Field selection: Γ e 0 : c 0 fields(c 0 ) = c f Γ e 0.f i : c i Field must be present. Type is specified in the class. 12
14 Static Semantics Message send: Γ e 0 : c 0 Γ e : c type(m, c 0 ) = c c c <: c Γ e 0.m(e) : c Method must be present. Argument types must be subtypes of parameters. 13
15 Static Semantics Instantiation: Γ e : c c <: c fields(c) = c f Γ new c(e) : c Initializers must have subtypes of fields. 14
16 Static Semantics Casting: Γ e 0 : d Γ (c) e 0 : c All casts are statically acceptable! Could try to detect casts that are guaranteed to fail at run-time. 15
17 Subclassing Sub-class relation is implicitly relative to a class table. T (c) = class c extends c {...;......} c c Reflexivity, transitivity of sub-classing: (T (c) defined) c c c c c c c c Sub-classing only by explicit declaration! 16
18 Subtyping Subtyping relation: τ <: τ. τ <: τ τ <: τ τ <: τ τ <: τ c c c <: c Subtyping is determined solely by subclassing. 17
19 Class Formation Well-formed classes: k = c(c x, c x) {super(x ); this.f=x;} fields(c ) = c f d i ok in c class c extends c {c f; k d} ok Constructor has arguments for each superand sub-class field. Constructor initializes super-class before subclass. Sub-class methods must be well-formed relative to the super-class. 18
20 Class Formation Method overriding, relative to a class: T (c) = class c extends c {...;......} type(m, c ) = c c 0 x : c, this:c e 0 : c 0 c 0 <: c 0 c 0 m(c x) {return e 0 ;} ok in c Sub-class method must return a subtype of the super-class method s result type. Argument types of the sub-class method must be exactly the same as those for the super-class. Need another case to cover method extension. 19
21 Program Formation A class table is well-formed iff all of its classes are well-formed: c dom(t ) T (c) ok T ok A program is well-formed iff its class table is well-formed and the expression is well-formed: T ok e : τ (T, e) ok 20
22 Method Typing The type of a method is defined as follows: T (c) = class c extends c {...;... d} d i = c i m(c i x) {return e;} type(m i, c) = c i c i T (c) = class c extends c {...;... d} m / d type(m i, c ) = c i c i type(m, c) = c i c i 21
23 Dynamic Semantics Transitions: e T e. Transitions are indexed by a (well-formed) class table! Dynamic dispatch. Downcasting. We omit explicit mention of T in what follows. 22
24 Dynamic Semantics Object values have the form where new c(e, e) e are the values of the super-class fields. and e are the values of the sub-class fields. c indicates the true (dynamic) class of the instance. Use this judgement to affirm an expression is a value: new c(e, e) value Rules new Object value e i value e i value new c(e, e) value 23
25 Dynamic Semantics Field selection: fields(c) = c f, c f e value e value new c(e, e).f i e i fields(c) = c f, c f e value e value new c(e, e).f i e i Fields in sub-class must be disjoint from those in super-class. Selects appropriate field based on name. 24
26 Dynamic Semantics Message send: body(m, c) = x e 0 e value e value new c(e).m(e ) {e /x}{new c(e)/this}e 0 The identifier this stands for the object itself. Compare with recursive functions in MinML. 25
27 Dynamic Semantics Cast: c c e value (c ) new c(e) new c(e) No transition (stuck) if c is not a sub-class of c! Sh/could introduce error transitions for cast failure. 26
28 Dynamic Semantics Search rules (CBV): e 0 e 0 e 0.f e 0.f e 0 e 0 e 0.m(e) e 0.m(e) e 0 value e e e 0.m(e) e 0.m(e ) 27
29 Dynamic Semantics Search rules (CBV), cont d: e e new c(e) new c(e ) e 0 e 0 (c) e 0 (c) e 0 28
30 Dynamic Semantics Dynamic dispatch: T (c) = class c extends c {...;... d} d i = c i m(c i x) {return e;} body(m i, c) = x e T (c) = class c extends c {...;... d} m / d body(m, c ) = x e body(m, c) = x e Climbs the class hierarchy searching for the method. Static semantics ensures that the method must exist! 29
31 Type Safety Theorem 1 (Preservation) Assume that T is a well-formed class table. If e : τ and e e, then e : τ for some τ <: τ. Proved by induction on transition relation. Type may get smaller during execution due to casting! 30
32 Type Safety Lemma 2 (Canonical Forms) If e : c and e value, then e = new d(e 0 ) with d c and e 0 value. Values of class type are objects (instances). The dynamic class of an object may be lower in the subtype hierarchy than the static class. 31
33 Type Safety Theorem 3 (Progress) Assume that T is a well-formed class table. If e : τ then either 1. v value, or 2. e has the form (c) new d(e 0 ) with e 0 value and d c, or 3. there exists e such that e e. 32
34 Type Safety Comments on the progress theorem: Well-typed programs can get stuck! only because of a cast.... But Precludes message not understood error. Proof is by induction on typing. 33
35 Variations and Extensions A more flexible static semantics for override: Subclass result type is a subtype of the superclass result type. Subclass argument types are supertypes of the corresponding superclass argument types. 34
36 Variations and Extensions Java adds arrays and covariant array subtyping: τ <: τ τ [ ] <: τ [ ] What effect does this have? 35
37 Variations and Extensions Java adds array covariance: τ <: τ τ [ ] <: τ [ ] Perfectly OK for FJ, which does not support mutation and assignment. With assignment, might store a supertype value in an array of the subtype. Subsequent retrieval at subtype is unsound. Java inserts a per-assignment run-time check and exception raise to ensure safety. 36
38 Variations and Extensions Static fields: Must be initialized as part of the class definition (not by the constructor). In what order are initializers to be evaluated? Could require initialization to a constant. 37
39 Variations and Extensions Static methods: Essentially just recursive functions. No overriding. Static dispatch to the class, not the instance. 38
40 Variations and Extensions Final methods: Preclude override in a sub-class. Final fields: Sensible only in the presence of mutation! 39
41 Variations and Extensions Abstract methods: Some methods are undefined (but are declared). Cannot form an instance if any method is abstract. 40
42 Class Tables Type checking requires the entire program! Class table is a global property of the program and libraries. Cannot type check classes separately from one another. 41
CS-XXX: Graduate Programming Languages. Lecture 25 Multiple Inheritance and Interfaces. Dan Grossman 2012
CS-XXX: Graduate Programming Languages Lecture 25 Multiple Inheritance and Interfaces Dan Grossman 2012 Multiple Inheritance Why not allow class C extends C1,C2,...{...} (and C C1 and C C2)? What everyone
More informationComp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages. Corky Cartwright Swarat Chaudhuri November 30, 20111
Comp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages Corky Cartwright Swarat Chaudhuri November 30, 20111 Overview I In OO languages, data values (except for designated non-oo
More informationManaging Gradual Typing with Message-Safety in Dart
Managing Gradual Typing with Message-Safety in Dart Erik Ernst Anders Møller Mathias Schwarz Fabio Strocco Aarhus University, Denmark {eernst,amoeller,schwarz,fstrocco@cs.au.dk Abstract This paper establishes
More informationObject-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,
More informationType-Safe Feature-Oriented Product Lines
Type-Safe Feature-Oriented Product Lines Sven Apel, Christian Kästner, Armin Größlinger, and Christian Lengauer Department of Informatics and Mathematics, University of Passau {apel,groesslinger,lengauer}@uni-passau.de
More informationIntegrating Typed and Untyped Code in a Scripting Language
Integrating Typed and Untyped Code in a Scripting Language Tobias Wrigstad Francesco Zappa Nardelli Sylvain Lebresne Johan Östlund Jan Vitek PURDUE UNIVERSITY INRIA Abstract Many large software systems
More informationStatic Typing for Object-Oriented Programming
Science of Computer Programming 23(1):19 53, 1994. Static Typing for Object-Oriented Programming Jens Palsberg palsberg@daimi.aau.dk Michael I. Schwartzbach mis@daimi.aau.dk Computer Science Department
More informationInheritance, overloading and overriding
Inheritance, overloading and overriding Recall with inheritance the behavior and data associated with the child classes are always an extension of the behavior and data associated with the parent class
More informationJava Interfaces. Recall: A List Interface. Another Java Interface Example. Interface Notes. Why an interface construct? Interfaces & Java Types
Interfaces & Java Types Lecture 10 CS211 Fall 2005 Java Interfaces So far, we have mostly talked about interfaces informally, in the English sense of the word An interface describes how a client interacts
More informationCSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.
CSCI 253 Object Oriented Design: Java Review OOP George Blankenship George Blankenship 1 Object Oriented Programming (OOP) OO Principles Abstraction Encapsulation Abstract Data Type (ADT) Implementation
More informationJava Programming Language
Lecture 1 Part II Java Programming Language Additional Features and Constructs Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Subclasses and
More informationPluggable Type Systems. Gilad Bracha
Pluggable Type Systems Gilad Bracha The Paradox of Type Systems Type systems help reliability and security by mechanically proving program properties Type systems hurt reliability and security by making
More informationTaming Wildcards in Java s Type System
Taming Wildcards in Java s Type System Ross Tate University of California, San Diego rtate@cs.ucsd.edu Alan Leung University of California, San Diego aleung@cs.ucsd.edu Sorin Lerner University of California,
More informationThe Interface Concept
Multiple inheritance Interfaces Four often used Java interfaces Iterator Cloneable Serializable Comparable The Interface Concept OOP: The Interface Concept 1 Multiple Inheritance, Example Person name()
More informationSE 360 Advances in Software Development Object Oriented Development in Java. Polymorphism. Dr. Senem Kumova Metin
SE 360 Advances in Software Development Object Oriented Development in Java Polymorphism Dr. Senem Kumova Metin Modified lecture notes of Dr. Hüseyin Akcan Inheritance Object oriented programming languages
More informationDescription of Class Mutation Mutation Operators for Java
Description of Class Mutation Mutation Operators for Java Yu-Seung Ma Electronics and Telecommunications Research Institute, Korea ysma@etri.re.kr Jeff Offutt Software Engineering George Mason University
More informationLanguage with a Pluggable Type System and Optional Runtime Monitoring of Type Errors
Language with a Pluggable Type System and Optional Runtime Monitoring of Type Errors Jukka Lehtosalo and David J. Greaves University of Cambridge Computer Laboratory firstname.lastname@cl.cam.ac.uk Abstract.
More informationIntroduction to type systems
Introduction to type systems p. 1/5 Introductory Course on Logic and Automata Theory Introduction to type systems Polyvios.Pratikakis@imag.fr Based on slides by Jeff Foster, UMD Introduction to type systems
More informationIntegrating Formal Models into the Programming Languages Course
Integrating Formal Models into the Programming Languages Course Allen B. Tucker Robert E. Noonan Computer Science Department Computer Science Department Bowdoin College College of William and Mary Brunswick,
More informationComputing Concepts with Java Essentials
2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann
More informationAP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
More informationDart a modern web language
Dart a modern web language or why web programmers need more structure Kasper Lund & Lars Bak Software engineers, Google Inc. Object-oriented language experience: 26 + 12 years The Web Is Fantastic The
More informationGénie Logiciel et Gestion de Projets. Object-Oriented Programming An introduction to Java
Génie Logiciel et Gestion de Projets Object-Oriented Programming An introduction to Java 1 Roadmap History of Abstraction Mechanisms Learning an OOPL Classes, Methods and Messages Inheritance Polymorphism
More informationTickling Java with a Feather
LDTA 2008 Tickling Java with a Feather Tristan O.R. Allwood 1 Susan Eisenbach 2 Department of Computing Imperial College London United Kingdom Abstract Fragments of mainstream programming languages are
More informationStack Allocation. Run-Time Data Structures. Static Structures
Run-Time Data Structures Stack Allocation Static Structures For static structures, a fixed address is used throughout execution. This is the oldest and simplest memory organization. In current compilers,
More informationType Classes with Functional Dependencies
Appears in Proceedings of the 9th European Symposium on Programming, ESOP 2000, Berlin, Germany, March 2000, Springer-Verlag LNCS 1782. Type Classes with Functional Dependencies Mark P. Jones Department
More informationJava Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
More informationImplementation Aspects of OO-Languages
1 Implementation Aspects of OO-Languages Allocation of space for data members: The space for data members is laid out the same way it is done for structures in C or other languages. Specifically: The data
More informationChecking Access to Protected Members in the Java Virtual Machine
Checking Access to Protected Members in the Java Virtual Machine Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/
More informationGénie Logiciel et Gestion de Projets. Object-Oriented Programming An introduction to Java
Génie Logiciel et Gestion de Projets Object-Oriented Programming An introduction to Java 1 Roadmap History of Abstraction Mechanisms Learning an OOPL Classes, Methods and Messages Inheritance Polymorphism
More informationObject-Oriented Programming Lecture 2: Classes and Objects
Object-Oriented Programming Lecture 2: Classes and Objects Dr. Lê H!ng Ph"#ng -- Department of Mathematics, Mechanics and Informatics, VNUH July 2012 1 Content Class Object More on class Enum types Package
More informationJava 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition
Java 6 'th edition Concepts INTERNATIONAL STUDENT VERSION CONTENTS PREFACE vii SPECIAL FEATURES xxviii chapter i INTRODUCTION 1 1.1 What Is Programming? 2 J.2 The Anatomy of a Computer 3 1.3 Translating
More informationcore. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt
core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY
More informationParametric Domain-theoretic models of Linear Abadi & Plotkin Logic
Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Lars Birkedal Rasmus Ejlers Møgelberg Rasmus Lerchedahl Petersen IT University Technical Report Series TR-00-7 ISSN 600 600 February 00
More informationFundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
More informationPart VI. Object-relational Data Models
Part VI Overview Object-relational Database Models Concepts of Object-relational Database Models Object-relational Features in Oracle10g Object-relational Database Models Object-relational Database Models
More informationPolymorphism. Problems with switch statement. Solution - use virtual functions (polymorphism) Polymorphism
Polymorphism Problems with switch statement Programmer may forget to test all possible cases in a switch. Tracking this down can be time consuming and error prone Solution - use virtual functions (polymorphism)
More informationPragmatic Type Interoperability
1 Pragmatic Type Interoperability S. Baehni, P.Th. Eugster, R. Guerraoui Distributed Programming Laboratory P. Altherr Programming Methods Laboratory Swiss Federal Institute of Technology (EPFL) Roadmap
More informationPizza into Java: Translating theory into practice
Pizza into Java: Translating theory into practice Martin Odersky University of Karlsruhe Philip Wadler University of Glasgow Abstract Pizza is a strict superset of Java that incorporates three ideas from
More informationOPERATIONAL TYPE THEORY by Adam Petcher Prepared under the direction of Professor Aaron Stump A thesis presented to the School of Engineering of
WASHINGTON NIVERSITY SCHOOL OF ENGINEERING AND APPLIED SCIENCE DEPARTMENT OF COMPTER SCIENCE AND ENGINEERING DECIDING JOINABILITY MODLO GROND EQATIONS IN OPERATIONAL TYPE THEORY by Adam Petcher Prepared
More information263-2200 Types and Programming Languages
263-2200 Types and Programming Languages 1 / 49 Outline Types Evaluation Rules Typing Rules Properties of the Typing Relation The Inversion Lemma Prolog Implementation Reasoning Involving Types Progress
More informationSemantic Analysis: Types and Type Checking
Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors
More informationD06 PROGRAMMING with JAVA
Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch13 Inheritance PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com, for accompanying
More informationClasses and Pointers: Some Peculiarities (cont d.)
Classes and Pointers: Some Peculiarities (cont d.) Assignment operator Built-in assignment operators for classes with pointer member variables may lead to shallow copying of data FIGURE 3-22 Objects objectone
More informationCS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
More informationPage 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.
Page 331, 38.2 Assignment #11 Solutions Factor the following positive integers into primes. a. 25 = 5 2. b. 4200 = 2 3 3 5 2 7. c. 10 10 = 2 10 5 10. d. 19 = 19. e. 1 = 1. Page 331, 38.4 Suppose a is a
More informationImproving Usability of Information Flow Security in Java
Improving Usability of Information Flow Security in Java Scott F. Smith and Mark Thober Department of Computer Science Johns Hopkins University {scott,mthober@cs.jhu.edu Abstract Thiaper focuses on improving
More informationHabanero Extreme Scale Software Research Project
Habanero Extreme Scale Software Research Project Comp215: Java Method Dispatch Zoran Budimlić (Rice University) Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead
More informationFormal Engineering for Industrial Software Development
Shaoying Liu Formal Engineering for Industrial Software Development Using the SOFL Method With 90 Figures and 30 Tables Springer Contents Introduction 1 1.1 Software Life Cycle... 2 1.2 The Problem 4 1.3
More informationChapter 1 Fundamentals of Java Programming
Chapter 1 Fundamentals of Java Programming Computers and Computer Programming Writing and Executing a Java Program Elements of a Java Program Features of Java Accessing the Classes and Class Members The
More informationWhat is Java? Applications and Applets: Result of Sun s efforts to remedy bad software engineering practices
What is Java? Result of Sun s efforts to remedy bad software engineering practices It is commonly thought of as a way to make Web pages cool. It has evolved into much more. It is fast becoming a computing
More informationLemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.
Definition 51 Let S be a set bijection f : S S 5 Permutation groups A permutation of S is simply a Lemma 52 Let S be a set (1) Let f and g be two permutations of S Then the composition of f and g is a
More informationJava Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
More informationDeterministic Discrete Modeling
Deterministic Discrete Modeling Formal Semantics of Firewalls in Isabelle/HOL Cornelius Diekmann, M.Sc. Dr. Heiko Niedermayer Prof. Dr.-Ing. Georg Carle Lehrstuhl für Netzarchitekturen und Netzdienste
More informationData Abstraction and Hierarchy
Data Abstraction and Hierarchy * This research was supported by the NEC Professorship of Software Science and Engineering. Barbara Liskov Affiliation: MIT Laboratory for Computer Science Cambridge, MA,
More informationLab Manual: Using Rational Rose
Lab Manual: Using Rational Rose 1. Use Case Diagram Creating actors 1. Right-click on the Use Case View package in the browser to make the shortcut menu visible. 2. Select the New:Actor menu option. A
More informationBlame for All. Jeremy G. Siek. Amal Ahmed. Robert Bruce Findler. Philip Wadler. Abstract. 1. Introduction
Blame for All Amal Ahmed Indiana University amal@cs.indiana.edu Robert Bruce Findler Northwestern University robby@eecs.northwestern.edu Jeremy G. Siek University of Colorado at Boulder jeremy.siek@colorado.edu
More informationChapter 13 - Inheritance
Goals Chapter 13 - Inheritance To learn about inheritance To understand how to inherit and override superclass methods To be able to invoke superclass constructors To learn about protected and package
More informationA Type System for Data-Flow Integrity on Windows Vista
A Type System for Data-Flow Integrity on Windows Vista Avik Chaudhuri University of California at Santa Cruz avik@cs.ucsc.edu Prasad Naldurg Sriram Rajamani Microsoft Research India {prasadn,sriram}@microsoft.com
More informationJava (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
More informationCohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT
BSc (Hons) in Computer Applications, BSc (Hons) Computer Science with Network Security, BSc (Hons) Business Information Systems & BSc (Hons) Software Engineering Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT
More informationUsing Inheritance and Polymorphism
186 Chapter 16 Using Inheritance and Polymorphism In this chapter we make use of inheritance and polymorphism to build a useful data structure. 16.1 Abstract Classes Circle1a ( 16.1) is a variation of
More informationMicrophone Modem Model, and MinML Modification
Programming Languages: Theory and Practice (WORKING DRAFT OF SEPTEMBER 19, 2005.) Robert Harper Carnegie Mellon University Spring Semester, 2005 Copyright c 2005. All Rights Reserved. Preface This is a
More informationAgenda. What is and Why Polymorphism? Examples of Polymorphism in Java programs 3 forms of Polymorphism
Polymorphism 1 Agenda What is and Why Polymorphism? Examples of Polymorphism in Java programs 3 forms of Polymorphism 2 What is & Why Polymorphism? 3 What is Polymorphism? Generally, polymorphism refers
More informationBring Your Own Device, Securely
A. Armando, G. Costa, A. Merlo, L. Verderame 28th Symposium On Applied Computing (SAC 2013) Security Track March 19, 2013 Agenda BYOD paradigm, Android and Users; Formal reasoning about Android; Type and
More informationHistory OOP languages Year Language 1967 Simula-67 1983 Smalltalk
History OOP languages Intro 1 Year Language reported dates vary for some languages... design Vs delievered 1957 Fortran High level programming language 1958 Lisp 1959 Cobol 1960 Algol Structured Programming
More informationSpecialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools Objective: At the end of the course, Students will be able to: Understand various open source tools(programming tools and databases)
More informationAbstract. a http://www.eiffel.com
Abstract Eiffel Software a provides a compiler for the Eiffel programming language capable of generating C code or Common Intermediate Language byte code. The CLI code can be executed on the Common Language
More information1/23/2012. Rich Internet Applications. The importance of JavaScript. Why learn JavaScript? Many choices open to the developer for server-side
The importance of JavaScript Many choices open to the developer for server-side Can choose server technology for development and deployment ASP.NET, PHP, Ruby on Rails, etc No choice for development of
More informationThis paper should be referenced as:
This paper should be referenced as: Connor, R.C.H., Dearle, A., Morrison, R. & Brown, A.L. An Object Addressing Mechanism for Statically Typed Languages with Multiple Inheritance. In Proc. OOPSLA'89, New
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
More informationA Propositional Dynamic Logic for CCS Programs
A Propositional Dynamic Logic for CCS Programs Mario R. F. Benevides and L. Menasché Schechter {mario,luis}@cos.ufrj.br Abstract This work presents a Propositional Dynamic Logic in which the programs are
More informationA Parameterized Type System for Race-Free Java Programs
ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), October 2001 A Parameterized Type System for Race-Free Java Programs Chandrasekhar Boyapati Martin Rinard Laboratory
More informationCorrespondence analysis for strong three-valued logic
Correspondence analysis for strong three-valued logic A. Tamminga abstract. I apply Kooi and Tamminga s (2012) idea of correspondence analysis for many-valued logics to strong three-valued logic (K 3 ).
More informationMCI-Java: A Modified Java Virtual Machine Approach to Multiple Code Inheritance
This is pre-print of a paper that will appear in the Proceedings of: 3 rd Virtual Machine Research & Technology Symposium Usenix VM 4, May 6-7, 24, San Jose, alifornia. MI-Java: Modified Java Virtual Machine
More informationExtending Classes with Services
Chapter 2 Extending Classes with Services Chapter Objectives After studying this chapter, you should be able to: Extend an existing class with new commands Explain how a message sent to an object is resolved
More informationObject Invariants in Dynamic Contexts
Object Invariants in Dynamic Contexts K. Rustan M. Leino 1 and Peter Müller 2 1 Microsoft Research, Redmond, WA, USA, leino@microsoft.com 2 ETH Zurich, Switzerland, peter.mueller@inf.ethz.ch Abstract.
More informationChapter 8 The Enhanced Entity- Relationship (EER) Model
Chapter 8 The Enhanced Entity- Relationship (EER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 Outline Subclasses, Superclasses, and Inheritance Specialization
More informationLecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance
Introduction to C++ January 19, 2011 Massachusetts Institute of Technology 6.096 Lecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance We ve already seen how to define composite datatypes
More informationProgramming languages, their environments and system software interfaces
ISO/IEC JTC1/SC22/WG4 N 0161 (J4/02-0101) Date: 2002-05-02 Reference number of document: WDTR 19755 Committee identification: ISO/IEC JTC 1/SC 22 /WG 4 Secretariat: ANSI Information Technology Programming
More informationApplication-only Call Graph Construction
Application-only Call Graph Construction Karim Ali and Ondřej Lhoták David R. Cheriton School of Computer Science, University of Waterloo Abstract. Since call graphs are an essential starting point for
More informationLecture 9. Semantic Analysis Scoping and Symbol Table
Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax
More informationAn Introduction To UML Class Diagrams Classes
An Introduction To UML Class Diagrams Classes 1. Represent a user-created or defined data type a. they are an abstract data type (ADT) b. they implement data hiding and encapsulation c. they establish
More informationSemantics of UML class diagrams
1 Otto-von-Guericke Universität Magdeburg, Germany April 26, 2016 Sets Definition (Set) A set is a collection of objects. The basic relation is membership: x A (x is a member of A) The following operations
More informationEnforcing Secure Object Initialization in Java
Enforcing Secure Object Initialization in Java Laurent Hubert 1, Thomas Jensen 2, Vincent Monfort 2, and David Pichardie 2 1 CNRS/IRISA, France 2 INRIA Rennes - Bretagne Atlantique/IRISA, France Abstract.
More informationAppendix B: Alloy Language Reference B.1 Lexical Issues
Appendix B: Alloy Language Reference B.1 Lexical Issues The permitted characters are the printing characters of the ASCII character set, with the exception of backslash \ backquote ` and, of the ASCII
More informationUniversity of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees
University of Ostrava Institute for Research and Applications of Fuzzy Modeling Reasoning in Description Logic with Semantic Tableau Binary Trees Alena Lukasová Research report No. 63 2005 Submitted/to
More informationAdvanced OOP Concepts in Java
Advanced OOP Concepts in Java Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring 09/28/2001 1 Overview
More informationRegression Verification: Status Report
Regression Verification: Status Report Presentation by Dennis Felsing within the Projektgruppe Formale Methoden der Softwareentwicklung 2013-12-11 1/22 Introduction How to prevent regressions in software
More informationSystematically Refactoring Inheritance to Delegation in JAVA
Systematically Refactoring Inheritance to Delegation in JAVA Hannes Kegel ej-technologies GmbH Claude-Lorrain-Straße 7 D-81543 München hannes.kegel@ej-technologies.com Friedrich Steimann Lehrgebiet Programmiersysteme
More informationSchema Evolution in SQL-99 and Commercial (Object-)Relational DBMS
Schema Evolution in SQL-99 and Commercial (Object-)Relational DBMS Can Türker Swiss Federal Institute of Technology (ETH) Zurich Institute of Information Systems, ETH Zentrum CH 8092 Zurich, Switzerland
More informationCompiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding
Compiling Object Oriented Languages What is an Object-Oriented Programming Language? Last time Dynamic compilation Today Introduction to compiling object oriented languages What are the issues? Objects
More informationVerifying Spec# Delegates. Samuele Gantner
Verifying Spec# Delegates Samuele Gantner Master s Thesis Chair of Programming Methodology Department of Computer Science ETH Zurich pm.inf.ethz.ch March 2008 - September 2008 Supervised by: Joseph N.
More informationJava EE Web Development Course Program
Java EE Web Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive types, variables, basic operators, expressions,
More informationMath 319 Problem Set #3 Solution 21 February 2002
Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod
More informationFutoshi IWAMA and Naoki KOBAYASHI Tohoku University Aramaki aza Aoba 09, Aoba-ku Sendai Miyagi-pref. 980-8579, Japan
A New Type System for JVM Lock Primitives 1 A New Type System for JVM Lock Primitives Futoshi IWAMA and Naoki KOBAYASHI Tohoku University Aramaki aza Aoba 09, Aoba-ku Sendai Miyagi-pref. 980-8579, Japan
More informationTypes, Polymorphism, and Type Reconstruction
Types, Polymorphism, and Type Reconstruction Sources This material is based on the following sources: Pierce, B.C., Types and Programming Languages. MIT Press, 2002. Kanellakis, P.C., Mairson, H.G. and
More informationRigorous Software Development CSCI-GA 3033-009
Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 5 Disclaimer. These notes are derived from notes originally developed by Joseph Kiniry, Gary Leavens, Erik Poll,
More informationTypeScript. Language Specification. Version 1.4
TypeScript Language Specification Version 1.4 October, 2014 Microsoft is making this Specification available under the Open Web Foundation Final Specification Agreement Version 1.0 ("OWF 1.0") as of October
More information