Cascade: A Universal Programmer-assisted Type Qualifier Inference Tool

Size: px
Start display at page:

Download "Cascade: A Universal Programmer-assisted Type Qualifier Inference Tool"

Transcription

1 Cascade: A Universal Programmer-assisted Type Qualifier Inference Tool Mohsen Vakilian* Amarin Phaosawasdi* Michael D. Ernst Ralph E. Johnson* *University of Illinois at Urbana-Champaign University of Washington 1

2 Type qualifiers allow additional static type checks static int MathVector ic, int l) { int i = 0; for (int k = 0; k < MathVector.NDIM; k++) { if (((int) ic.value(k) & l)!= 0) i += Cell.NSUB >> (k + 1); } return i; } 2

3 Java 8 supports custom type systems* Locking Aliasing Interning Immutability Tainting *checkerframework.org 3

4 Java 8 supports custom type systems* Locking Aliasing Interning Immutability Tainting + additional static checks *checkerframework.org 4

5 Java 8 supports custom type systems* Locking Aliasing Interning Immutability Tainting + additional static checks - additional code annotation *checkerframework.org 5

6 The manual annotation process is tedious Run type checker 6

7 The manual annotation process is tedious Run type checker Add or remove qualifiers 7

8 The manual annotation process is tedious Refactor code Run type checker Add or remove qualifiers 8

9 Type qualifier inference tools run in batch mode Program Infer Annotated program 9

10 Type qualifier inference tools run in batch mode Nullness Program Infer Annotated program Julia, Nit, JastAddJ Nullness, SALSA Nullness, Xylem, Daikon Nullness Immutability Javarifier, Pidasai, ReImInfer Ownership Universe and Ownership Type Inference System 10

11 Type qualifier inference tools run in batch mode Strengths Program Infer Annotated program Optimal under certain conditions Large change without user involvement 11

12 Type qualifier inference tools run in batch mode Weaknesses Program Infer Annotated program Limited to one set of qualifiers Unpredictable Rigid Inaccurate 12

13 Type qualifier inference tools run in batch mode Refactor code Program Infer Annotated program Run type checker Add or remove qualifiers 13

14 Type qualifier inference tools run in batch mode Refactor code Program Infer Automate! Annotated program Run type checker Add or remove qualifiers 14

15 Type qualifier inference tools run in batch mode Human insight needed Program Infer Refactor code Annotated program Run type checker Add or remove qualifiers 15

16 Batch-mode tools make arbitrary decisions 16

17 17

18 BUG 18

19 Batch-mode tools make arbitrary decisions BUG 19

20 Type qualifier inference is a refactoring Adding type qualifiers preserves the program behavior Adding maintainable type qualifiers that match the programmer's intention requires code refactoring 20

21 Cascade: A Universal Programmer-assisted Type Qualifier Inference Tool Type Checker Cascade Type Inference 21

22 Cascade: A Universal Programmer-assisted Type Qualifier Inference Tool Compositional Refactoring Cascade Speculative Analysis 22

23 Inferring Primitive Changes from Error Messages Type Checker Error Nullness Fix incompatible types in argument. root = root.loadtree(q, xqic); ^ found MathVector MathVector 23

24 Inferring Primitive Changes from Error Messages Type Checker Error Nullness incompatible types in argument. root = root.loadtree(q, xqic); ^ found MathVector MathVector Fix Change parameter xpic of loadtree() MathVector 24

25 Inferring Primitive Changes from Error Messages Type Checker Error Nullness Mutability incompatible types in argument. root = root.loadtree(q, xqic); ^ found MathVector MathVector Fix Change parameter xpic of loadtree() MathVector call to value(int) not allowed on the given receiver. ic.value(k); ^ found MathVector MathVector 25

26 Inferring Primitive Changes from Error Messages Type Checker Error Nullness Mutability Fix incompatible types in argument. root = root.loadtree(q, xqic); ^ found MathVector MathVector Change parameter xpic of loadtree() MathVector call to value(int) not allowed on the given receiver. ic.value(k); ^ found MathVector MathVector Change receiver parameter of value() MathVector 26

27 Speculative analysis suggests a change composition 27

28 Speculative analysis suggests a change composition 28

29 Speculative analysis suggests a change composition 29

30 Speculative analysis suggests a change composition 30

31 Cascade Tree 31

32 Cascade Tree 32

33 Cascade Tree 33

34 34

35 35

36 36

37 The speculative analysis computes a tree recursively Program p e1 Error 37

38 The speculative analysis computes a tree recursively Program Fix p e1 c1 Error 38

39 The speculative analysis computes a tree recursively Program Fix p e1 c1(p) c1 e2 e3 Error 39

40 The speculative analysis computes a tree recursively Program Fix p e1 Error c1(p) c1 c2 e2 e3 c3 40

41 The speculative analysis computes a tree recursively Program Fix p e1 Error c2(c1(p)) c1(p) c1 c2 e3 e2 e3 c3(c1(p)) c3 e4 41

