Leveraging Test Generation and Specification Mining for Automated Bug Detection without False Positives
|
|
- Lynn Richard
- 5 years ago
- Views:
Transcription
1 Leveraging Test Generation and Specification Mining for Automated Bug Detection without False Positives Michael Pradel and Thomas R. Gross Department of Computer Science ETH Zurich 1
2 Motivation API usage Class X API 2
3 Motivation API usage Client Class X API 2
4 Motivation API usage Client Class X API X must ensure safe API usage 2
5 Example from Apache Xalan class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); 3
6 Example from Apache Xalan Stack has a... class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); 3
7 Example from Apache Xalan Stack has a but X fails to ensure it: class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); X x = new X(); x.report(); EmptyStackException 3
8 Unsafe API Usage API usage Client Class X API 4
9 Unsafe API Usage API usage Client Class X API exception 4
10 Unsafe API Usage API usage Client Class X API exception exception Unsafe API usage: X exposes client to unexpected exception 4
11 Unsafe API Usage API usage Client Class X exception exception API How to find unsafe API usages? Unsafe API usage: X exposes client to unexpected exception 4
12 Goal Program Tool Unsafe API usages 5
13 Goal Program Tool Unsafe API usages Automatic and precise bug detection 5
14 Goal Tests Program Formal specs Tool Unsafe API usages False positives Automatic and precise bug detection 5
15 State of the Art (1) (Tests) Program Anomaly detection Unsafe API usages False positives Nguyen et al. 09 Wasylkowski + Zeller 09 Thummalapenta + Xie 09 Monperrus et al. 10 Gabel + Su 10 6
16 State of the Art (2) Program Formal specs Type state checking Unsafe API usages False positives DeLine + Fähndrich 04 Bierhoff + Aldrich 07 Fink et al. 08 Naeem + Lhotak 08 Bodden 10 7
17 State of the Art (3) Program Static code checker (Unsafe API usages) False positives FindBugs PMD 8
18 Goal Program Tool Unsafe API usages Automatic and precise bug detection 9
19 Approach Test generation Dynamic mining Runtime verification 10
20 Approach Test generation Dynamic mining Runtime verification provides s requires input to run program 10
21 Approach Test generation Dynamic mining Runtime verification provides s requires input to run program finds violations requires s and input 10
22 Approach Test generation provides input requires test oracle to find bugs Dynamic mining Runtime verification provides s requires input to run program finds violations requires s and input 10
23 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 10
24 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 10
25 Test Generation Feedback-directed, random test generation [Randoop, Pacheco2007] Two kinds of tests: class Test {... Failing (exception or assertion violation) class Test {... Passing 11
26 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 12
27 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 12
28 Protocol Mining class Test {... Execution trace Dynamic mining API usage [ASE 09 and ICSM 10, Pradel et al.] 13
29 Example new Stack() s s.push() s.push() s.pop() s.peek() s.removeallelements() 14
30 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 15
31 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 15
32 Runtime Protocol Verification class Test {... Execution trace Runtime verification Protocol violations Check all instances of Warn if non-existing transition is taken 16
33 Example Test: X x = new X(); x.report(); class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() 17
34 Example Test: X x = new X(); x.report(); class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() 17
35 Example Test: X x = new X(); x.report(); class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() 17
36 Example Test: X x = new X(); x.report(); Protocol violation class X { private Stack s = new Stack(); public String report() { return get().tostring(); private Object get() { s.peek(); new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() 17
37 False Positives Challenge: Incomplete s (depend on mining) new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() 18
38 False Positives Challenge: Incomplete s (depend on mining) new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() Program: Stack s = new Stack(); s.push(..); s.push(..); 18
39 False Positives Challenge: Incomplete s (depend on mining) new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() Program: Stack s = new Stack(); s.push(..); s.push(..); False positive violation 18
40 False Positives Challenge: Incomplete s (depend on mining) new Stack() s.push() Protocol s 1 2 violation 3 Bug s.pop() s.removeallelements() s.push() s.peek() Program: Stack s = new Stack(); s.push(..); s.push(..); False positive violation 18
41 Warnings without False Positives Protocol violation Program crash Undeclared exception 19
42 Warnings without False Positives Protocol violation Program crash May be due to incomplete Undeclared exception 19
43 Warnings without False Positives Protocol violation Program crash May be due to illegal use of class Undeclared exception 19
44 Warnings without False Positives Protocol violation Program crash Warnings to report Undeclared exception 19
45 Warnings without False Positives (2) Only report problem if: violated and -violating call fails the test and -violating method does not declare the exception 20
46 Example (again) new Stack() s.push() s s.removeallelements() s.push() s.pop() s.peek() Program: Stack s = new Stack(); s.push(..); s.push(..); No warning, since violation doesn t raise exception 21
47 Approach Program Test generation tests tests Dynamic mining s Runtime verification Unsafe API usages 22
48 Evaluation Implemented into fully automatic tool Main questions: 1. Effectiveness in finding unsafe API usages 2. Comparison with existing work 3. Performance 23
49 Setup Programs: DaCapo benchmarks (5,012 classes) APIs: Collection+Iterator Vector+Enumeration including subclasses Stopping criterion: Generate 10,000 tests per program 24
50 Unsafe API Usages 54 unsafe API usages 0 false positives 25
51 Example from Jython public class X { protected Iterator iter; public void _begincanonical() { iter = classes.values().iterator(); public Object _next() { if (iter.hasnext()) return iter.next(); else return null; public void _flushcurrent() { iter.remove(); 26
52 Example from Jython public class X { protected Iterator iter; public void _begincanonical() { iter = classes.values().iterator(); public Object _next() { if (iter.hasnext()) return iter.next(); else return null; public void _flushcurrent() { iter.remove(); 26
53 Example from Jython public class X { protected Iterator iter; public void _begincanonical() { iter = classes.values().iterator(); public Object _next() { if (iter.hasnext()) return iter.next(); else return null; public void _flushcurrent() { iter.remove(); Safe API usage 26
54 Example from Jython public class X { protected Iterator iter; public void _begincanonical() { iter = classes.values().iterator(); public Object _next() { if (iter.hasnext()) return iter.next(); else return null; public void _flushcurrent() { iter.remove(); Protocol violation Crash through exception Not declared 26
55 Kinds of Bugs Diverse kinds of unsafe API usages Invalid indexing of lists and vectors Iterators: Illegal next() and remove() Accessing non-existing elements: E.g., pop() All unsafe API usages for download: 27
56 Comparison with Prior Work JDK-API usage in DaCapo: OCD [Gabel+Su, ICSE 10] Our approach 1 potential bug 54 crashing bugs 2 false positives 0 false positives 28
57 Comparison with Prior Work JDK-API usage in DaCapo: OCD [Gabel+Su, ICSE 10] Our approach 1 potential bug 54 crashing bugs 2 false positives 0 false positives DaCapo input vs. generated input 28
58 Comparison with Prior Work JDK-API usage in DaCapo: OCD [Gabel+Su, ICSE 10] Our approach 1 potential bug 54 crashing bugs 2 false positives 0 false positives Avoid false positives by construction 28
59 Performance Between less then a minute and several minutes per program-api pair Optimization: Find bugs with 5x less tests Static analysis: Prioritize methods Guide random test generator towards API-relevant parts of program 29
60 Summary Program Automatic and precise analysis Unsafe API usages Benefits of dynamic analysis without providing input Find bugs with mined specifications without false positives Guide test generator towards API 30
61 Conclusion Don t waste precious developer time Lots of testing with little effort Photo: Alfonso Silóniz 31
62 Leveraging Test Generation and Specification Mining for Automated Bug Detection without False Positives Michael Pradel, Thomas R. Gross Department of Computer Science ETH Zurich Thank you! 32
Large-Scale API Protocol Mining for Automated Bug Detection
Large-Scale API Protocol Mining for Automated Bug Detection Michael Pradel Department of Computer Science ETH Zurich 1 Motivation LinkedList pinconnections =...; Iterator i = pinconnections.iterator();
More informationFully Automatic and Precise Detection of Thread Safety Violations
Fully Automatic and Precise Detection of Thread Safety Violations Michael Pradel and Thomas R. Gross Department of Computer Science ETH Zurich 1 Motivation Thread-safe classes: Building blocks for concurrent
More informationAutomatic Testing of Sequential and Concurrent Substitutability
Automatic Testing of Sequential and Concurrent Substitutability Michael Pradel and Thomas R. Gross Department of Computer Science ETH Zurich 1 Motivation void bar(foo f) { f.m();... } bar() expects functionality
More informationMining Operational Preconditions. Andrzej Wasylkowski Andreas Zeller Saarland University
Mining Operational Preconditions Andrzej Wasylkowski Andreas Zeller Saarland University @interface A {} bug.aj aspect Test { declare @field : @A int var* : @A; declare @field : int var* : @A; interface
More informationStatically Checking API Protocol Conformance with Mined Multi-Object Specifications
Statically Checking API Protocol Conformance with Mined Multi-Object Specifications Michael Pradel Department of Computer Science ETH Zurich, Switzerland Ciera Jaspan Jonathan Aldrich Institute for Software
More informationHow Good Are the Specs?
How Good Are the Specs? A Study of the Bug-Finding Effectiveness of Existing Java API Specifications Owolabi Legunsen, Wajih Ul Hassan, Xinyue Xu Grigore Rosu and Darko Marinov ASE 2016 Singapore, Singapore
More informationStatic Detection of Brittle Parameter Typing
Static Detection of Brittle Parameter Typing Michael Pradel, Severin Heiniger, and Thomas R. Gross Department of Computer Science ETH Zurich 1 Motivation void m(a a) {... } Object A.. B C D E F 2 Motivation
More informationAutomatic Defect Detection. Andrzej Wasylkowski
Automatic Defect Detection Andrzej Wasylkowski Overview Automatic Defect Detection Horizontal Techniques Specification-checking Techniques Mining-based Techniques Mining Repositories Mining Traces Mining
More informationStatic program checking and verification
Chair of Software Engineering Software Engineering Prof. Dr. Bertrand Meyer March 2007 June 2007 Slides: Based on KSE06 With kind permission of Peter Müller Static program checking and verification Correctness
More informationPrinciples of Software Construction: Objects, Design, and Concurrency (Part 2: Designing (Sub )Systems)
Principles of Software Construction: Objects, Design, and Concurrency (Part 2: Designing (Sub )Systems) More Analysis for Functional Correctness Jonathan Aldrich Charlie Garrod School of Computer Science
More informationFeedback-directed Random Test Generation
Feedback-directed Random Test Generation (ICSE 07 with minor edits) Carlos Pacheco Shuvendu Lahiri Michael Ernst Thomas Ball MIT Microsoft Research Random testing Select inputs at random from a program
More informationTypestate Checking for Actionscript 3
Typestate Checking for Actionscript 3 Yun-En Liu and Qi Shan December 10, 2010 1 Introduction This project proposes a compile-time check for function calls in a game system written in Actionscript 3, based
More informationFULLY AUTOMATIC AND PRECISE DETECTION OF THREAD SAFETY VIOLATIONS
FULLY AUTOMATIC AND PRECISE DETECTION OF THREAD SAFETY VIOLATIONS PLDI 2012 by Michael Pradel and Thomas R. Gross ETH Zurich presented by Martin Aigner University of Salzburg May 2, 2013 OVERVIEW The problem
More informationStatic Analysis in C/C++ code with Polyspace
1 Static Analysis in C/C++ code with Polyspace Yongchool Ryu Application Engineer gary.ryu@mathworks.com 2016 The MathWorks, Inc. 2 Agenda Efficient way to find problems in Software Category of Static
More informationCITS1001 week 4 Grouping objects lecture 2
CITS1001 week 4 Grouping objects lecture 2 Arran Stewart March 29, 2018 1 / 37 Overview Last lecture, we looked at how we can group objects together into collections We looked at the ArrayList class. This
More informationMEMORY MANAGEMENT TEST-CASE GENERATION OF C PROGRAMS USING BOUNDED MODEL CHECKING
FEDERAL UNIVERSITY OF AMAZONAS INSTITUTE OF COMPUTING GRADUATE PROGRAM IN COMPUTER SCIENCE MEMORY MANAGEMENT TEST-CASE GENERATION OF C PROGRAMS USING BOUNDED MODEL CHECKING Herbert Rocha, Raimundo Barreto,
More informationCombined Static and Dynamic Automated Test Generation
Combined Static and Dynamic Automated Test Generation Sai Zhang University of Washington Joint work with: David Saff, Yingyi Bu, Michael D. Ernst 1 Unit Testing for Object-oriented Programs Unit test =
More informationAn Introduction To Software Agitation
An Introduction To Software Agitation Alberto Savoia Chief Technology Officer Agitar Software Inc. www.agitar.com java.sun.com/javaone/sf Agenda The Developer Testing Revolution Four Types of Tests Software
More informationReferences: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 10/14/2004 1
References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 10/14/2004 1 Assertions Statements about input to a routine or state of a class Have two primary roles As documentation,
More informationObject Usage Models. Andrzej Wasylkowski Saarland University
Object Usage Models Andrzej Wasylkowski Saarland University A bug in AspectJ 2 A bug in AspectJ /** * This method looks through the type hierarchy for some target type - it is attempting to * find an existing
More informationJML tool-supported specification for Java Erik Poll Radboud University Nijmegen
JML tool-supported specification for Java Erik Poll Radboud University Nijmegen Erik Poll - JML p.1/41 Overview The specification language JML Tools for JML, in particular runtime assertion checking using
More informationChecked and Unchecked Exceptions in Java
Checked and Unchecked Exceptions in Java Introduction In this article from my free Java 8 course, I will introduce you to Checked and Unchecked Exceptions in Java. Handling exceptions is the process by
More informationAutomatic 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 informationCOMP1008 Exceptions. Runtime Error
Runtime Error COMP1008 Exceptions Unexpected error that terminates a program. Undesirable Not detectable by compiler. Caused by: Errors in the program logic. Unexpected failure of services E.g., file server
More informationMutually Enhancing Test Generation and Specification Inference
Mutually Enhancing Test Generation and Specification Inference Tao Xie David Notkin Department of Computer Science & Engineering University of Washington August 15th, 2003 Foundations of Software Engineering,
More informationCSE 331 Summer 2016 Final Exam. Please wait to turn the page until everyone is told to begin.
Name The exam is closed book, closed notes, and closed electronics. Please wait to turn the page until everyone is told to begin. Score / 54 1. / 12 2. / 12 3. / 10 4. / 10 5. / 10 Bonus: 1. / 6 2. / 4
More informationProfile-Guided Program Simplification for Effective Testing and Analysis
Profile-Guided Program Simplification for Effective Testing and Analysis Lingxiao Jiang Zhendong Su Program Execution Profiles A profile is a set of information about an execution, either succeeded or
More informationAn Empirical Comparison of Automated Generation and Classification Techniques for Object-Oriented Unit Testing
An Empirical Comparison of Automated Generation and Classification Techniques for Object-Oriented Unit Testing Marcelo d Amorim (UIUC) Carlos Pacheco (MIT) Tao Xie (NCSU) Darko Marinov (UIUC) Michael D.
More informationAssertions & Design-by-Contract using JML Erik Poll University of Nijmegen
Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen Erik Poll - JML p.1/39 Overview Assertions Design-by-Contract for Java using JML Contracts and Inheritance Tools for JML Demo
More informationCS558 Programming Languages
CS558 Programming Languages Winter 2017 Lecture 4a Andrew Tolmach Portland State University 1994-2017 Semantics and Erroneous Programs Important part of language specification is distinguishing valid from
More informationAn Introduction to Systematic Software Testing. Robert France CSU
An Introduction to Systematic Software Testing Robert France CSU Why do we need to systematically test software? Poor quality products can Inconvenience direct and indirect users Result in severe financial
More informationAutomatic Repair of Real Bugs in Java: A Large-Scale Experiment on the Defects4J Dataset
Automatic Repair of Real Bugs in Java: A Large-Scale Experiment on the Defects4J Dataset Matias Martinez, Thomas Durieux, Romain Sommerard, Jifeng Xuan, Martin Monperrus 1 Automatic Software Repair Automatic
More informationCS558 Programming Languages
CS558 Programming Languages Fall 2016 Lecture 3a Andrew Tolmach Portland State University 1994-2016 Formal Semantics Goal: rigorous and unambiguous definition in terms of a wellunderstood formalism (e.g.
More informationMotivation. What s the Problem? What Will we be Talking About? What s the Solution? What s the Problem?
1 Checking System Rules Using System-Specific, Programmer-Written Compiler Extensions Dawson Engler Benjamin Chelf Andy Chou Seth Hallem Stanford University Matthew Thornton November 9, 2005 2 Motivation
More informationTHE ROAD NOT TAKEN. Estimating Path Execution Frequency Statically. ICSE 2009 Vancouver, BC. Ray Buse Wes Weimer
ICSE 2009 Vancouver, BC Ray Buse Wes Weimer THE ROAD NOT TAKEN Estimating Path Execution Frequency Statically The Big Idea 2 Developers often have a expectations about common and uncommon cases in programs
More informationA Gentle Introduction to Program Analysis
A Gentle Introduction to Program Analysis Işıl Dillig University of Texas, Austin January 21, 2014 Programming Languages Mentoring Workshop 1 / 24 What is Program Analysis? Very broad topic, but generally
More informationProbabilistic Calling Context
Probabilistic Calling Context Michael D. Bond Kathryn S. McKinley University of Texas at Austin Why Context Sensitivity? Static program location not enough at com.mckoi.db.jdbcserver.jdbcinterface.execquery():213
More informationAnalysiss of Software Artifacts
Analysiss of Software Artifacts : Tool Project 6 th April 2009 The Mappers António Alvim Filipe Pontes Paulo Casanova Pedro Mota Pedro Saraiva Tool Project 1 Introduction...... 3 Tool...... 4 Projects......
More informationCSCE 2014 Final Exam Spring Version A
CSCE 2014 Final Exam Spring 2017 Version A Student Name: Student UAID: Instructions: This is a two-hour exam. Students are allowed one 8.5 by 11 page of study notes. Calculators, cell phones and computers
More informationSemantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End
Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors
More informationAdvanced Programming Methods. Introduction in program analysis
Advanced Programming Methods Introduction in program analysis What is Program Analysis? Very broad topic, but generally speaking, automated analysis of program behavior Program analysis is about developing
More informationLightweight 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 informationProgram 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 informationAutomatic Generation of Oracles for Exceptional Behaviors
Automatic Generation of Oracles for Exceptional Behaviors ISSTA * * Artifact Consistent * Complete * Well Documented * Easy to Reuse * Evaluated * AEC * Alberto Goffi alberto.goffi@usi.ch USI Università
More informationNDSeq: Runtime Checking for Nondeterministic Sequential Specs of Parallel Correctness
EECS Electrical Engineering and Computer Sciences P A R A L L E L C O M P U T I N G L A B O R A T O R Y NDSeq: Runtime Checking for Nondeterministic Sequential Specs of Parallel Correctness Jacob Burnim,
More informationExploiting Synergy Between Testing and Inferred Partial Specifications
Exploiting Synergy Between Testing and Inferred Partial Specifications Tao Xie David Notkin Department of Computer Science & Engineering, University of Washington {taoxie, notkin}@cs.washington.edu Technical
More informationChronicler: Lightweight Recording to Reproduce Field Failures
Chronicler: Lightweight Recording to Reproduce Field Failures Jonathan Bell, Nikhil Sarda and Gail Kaiser Columbia University, New York, NY USA What happens when software crashes? Stack Traces Aren
More informationVerification and Test with Model-Based Design
Verification and Test with Model-Based Design Flight Software Workshop 2015 Jay Abraham 2015 The MathWorks, Inc. 1 The software development process Develop, iterate and specify requirements Create high
More informationSymbolic Execution, Dynamic Analysis
Symbolic Execution, Dynamic Analysis http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Symbolic execution Pavel Parízek Symbolic Execution, Dynamic Analysis
More informationDefensive Programming. Ric Glassey
Defensive Programming Ric Glassey glassey@kth.se Outline Defensive Programming Aim: Develop the programming skills to anticipate problems beyond control that may occur at runtime Responsibility Exception
More informationESC/Java2 extended static checking for Java Erik Poll Radboud University Nijmegen
ESC/Java2 extended static checking for Java Erik Poll Radboud University Nijmegen Erik Poll - JML p.1/19 Extended static checker for Java ESC/Java by Rustan Leino et.al. Extension ESC/Java2 by David Cok
More informationPlural 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 informationThe RV System Tutorial
The RV System Tutorial Patrick Meredith and Grigore Rosu joint work with Feng Chen, Dongyun Jin, Dennis Griffith, Michael Ilseman Runtime Verification, Inc. University of Illinois The RV System!"#$%&'(%)!"#*)+,'-(!9&('/+
More informationInner Oracles: Input- Specific Assertions on Internal States
Inner Oracles: Input- Specific Assertions on Internal States Yingfei Xiong, Dan Hao, Lu Zhang, Tao Zhu, Muyao Zhu, Tian Lan Peking University, China 2015 How a Test Detects a Bug Test Input Trigger a Bug
More informationPart 1: Excep-ons, part 2 Part 2: Iterator. Lecture 11 COMP 401, Spring /3/2015
Part 1: Excep-ons, part 2 Part 2: Iterator Lecture 11 COMP 401, Spring 2015 3/3/2015 The finally block Some-me we need some code to run no maker what happens. OMen this is the case in order to free up
More informationCS 3 Introduction to Software Engineering. 3: Exceptions
CS 3 Introduction to Software Engineering 3: Exceptions Questions? 2 Objectives Last Time: Procedural Abstraction This Time: Procedural Abstraction II Focus on Exceptions. Starting Next Time: Data Abstraction
More informationType Checking in COOL (II) Lecture 10
Type Checking in COOL (II) Lecture 10 1 Lecture Outline Type systems and their expressiveness Type checking with SELF_TYPE in COOL Error recovery in semantic analysis 2 Expressiveness of Static Type Systems
More informationTao Xie. Nikolai i Tillmann, Peli de Halleux, Wolfram Schulte hlt. North Carolina State University. Microsoft Research
Tao Xie North Carolina State University Nikolai i Tillmann, Peli de Halleux, Wolfram Schulte hlt Microsoft Research Unit Testing Parameterized Unit Testing (PUT) Mutation Analysis for PUT public class
More informationAn Eclipse Plug-in for Model Checking
An Eclipse Plug-in for Model Checking Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala Electrical Engineering and Computer Sciences University of California, Berkeley, USA Rupak Majumdar Computer Science
More informationFree-Me: A Static Analysis for Automatic Individual Object Reclamation
Free-Me: A Static Analysis for Automatic Individual Object Reclamation Samuel Z. Guyer, Kathryn McKinley, Daniel Frampton Presented by: Jason VanFickell Thanks to Dimitris Prountzos for slides adapted
More informationThe role of semantic analysis in a compiler
Semantic Analysis Outline The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors
More informationSAFE HASKELL. David Terei David Mazières. Simon Marlow Simon Peyton Jones
SAFE HASKELL David Terei David Mazières Stanford University Simon Marlow Simon Peyton Jones Microsoft Research MOTIVATION Haskell is a great language for building secure systems in: Information flow control
More informationSoftware Security: Vulnerability Analysis
Computer Security Course. Software Security: Vulnerability Analysis Program Verification Program Verification How to prove a program free of buffer overflows? Precondition Postcondition Loop invariants
More informationAgenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1
Agenda CSE P 501 Compilers Java Implementation JVMs, JITs &c Hal Perkins Summer 2004 Java virtual machine architecture.class files Class loading Execution engines Interpreters & JITs various strategies
More informationProgramming II (CS300)
1 Programming II (CS300) Chapter 04: Exception Handling MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Creating Classes 2 Introduction Exception Handling Common Exceptions Exceptions with Methods Assertions and
More informationOutline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context
Types 1 / 15 Outline Introduction Concepts and terminology The case for static typing Implementing a static type system Basic typing relations Adding context 2 / 15 Types and type errors Type: a set of
More informationDesign by Contract: An Overview
: An Overview CSCI 5828 Michael M. Vitousek University of Colorado at Boulder michael.vitousek@colorado.edu March 21, 2012 1 / 35 Outline 1 Introduction Motivation and Introduction Simple Example Contract
More information17. Classes. Encapsulation: public / private. Member Functions: Declaration. Member Functions: Call. class rational { int n; int d; // INV: d!
Encapsulation: public / private 7. Classes Classes, Member Functions, Constructors, Stack, Linked List, Dynamic Memory, Copy-Constructor, Assignment Operator, Concept Dynamic Datatype class rational int
More informationProving liveness. Alexey Gotsman IMDEA Software Institute
Proving liveness Alexey Gotsman IMDEA Software Institute Safety properties Ensure bad things don t happen: - the program will not commit a memory safety fault - it will not release a lock it does not hold
More informationCarving Invariants. Andreas Zeller Saarland University. CREST Open Workshop The Oracle Problem for Automated Software Testing, London, May 2012
Carving Invariants Andreas Zeller Saarland University CREST Open Workshop The Oracle Problem for Automated Software Testing, London, May 2012 Concrete Tests Concrete Tests y = sqrt(4) assert(y == 2) Concrete
More informationAnalysis of Software Artifacts
Analysis of Software Artifacts Properties with ESC/Java Jonathan Aldrich 1 ESC/Java A checker for Java programs Finds null pointers, array dereferences Checks Hoare logic specifications Expressed in Java
More informationCSC System Development with Java. Exception Handling. Department of Statistics and Computer Science. Budditha Hettige
CSC 308 2.0 System Development with Java Exception Handling Department of Statistics and Computer Science 1 2 Errors Errors can be categorized as several ways; Syntax Errors Logical Errors Runtime Errors
More informationCSCE 314 Programming Languages. Type System
CSCE 314 Programming Languages Type System Dr. Hyunyoung Lee 1 Names Names refer to different kinds of entities in programs, such as variables, functions, classes, templates, modules,.... Names can be
More informationRepairing crashes in Android Apps. Shin Hwei Tan Zhen Dong Xiang Gao Abhik Roychoudhury National University of Singapore
Repairing crashes in Android Apps Shin Hwei Tan Zhen Dong Xiang Gao Abhik Roychoudhury National University of Singapore Android Repair System Criteria for Android repair system: Could be used by any smartphone
More informationITI Introduction to Computing II
ITI 1121. Introduction to Computing II Marcel Turcotte School of Electrical Engineering and Computer Science Version of February 23, 2013 Abstract Handling errors Declaring, creating and handling exceptions
More informationUsing 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 informationA Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler
A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler Hiroshi Inoue, Hiroshige Hayashizaki, Peng Wu and Toshio Nakatani IBM Research Tokyo IBM Research T.J. Watson Research Center April
More informationWhich Configuration Option Should I Change?
Which Configuration Option Should I Change? Sai Zhang, Michael D. Ernst University of Washington Presented by: Kıvanç Muşlu I have released a new software version Developers I cannot get used to the UI
More informationCS101 Part 2: Practice Questions Algorithms on Arrays, Classes and Objects, String Class, Stack Class
CS1 Part 2: Algorithms on Arrays, Classes and Objects, String Class, Stack Class 1. Write a method that, given two sorted arrays of integers, merges the two arrays into a single sorted array that is returned.
More informationAssertions. Assertions - Example
References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 11/13/2003 1 Assertions Statements about input to a routine or state of a class Have two primary roles As documentation,
More informationSemantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far
Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Statically vs. Dynamically typed languages
More informationCode 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 informationShin Hwei Tan Darko Marinov Lin Tan Gary T. Leavens University of Illinois. University of Illinois
Shin Hwei Tan Darko Marinov Lin Tan Gary T. Leavens University of Illinois University of Illinois University of Waterloo University of Central Florida 1 /* * Returns a synchronized map backed by the given
More informationObject Oriented Programming Exception Handling
Object Oriented Programming Exception Handling Budditha Hettige Department of Computer Science Programming Errors Types Syntax Errors Logical Errors Runtime Errors Syntax Errors Error in the syntax of
More informationExceptions and assertions
Exceptions and assertions CSE 331 University of Washington Michael Ernst Failure causes Partial failure is inevitable Goal: prevent complete failure Structure your code to be reliable and understandable
More informationITI Introduction to Computing II
ITI 1121. Introduction to Computing II Marcel Turcotte School of Electrical Engineering and Computer Science Version of February 23, 2013 Abstract Handling errors Declaring, creating and handling exceptions
More information19. Classes. Encapsulation: public / private. Member Functions: Declaration. Member Functions: Call. class rational { int n; int d; // INV: d!
Encapsulation: public / private 9. Classes Classes, Member Functions, Constructors, Stack, Linked List, Dynamic Memory, Copy-Constructor, Assignment Operator, Concept Dynamic Datatype class rational int
More informationAdministration. Exceptions. Leftovers. Agenda. When Things Go Wrong. Handling Errors. CS 99 Summer 2000 Michael Clarkson Lecture 11
Administration Exceptions CS 99 Summer 2000 Michael Clarkson Lecture 11 Lab 10 due tomorrow No lab tomorrow Work on final projects Remaining office hours Rick: today 2-3 Michael: Thursday 10-noon, Monday
More informationFeedback-controlled Random Test Generation
Feedback-controlled Random Test Generation Kohsuke Yatoh 1*, Kazunori Sakamoto 2, Fuyuki Ishikawa 2, Shinichi Honiden 12 1:University of Tokyo, 2:National Institute of Informatics * He is currently affiliated
More informationDay 8. COMP1006/1406 Summer M. Jason Hinek Carleton University
Day 8 COMP1006/1406 Summer 2016 M. Jason Hinek Carleton University today s agenda assignments Assignment 4 is out and due on Tuesday Bugs and Exception handling 2 Bugs... often use the word bug when there
More informationIntroduction to JML David Cok, Joe Kiniry, and Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen
Introduction to JML David Cok, Joe Kiniry, and Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2 & JML Tutorial p.1/30
More informationSequence-Based Specification
Sequence-Based Specification Tom Swain tomswain@comcast.net Specification Objectives Completeness Consistency a response is defined for every stimulus history each stimulus history maps to only one response
More informationAutomatic Extraction of Abstract- Object-State Machines Based on Branch Coverage
Automatic Extraction of Abstract- Object-State Machines Based on Branch Coverage Hai YUAN Tao XIE Department of Computer Science North Carolina State University hyuan3@ncsu.edu xie@csc.ncsu.edu Agenda
More informationUnderstanding Undefined Behavior
Session Developer Tools #WWDC17 Understanding Undefined Behavior 407 Fred Riss, Clang Team Ryan Govostes, Security Engineering and Architecture Team Anna Zaks, Program Analysis Team 2017 Apple Inc. All
More informationXFindBugs: extended FindBugs for AspectJ
XFindBugs: extended FindBugs for AspectJ Haihao Shen, Sai Zhang, Jianjun Zhao, Jianhong Fang, Shiyuan Yao Software Theory and Practice Group (STAP) Shanghai Jiao Tong University, China A code Is there
More informationAnnouncements. Working on requirements this week Work on design, implementation. Types. Lecture 17 CS 169. Outline. Java Types
Announcements Types Working on requirements this week Work on design, implementation Lecture 17 CS 169 Prof. Brewer CS 169 Lecture 16 1 Prof. Brewer CS 169 Lecture 16 2 Outline Type concepts Where do types
More informationSoftware Construction
Lecture 7: Type Hierarchy, Iteration Abstraction Software Construction in Java for HSE Moscow Tom Verhoeff Eindhoven University of Technology Department of Mathematics & Computer Science Software Engineering
More informationAutomated 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 informationCertitude Functional Qualification with Formal Verification. Jean-Marc Forey November 2012
Certitude Functional Qualification with Formal Verification Jean-Marc Forey November 2012 Springsoft Proprietary Topics Case study presentation Why Verification Verification efficiency Formal verification
More informationMOPBox: A Library Approach to Runtime Verification
MOPBox: A Library Approach to Runtime Verification (Tool Demonstration) Eric Bodden eric.bodden@cased.de Center for Advanced Security Research Darmstadt Software Technology Group Technische Universität
More information