42 A change is represented as an AST path Primitive Change Variable Decl. Fixer Method Return Fixer Method Receiver Fixer Representation Compilation Unit + Variable Decl. + New Type Compilation Unit + Method Decl. + New Type Compilation Unit + Method Decl. + New Type 42

43 Research Questions How does Cascade compare with Julia, a batch qualifier inference tool? Learnability Quality of results Task completion time Control over process Willingness to use 43

44 User study Subjects: 12 computer science graduate students from 9 different research labs Familiar with Java and Eclipse Average of 10 years of programming experience 44

45 Training Nullness Checker Julia Cascade github.com/reprogrammer/tqi-study 45

46 Task Design Julia then Cascade Cascade then Julia MST then BH 3 participants 3 participants BH then MST 3 participants 3 participants BH Barnes-Hut, a hierarchical force-calculation algorithm MST Bentley s algorithm for finding the minimum spanning tree of a graph 46

47 Users complete tasks faster with Cascade t test p = 0.01 Cohen s d =

48 Users added less inaccurate annotations with Cascade BH + MST Julia Cascade Incorrect Redundant Unnecessary warning suppressions Correct 48

49 Postquestionnaire Results Questions (T = Julia or Cascade) I found T easy to learn. I know why T inserted each annotation. Using T, I have control over the process of annotating the code. I'm willing to use T in the Cascad Equal Julia e Rating better better

50 Qualitative Interview Results The participants believe that: Cascade's speculative analysis is useful (N = 8). Cascade is more predictable (N = 7). Cascade's tree computation is slow (N = 5). The overhead of fixing Julia's annotations is high (N = 7). 50

51 Future Work Improve the performance of Cascade. Evaluate compositional refactoring and Cascade in the field. Make Cascade support bidirectional speculative analysis. 51

52 Cascade: A Universal Type Qualifier Inference Tool Cascade is easy to use and helps users complete tasks fast. Compositional refactoring and speculative analysis. Less is sometimes more in the automation of software evolution tasks. More automation is not always better Some tasks need problem-solving and creativity Applicable to other fields 52

Using Type Annotations to Improve Your Code

Using Type Annotations to Improve Your Code Using Type Annotations to Improve Your Code Birds-of-a-Feather Session Werner Dietl, University of Waterloo Michael Ernst, University of Washington Open for questions Survey: Did you attend the tutorial?

More information

The Checker Framework: pluggable static analysis for Java

The Checker Framework: pluggable static analysis for Java The Checker Framework: pluggable static analysis for Java http://checkerframework.org/ Werner Dietl University of Waterloo https://ece.uwaterloo.ca/~wdietl/ Joint work with Michael D. Ernst and many others.

More information

Detecting and preventing null pointer errors with pluggable type-checking

Detecting and preventing null pointer errors with pluggable type-checking print(@readonly Object x) { List lst; Detecting and preventing null pointer errors with pluggable type-checking CSE 331 University of Washington Motivation java.lang.nullpointerexception

More information

CSE 331 Software Design and Implementation. Lecture 16 Checker Framework

CSE 331 Software Design and Implementation. Lecture 16 Checker Framework CSE 331 Software Design and Implementation Lecture 16 Checker Framework Zach Tatlock / Winter 2016 Motivation java.lang.nullpointerexception Problem: Your code has bugs Who discovers the problems? If you

More information

Detecting and preventing null pointer errors with pluggable type-checking

Detecting and preventing null pointer errors with pluggable type-checking print(@readonly Object x) { List lst; Detecting and preventing null pointer errors with pluggable type-checking Michael Ernst CSE 331 University of Washington Motivation java.lang.nullpointerexception

More information

Lecture 19 Checker Framework

Lecture 19 Checker Framework CSE 331 Software Design and Implementation Motivation Lecture 19 Checker Framework java.lang.nullpointerexception Zach Tatlock / Spring 2018 Problem: Your code has bugs Who discovers the problems? If you

More information

Javarifier: inference of reference immutability

Javarifier: inference of reference immutability print(object x) { print(@readonly Object x) { Javarifier: inference of reference immutability Jaime Quinonez Matthew S. Tschantz Michael D. Ernst MIT Security code in JDK 1.1 class Class { private Object[]

More information

Code verification. CSE 331 University of Washington. Michael Ernst

Code verification. CSE 331 University of Washington. Michael Ernst Code verification CSE 331 University of Washington Michael Ernst Specification and verification To find an error, compare two things Mental model Verification Specification Program Example input & output

More information

Plural and : Protocols in Practice. Jonathan Aldrich Workshop on Behavioral Types April School of Computer Science

Plural and : Protocols in Practice. Jonathan Aldrich Workshop on Behavioral Types April School of Computer Science Plural and : Protocols in Practice Jonathan Aldrich Workshop on Behavioral Types April 2011 School of Computer Science Empirical Study: Protocols in Java Object Protocol [Beckman, Kim, & A to appear in

More information

A Type System for Regular Expressions

A Type System for Regular Expressions A Type System for Regular Expressions Eric Spishak A senior thesis submitted in partial fulfillment of the requirements for the degree of Bachelor of Science With Departmental Honors Computer Science &

More information

David Glasser Michael D. Ernst CSAIL, MIT

David Glasser Michael D. Ernst CSAIL, MIT static dynamic intraprocedural interprocedural Shay Artzi, Adam Kiezun, David Glasser Michael D. Ernst CSAIL, MIT Parameter P of method M is: Mutable if some execution of M can change the state of P s

More information

Combined Static and Dynamic Mutability Analysis 1/31

Combined Static and Dynamic Mutability Analysis 1/31 Combined Static and Dynamic Mutability Analysis SHAY ARTZI, ADAM KIEZUN, DAVID GLASSER, MICHAEL D. ERNST ASE 2007 PRESENTED BY: MENG WU 1/31 About Author Program Analysis Group, Computer Science and Artificial

More information

Learning from Executions

Learning from Executions Learning from Executions Dynamic analysis for program understanding and software engineering Michael D. Ernst and Jeff H. Perkins November 7, 2005 Tutorial at ASE 2005 Outline What is dynamic analysis?

More information

Outlook on Composite Type Labels in User-Defined Type Systems

Outlook on Composite Type Labels in User-Defined Type Systems 34 (2017 ) Outlook on Composite Type Labels in User-Defined Type Systems Antoine Tu Shigeru Chiba This paper describes an envisioned implementation of user-defined type systems that relies on a feature

More information

Status Report. JSR-305: Annotations for Software Defect Detection. William Pugh Professor

Status Report. JSR-305: Annotations for Software Defect Detection. William Pugh Professor JSR-305: Annotations for Software Defect Detection William Pugh Professor Status Report Univ. of Maryland pugh@cs.umd.edu http://www.cs.umd.edu/~pugh/ 1 This JSR is under active development Slides have

More information

Lightweight Verification of Array Indexing

Lightweight Verification of Array Indexing Lightweight Verification of Array Indexing Martin Kellogg*, Vlastimil Dort**, Suzanne Millstein*, Michael D. Ernst* * University of Washington, Seattle ** Charles University, Prague The problem: unsafe

More information

Today Program Analysis for finding bugs, especially security bugs problem specification motivation approaches remaining issues

Today Program Analysis for finding bugs, especially security bugs problem specification motivation approaches remaining issues Finding Bugs Last time Run-time reordering transformations Today Program Analysis for finding bugs, especially security bugs problem specification motivation approaches remaining issues CS553 Lecture Finding

More information

Semantic Analysis Type Checking

Semantic Analysis Type Checking Semantic Analysis Type Checking Maryam Siahbani CMPT 379 * Slides are modified version of Schwarz s compiler course at Stanford 4/8/2016 1 Type Checking Type errors arise when operations are performed

More information

JML and Java 1.5+ David R. Cok Eastman Kodak Company, Research Laboratories 9 October 2008 SAVCBS08 workshop

JML and Java 1.5+ David R. Cok Eastman Kodak Company, Research Laboratories 9 October 2008 SAVCBS08 workshop JML and Java 1.5+ David R. Cok Eastman Kodak Company, Research Laboratories 9 October 2008 SAVCBS08 workshop Java 1.5 was a big step (in 2004) Tools built on or for Java had to make a considerable infrastructure

More information

proceedings (OOPSLA 2009 and POPL 2011). As to that work only, the following notice applies: Copyright

proceedings (OOPSLA 2009 and POPL 2011). As to that work only, the following notice applies: Copyright c 2010 Robert L. Bocchino Jr. Chapters 3 and 5 are derived from work published in ACM conference proceedings (OOPSLA 2009 and POPL 2011). As to that work only, the following notice applies: Copyright c

More information

JSR-305: Annotations for Software Defect Detection

JSR-305: Annotations for Software Defect Detection JSR-305: Annotations for Software Defect Detection William Pugh Professor Univ. of Maryland pugh@cs.umd.edu http://www.cs.umd.edu/~pugh/ 1 Why annotations? Static analysis can do a lot can even analyze

More information

The Mezzo case. Jonathan Protzenko. François Pottier FSFMA'13. Why design a new programming language?

The Mezzo case. Jonathan Protzenko. François Pottier FSFMA'13. Why design a new programming language? Why design a new programming language? The Mezzo case François Pottier francois.pottier@inria.fr Jonathan Protzenko jonathan.protzenko@inria.fr INRIA FSFMA'13 Jonathan Protzenko (INRIA) The Mezzo language

More information

A Field Study in Static Extraction of Runtime Architectures

A Field Study in Static Extraction of Runtime Architectures A Field Study in Static Extraction of Runtime Architectures Marwan Abi-Antoun Jonathan Aldrich School of Computer Science Carnegie Mellon University Acknowledgements SIGSOFT CAPS for travel funding LogicBlox

More information

Defining a High-Level Programming Model for Emerging NVRAM Technologies

Defining a High-Level Programming Model for Emerging NVRAM Technologies Defining a High-Level Programming Model for Emerging NVRAM Technologies Thomas Shull, Jian Huang, Josep Torrellas University of Illinois at Urbana-Champaign September 13, 2018 Shull et al. Defining a High-Level

More information

Automatic Generation of Program Specifications

Automatic Generation of Program Specifications Automatic Generation of Program Specifications Jeremy Nimmer MIT Lab for Computer Science http://pag.lcs.mit.edu/ Joint work with Michael Ernst Jeremy Nimmer, page 1 Synopsis Specifications are useful

More information

Inferring Method Effect Summaries for Nested Heap Regions

Inferring Method Effect Summaries for Nested Heap Regions Inferring Method Effect Summaries for Nested Heap Regions Mohsen Vakilian, Danny Dig, Robert Bocchino, Jeffrey Overbey, Vikram Adve, Ralph Johnson University of Illinois at Urbana-Champaign Urbana, IL

More information

SEMANTIC ANALYSIS TYPES AND DECLARATIONS

SEMANTIC ANALYSIS TYPES AND DECLARATIONS SEMANTIC ANALYSIS CS 403: Type Checking Stefan D. Bruda Winter 2015 Parsing only verifies that the program consists of tokens arranged in a syntactically valid combination now we move to check whether

More information

Preventing Errors Before They Happen The Checker Framework

Preventing Errors Before They Happen The Checker Framework Preventing Errors Before They Happen The Checker Framework http://checkerframework.org/ Twitter: @CheckerFrmwrk Live demo: http://eisop.uwaterloo.ca/live Werner Dietl, University of Waterloo Michael Ernst,

More information

Eclipse and Java 8. Daniel Megert Platform and JDT Lead Eclipse PMC Member IBM Rational Zurich Research Lab

Eclipse and Java 8. Daniel Megert Platform and JDT Lead Eclipse PMC Member IBM Rational Zurich Research Lab Eclipse and Java 8 Daniel Megert Platform and JDT Lead Eclipse PMC Member IBM Rational Zurich Research Lab Eclipse and Java 8 New Java language features Eclipse features for Java 8 (demo) Behind the scenes

More information

Dynamic Inference of Abstract Types

Dynamic Inference of Abstract Types Dynamic Inference of Abstract Types Philip J. Guo, Jeff H. Perkins, Stephen McCamant, Michael D. Ernst Computer Science and A.I. Lab Massachusetts Institute of Technology Declared types // Order cost =

More information

CS 430 Spring Mike Lam, Professor. Data Types and Type Checking

CS 430 Spring Mike Lam, Professor. Data Types and Type Checking CS 430 Spring 2015 Mike Lam, Professor Data Types and Type Checking Type Systems Type system Rules about valid types, type compatibility, and how data values can be used Benefits of a robust type system

More information

5) Attacker causes damage Different to gaining control. For example, the attacker might quit after gaining control.

5) Attacker causes damage Different to gaining control. For example, the attacker might quit after gaining control. Feb 23, 2009 CSE, 409/509 Mitigation of Bugs, Life of an exploit 1) Bug inserted into code 2) Bug passes testing 3) Attacker triggers bug 4) The Attacker gains control of the program 5) Attacker causes

More information

Test Factoring: Focusing test suites on the task at hand

Test Factoring: Focusing test suites on the task at hand Test Factoring: Focusing test suites on the task at hand, MIT ASE 2005 1 The problem: large, general system tests My test suite One hour Where I changed code Where I broke code How can I get: Quicker feedback?

More information

Empirical Studies on the Security and Usability Impact of Immutability

Empirical Studies on the Security and Usability Impact of Immutability Empirical Studies on the Security and Usability Impact of Immutability Sam Weber (NYU), Michael Coblenz (CMU), Brad Myers (CMU), Jonathan Aldrich (CMU), Joshua Sunshine (CMU) Acknowledgements This research

More information

ESC/Java2 Use and Features

ESC/Java2 Use and Features ESC/Java2 Use and Features The ESC/Java2 tool David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2

More information

The$credit$for$crea-ng$these$slides$belongs$to$ Fall$2014$CS$521/621$students.$$Student$names$ have$been$removed$per$ferpa$regula-ons.

The$credit$for$crea-ng$these$slides$belongs$to$ Fall$2014$CS$521/621$students.$$Student$names$ have$been$removed$per$ferpa$regula-ons. The$credit$for$crea-ng$these$slides$belongs$to$ Fall$2014$CS$521/621$students.$$Student$names$ have$been$removed$per$ferpa$regula-ons.$ Refactoring With Synthesis Refactoring and Synthesis Refactoring

More information

ESC/Java2 Use and Features

ESC/Java2 Use and Features ESC/Java2 Use and Features David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2 & JML Tutorial

More information

Advances in Programming Languages

Advances in Programming Languages O T Y H Advances in Programming Languages APL8: ESC/Java2 David Aspinall (including slides by Ian Stark and material adapted from ESC/Java2 tutorial by David Cok, Joe Kiniry and Erik Poll) School of Informatics

More information

The Checker Framework Manual

The Checker Framework Manual The Checker Framework Manual http://pag.csail.mit.edu/jsr308/ Version 0.9.6 (29 Jul 2009) For the impatient: Section 1.2 describes how to install and use pluggable type-checkers. Contents 1 Introduction

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Values and Types We divide the universe of values according to types A type is a set of values and

More information

Lecture Overview. [Scott, chapter 7] [Sebesta, chapter 6]

Lecture Overview. [Scott, chapter 7] [Sebesta, chapter 6] 1 Lecture Overview Types 1. Type systems 2. How to think about types 3. The classification of types 4. Type equivalence structural equivalence name equivalence 5. Type compatibility 6. Type inference [Scott,

More information

Preventing Errors Before They Happen The Checker Framework

Preventing Errors Before They Happen The Checker Framework Preventing Errors Before They Happen The Checker Framework http://checkerframework.org/ Twitter: @CheckerFrmwrk Live demo: http://checkerframework.org/live/ Werner Dietl, University of Waterloo Michael

More information

ADVANCED SOFTWARE ENGINEERING CS561 Danny Dig

ADVANCED SOFTWARE ENGINEERING CS561 Danny Dig ADVANCED SOFTWARE ENGINEERING CS561 TUE/THU @4PM, Danny Dig QUIZ #1 - Write down your name - Grad Program (e.g., EECS PhD, EECS MS) and year of study - What are your expectations from the class? 2 Software

More information

Playing Cupid: The IDE as a Matchmaker for Plug-Ins

Playing Cupid: The IDE as a Matchmaker for Plug-Ins Playing Cupid: The IDE as a Matchmaker for Plug-Ins Todd W. Schiller and Brandon Lucia Department of Computer Science University of Washington Seattle, Washington {tws,blucia0a}@cs.washington.edu Abstract

More information

Automated Documentation Inference to Explain Failed Tests

Automated Documentation Inference to Explain Failed Tests Automated Documentation Inference to Explain Failed Tests Sai Zhang University of Washington Joint work with: Cheng Zhang, Michael D. Ernst A failed test reveals a potential bug Before bug-fixing, programmers

More information

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data. Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting

More information

Step 2: Map ER Model to Tables

Step 2: Map ER Model to Tables Step 2: Map ER Model to Tables Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept of Computer Engineering Khon Kaen University Overview How to map a set of tables from an ER model How to

More information

Putting the Checks into Checked C. Archibald Samuel Elliott Quals - 31st Oct 2017

Putting the Checks into Checked C. Archibald Samuel Elliott Quals - 31st Oct 2017 Putting the Checks into Checked C Archibald Samuel Elliott Quals - 31st Oct 2017 Added Runtime Bounds Checks to the Checked C Compiler 2 C Extension for Spatial Memory Safety Added Runtime Bounds Checks

More information

Type Checking and Type Equality

Type Checking and Type Equality Type Checking and Type Equality Type systems are the biggest point of variation across programming languages. Even languages that look similar are often greatly different when it comes to their type systems.

More information

26.1 Introduction Programming Preliminaries... 2

26.1 Introduction Programming Preliminaries... 2 Department of Computer Science Tackling Design Patterns Chapter 27: Proxy Design Pattern Copyright c 2016 by Linda Marshall and Vreda Pieterse. All rights reserved. Contents 26.1 Introduction.................................

More information

Java Modeling Language (JML)

Java Modeling Language (JML) CIS 771: Software Specifications Introduction to JML Java Modeling Language (JML) A behavioral interface specification language for Java supporting design-by-contract (DBC)... invented by Gary T. Leavens

More information

ASaP: Annotations for Safe Parallelism in Clang. Alexandros Tzannes, Vikram Adve, Michael Han, Richard Latham

ASaP: Annotations for Safe Parallelism in Clang. Alexandros Tzannes, Vikram Adve, Michael Han, Richard Latham ASaP: Annotations for Safe Parallelism in Clang Alexandros Tzannes, Vikram Adve, Michael Han, Richard Latham Motivation Debugging parallel code is hard!! Many bugs are hard to reason about & reproduce

More information

Whidbey Enhancements to C# Jeff Vaughan MSBuild Team July 21, 2004

Whidbey Enhancements to C# Jeff Vaughan MSBuild Team July 21, 2004 Whidbey Enhancements to C# Jeff Vaughan MSBuild Team July 21, 2004 Outline Practical Partial types Static classes Extern and the namespace alias qualifier Cool (and practical too) Generics Nullable Types

More information

The Design Complexity of Program Undo Support in a General Purpose Processor. Radu Teodorescu and Josep Torrellas

The Design Complexity of Program Undo Support in a General Purpose Processor. Radu Teodorescu and Josep Torrellas The Design Complexity of Program Undo Support in a General Purpose Processor Radu Teodorescu and Josep Torrellas University of Illinois at Urbana-Champaign http://iacoma.cs.uiuc.edu Processor with program

More information

Parallel Programming Must Be Deterministic by Default

Parallel Programming Must Be Deterministic by Default Parallel Programming Must Be Deterministic by Default Robert L. Bocchino Jr., Vikram S. Adve, Sarita V. Adve and Marc Snir University of Illinois at Urbana-Champaign {bocchino,vadve,sadve,snir}@illinois.edu

More information

192. Design Patterns in Java Software

192. Design Patterns in Java Software 192. Design Patterns in Java Software Version 5.0 This course seeks to develop, for the experienced Java programmer, a strong, shared vocabulary of design patterns and best practices. The course begins

More information

Object Ownership in Program Verification

Object Ownership in Program Verification Object Ownership in Program Verification Werner Dietl 1 and Peter Müller 2 1 University of Washington wmdietl@cs.washington.edu 2 ETH Zurich peter.mueller@inf.ethz.ch Abstract. Dealing with aliasing is

More information

Tecniche di Progettazione: Design Patterns

Tecniche di Progettazione: Design Patterns Tecniche di Progettazione: Design Patterns GoF: Composite 1 Composite pattern Intent Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects

More information

Compilers and computer architecture: Semantic analysis

Compilers and computer architecture: Semantic analysis 1 / 1 Compilers and computer architecture: Semantic analysis Martin Berger Alex Jeffery October 2018 Recall the function of compilers 2 / 1 3 / 1 Recall the structure of compilers Source program Lexical

More information

Static Analysis methods and tools An industrial study. Pär Emanuelsson Ericsson AB and LiU Prof Ulf Nilsson LiU

Static Analysis methods and tools An industrial study. Pär Emanuelsson Ericsson AB and LiU Prof Ulf Nilsson LiU Static Analysis methods and tools An industrial study Pär Emanuelsson Ericsson AB and LiU Prof Ulf Nilsson LiU Outline Why static analysis What is it Underlying technology Some tools (Coverity, KlocWork,

More information

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM).

Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). Question 1 Essay Question: Explain 4 different means by which constrains are represented in the Conceptual Data Model (CDM). By specifying participation conditions By specifying the degree of relationship

More information

0/38. Detecting Invariants. Andreas Zeller + Andreas Gross. Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken

0/38. Detecting Invariants. Andreas Zeller + Andreas Gross. Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken 0/38 Detecting Invariants Andreas Zeller + Andreas Gross Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken Exam 1/38 on Tuesday, 2003-02-18, 11:15 in lecture room 45/001 (here) Written

More information

Principles of Software Construction: Objects, Design, and Concurrency

Principles of Software Construction: Objects, Design, and Concurrency Principles of Software Construction: Objects, Design, and Concurrency Part 3: Design case studies Performance Charlie Garrod Michael Hilton School of Computer Science 1 Administriva Homework 4b due Thursday,

More information

Ruby: Objects and Dynamic Types

Ruby: Objects and Dynamic Types Ruby: Objects and Dynamic Types Computer Science and Engineering College of Engineering The Ohio State University Lecture 5 Primitive vs Reference Types Recall Java type dichotomy: Primitive: int, float,

More information

Static Analysis. Principles of Software System Construction. Jonathan Aldrich. Some slides from Ciera Jaspan

Static Analysis. Principles of Software System Construction. Jonathan Aldrich. Some slides from Ciera Jaspan Static Analysis Principles of Software System Jonathan Aldrich Some slides from Ciera Jaspan Find the Bug! Source: Engler et al., Checking System Rules Using System-Specific, Programmer-Written Compiler

More information

Using null type annotations in practice

Using null type annotations in practice Using null type annotations in practice Till Brychcy, Mercateo What they are, why and when to use them @Nullable vs. java.util.optional Configuration choices Switching from declaration annotations to type

More information

Aspect Refactoring Verifier

Aspect Refactoring Verifier Aspect Refactoring Verifier Charles Zhang and Julie Waterhouse Hans-Arno Jacobsen Centers for Advanced Studies Department of Electrical and IBM Toronto Lab Computer Engineering juliew@ca.ibm.com and Department

More information

Finding User/Kernel Pointer Bugs with Type Inference p.1

Finding User/Kernel Pointer Bugs with Type Inference p.1 Finding User/Kernel Pointer Bugs with Type Inference Rob Johnson David Wagner rtjohnso,daw}@cs.berkeley.edu. UC Berkeley Finding User/Kernel Pointer Bugs with Type Inference p.1 User/Kernel Pointer Bugs

More information

Moving Fast with High Reliability: Program Analysis at Uber

Moving Fast with High Reliability: Program Analysis at Uber Moving Fast with High Reliability: Program Analysis at Uber Manu Sridharan Software Reliability Workshop ETH Zurich OCTOBER 14, 2017 Uber Apps Rider Driver Eats ios and Android Uber Apps Rider Driver Eats

More information

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

(800) Toll Free (804) Fax   Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days Course Description This course introduces the Java programming language and how to develop Java applications using Eclipse 3.0. Students learn the syntax of the Java programming language, object-oriented

More information

Javari: Adding Reference Immutability to Java. Matthew S. Tschantz

Javari: Adding Reference Immutability to Java. Matthew S. Tschantz Javari: Adding Reference Immutability to Java by Matthew S. Tschantz Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree

More information

CITS1001 week 4 Grouping objects

CITS1001 week 4 Grouping objects CITS1001 week 4 Grouping objects Arran Stewart March 20, 2018 1 / 31 Overview In this lecture, we look at how can group objects together into collections. Main concepts: The ArrayList collection Processing

More information

A Case For. Binary Component Adaptation. Motivation. The Integration Problem. Talk Outline. Using Wrapper Classes. The Interface Evolution Problem

A Case For. Binary Component Adaptation. Motivation. The Integration Problem. Talk Outline. Using Wrapper Classes. The Interface Evolution Problem Case For inary Modifying s On The Fly Urs Hölzle and Ralph Keller Department of Computer Science University of California, Santa arbara http://www.cs.ucsb.edu/oocsb/bca Motivation OOP vision: Pervasive

More information

Quickly Detecting Relevant Program Invariants

Quickly Detecting Relevant Program Invariants Quickly Detecting Relevant Program Invariants Michael Ernst, Adam Czeisler, Bill Griswold (UCSD), and David Notkin University of Washington http://www.cs.washington.edu/homes/mernst/daikon Michael Ernst,

More information

Class object initialization block destructor Class object

Class object initialization block destructor Class object In this segment, I will review the Java statements and primitives that relate explicitly to Object Oriented Programming. I need to re-enforce Java s commitment to OOP. Unlike C++, there is no way to build

More information

Topic 9: Type Checking

Topic 9: Type Checking Recommended Exercises and Readings Topic 9: Type Checking From Haskell: The craft of functional programming (3 rd Ed.) Exercises: 13.17, 13.18, 13.19, 13.20, 13.21, 13.22 Readings: Chapter 13.5, 13.6 and

More information

Topic 9: Type Checking

Topic 9: Type Checking Topic 9: Type Checking 1 Recommended Exercises and Readings From Haskell: The craft of functional programming (3 rd Ed.) Exercises: 13.17, 13.18, 13.19, 13.20, 13.21, 13.22 Readings: Chapter 13.5, 13.6

More information

Sound and Extensible Renaming for Java

Sound and Extensible Renaming for Java Sound and Extensible Renaming for Java Max Schäfer, Torbjörn Ekman, Oege de Moor Daniel Gąsienica Software Engineering Seminar May 12, 2009 What Is Refactoring? To rewrite existing source code in order

More information

State Extensions for Java PathFinder

State Extensions for Java PathFinder State Extensions for Java PathFinder Darko Marinov University of Illinois at Urbana-Champaign JPF Workshop May 1, 2008 Broader Context: Work on JPF at UIUC Two lines of work Extend functionality Improve

More information

Types and Type Inference

Types and Type Inference CS 242 2012 Types and Type Inference Notes modified from John Mitchell and Kathleen Fisher Reading: Concepts in Programming Languages, Revised Chapter 6 - handout on Web!! Outline General discussion of

More information

DeAliaser: Alias Speculation Using Atomic Region Support

DeAliaser: Alias Speculation Using Atomic Region Support DeAliaser: Alias Speculation Using Atomic Region Support Wonsun Ahn*, Yuelu Duan, Josep Torrellas University of Illinois at Urbana Champaign http://iacoma.cs.illinois.edu Memory Aliasing Prevents Good

More information

COL728 Minor2 Exam Compiler Design Sem II, Answer all 5 questions Max. Marks: 20

COL728 Minor2 Exam Compiler Design Sem II, Answer all 5 questions Max. Marks: 20 COL728 Minor2 Exam Compiler Design Sem II, 2017-18 Answer all 5 questions Max. Marks: 20 1. Short questions a. Give an example of a program that is not a legal program if we assume static scoping, but

More information

Static Semantics. Winter /3/ Hal Perkins & UW CSE I-1

Static Semantics. Winter /3/ Hal Perkins & UW CSE I-1 CSE 401 Compilers Static Semantics Hal Perkins Winter 2009 2/3/2009 2002-09 Hal Perkins & UW CSE I-1 Agenda Static semantics Types Symbol tables General ideas for now; details later for MiniJava project

More information

Equality. Michael Ernst. CSE 331 University of Washington

Equality. Michael Ernst. CSE 331 University of Washington Equality Michael Ernst CSE 331 University of Washington Object equality A simple idea Two objects are equal if they have the same value A subtle idea intuition can be misleading Same object/reference,

More information

JFlow: Practical Mostly-Static Information Flow Control

JFlow: Practical Mostly-Static Information Flow Control JFlow: Practical Mostly-Static Information Flow Control A.Myers and B.Liskov. A Decentralized Model for Information Flow Control (SOSP 1997). Andrew C. Myers and Barbara Liskov. Protecting privacy using

More information

Data and Knowledge Management Dr. Rick Jerz

Data and Knowledge Management Dr. Rick Jerz Data and Knowledge Management Dr. Rick Jerz 1 Goals Define big data and discuss its basic characteristics Understand ways to store information Understand the value of a Database Management System Explain

More information

Clang Static Analyzer Documentation

Clang Static Analyzer Documentation Clang Static Analyzer Documentation Release 6 Analyzer Team Aug 13, 2018 Contents 1 Debug Checks 3 1.1 General Analysis Dumpers........................................ 3 1.2 Path Tracking...............................................

More information

Program Verification (6EC version only)

Program Verification (6EC version only) Program Verification (6EC version only) Erik Poll Digital Security Radboud University Nijmegen Overview Program Verification using Verification Condition Generators JML a formal specification language

More information

Speculative Synchronization

Speculative Synchronization Speculative Synchronization José F. Martínez Department of Computer Science University of Illinois at Urbana-Champaign http://iacoma.cs.uiuc.edu/martinez Problem 1: Conservative Parallelization No parallelization

More information

CSE 303: Concepts and Tools for Software Development

CSE 303: Concepts and Tools for Software Development CSE 303: Concepts and Tools for Software Development Hal Perkins Winter 2009 Lecture 7 Introduction to C: The C-Level of Abstraction CSE 303 Winter 2009, Lecture 7 1 Welcome to C Compared to Java, in rough

More information

TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript

TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript Michael Pradel 1, Parker Schuh 2, Koushik Sen 2 1 TU Darmstadt, 2 UC Berkeley 1 Motivation JavaScript: Dynamic and permissive Problems remain

More information

Chapter 13: Reference. Why reference Typing Evaluation Store Typings Safety Notes

Chapter 13: Reference. Why reference Typing Evaluation Store Typings Safety Notes Chapter 13: Reference Why reference Typing Evaluation Store Typings Safety Notes References Computational Effects Also known as side effects. A function or expression is said to have a side effect if,

More information

Refactoring for Immutability

Refactoring for Immutability Refactoring for Immutability Fredrik Berg Kjolstad Danny Dig Gabriel Acevedo Marc Snir University of Illinois Urbana-Champaign, USA {kjolsta1,dig,acevedo7,snir}@illinois.edu Abstract It is common for Object-Oriented

More information

Synchronization SPL/2010 SPL/20 1

Synchronization SPL/2010 SPL/20 1 Synchronization 1 Overview synchronization mechanisms in modern RTEs concurrency issues places where synchronization is needed structural ways (design patterns) for exclusive access 2 Overview synchronization

More information

Copyright 2014 Todd Wademan Schiller

Copyright 2014 Todd Wademan Schiller Copyright 2014 Todd Wademan Schiller Reducing the Usability Barrier to Specification and Verification Todd Wademan Schiller A dissertation submitted in partial fulfillment of the requirements for the

More information

CS 6V Program Analysis I: Dynamic Detection of Likely Invariants and Robust Signatures for Kernel Data Structure.

CS 6V Program Analysis I: Dynamic Detection of Likely Invariants and Robust Signatures for Kernel Data Structure. CS 6V81-05 Program Analysis I: Dynamic Detection of Likely Invariants and Robust Signatures for Kernel Data Structure Junyuan Zeng Department of Computer Science The University of Texas at Dallas November

More information

NAME CHSM-Java Concurrent, Hierarchical, Finite State Machine specification language for Java

NAME CHSM-Java Concurrent, Hierarchical, Finite State Machine specification language for Java NAME CHSM-Java Concurrent, Hierarchical, Finite State Machine specification language for Java SYNOPSIS declarations description user-code DESCRIPTION The CHSM specification language is a text-based means

More information

Improving Usability of Refactoring Tools

Improving Usability of Refactoring Tools Improving Usability of Refactoring Tools Emerson Murphy Hill, Portland State University, emerson@cs.pdx.edu Abstract Refactoring is the process of changing the structure of code without changing its behavior.

More information

A Parameterized Type System for Race-Free Java Programs

A Parameterized Type System for Race-Free Java Programs A Parameterized Type System for Race-Free Java Programs Chandrasekhar Boyapati Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology {chandra, rinard@lcs.mit.edu Data races

More information

Week 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion

Week 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion Week 2: The Clojure Language Background Basic structure A few of the most useful facilities A modernized Lisp Review of Lisp's origins and development Why did Lisp need to be modernized? Relationship to

More information