Finding Minimum Type Error Sources Zvonimir Pavlinovic Tim King Thomas Wies New York University.

Slides:



Advertisements
Similar presentations
Algorithm Design Methods Spring 2007 CSE, POSTECH.
Advertisements

Satisfiability Modulo Theories (An introduction)
Diversified Retrieval as Structured Prediction Redundancy, Diversity, and Interdependent Document Relevance (IDR ’09) SIGIR 2009 Workshop Yisong Yue Cornell.
1 Dependent Types for Termination Verification Hongwei Xi University of Cincinnati.
Design & Analysis of Algoritms
INF 212 ANALYSIS OF PROG. LANGS Type Systems Instructors: Crista Lopes Copyright © Instructors.
Panel on Decision Procedures Panel on Decision Procedures Randal E. Bryant Lintao Zhang Nils Klarlund Harald Ruess Sergey Berezin Rajeev Joshi.
Al-Karma Language School Computer Department Prep. 3.
The Rational Decision-Making Process
CSE115/ENGR160 Discrete Mathematics 02/24/11 Ming-Hsuan Yang UC Merced 1.
1 Abstract This study presents an analysis of two modified fuzzy ARTMAP neural networks. The modifications are first introduced mathematically. Then, the.
The Theory of NP-Completeness
Page 1 Generalized Inference with Multiple Semantic Role Labeling Systems Peter Koomen, Vasin Punyakanok, Dan Roth, (Scott) Wen-tau Yih Department of Computer.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
The Fundamentals: Algorithms, the Integers & Matrices.
6 Steps of the Programming Process
Operations Research Models
I. Pribela, M. Ivanović Neum, Content Automated assessment Testovid system Test generator Module generators Conclusion.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
1 Outline:  Outline of the algorithm  MILP formulation  Experimental Results  Conclusions and Remarks Advances in solving scheduling problems with.
Invitation to Computer Science, Java Version, Second Edition.
CMU, Oct 4 DPLL-based Checkers for Satisfiability Modulo Theories Cesare Tinelli Department of Computer Science The University of Iowa Joint work with.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Closest String with Wildcards ( CSW ) Parameterized Complexity Analysis for the Closest String with Wildcards ( CSW ) Problem Danny Hermelin Liat Rozenberg.
1 Network Coding and its Applications in Communication Networks Alex Sprintson Computer Engineering Group Department of Electrical and Computer Engineering.
Binary Search From solving a problem to verifying an answer.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Ethan Jackson, Nikolaj Bjørner and Wolfram Schulte Research in Software Engineering (RiSE), Microsoft Research 1. A FORMULA for Abstractions and Automated.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Stefan Mutter, Mark Hall, Eibe Frank University of Freiburg, Germany University of Waikato, New Zealand The 17th Australian Joint Conference on Artificial.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
CJAdviser: SMT-based Debugging Support for ContextJ* Shizuka Uchio(Kyushu University, Japan) Naoyasu Ubayashi(Kyushu University, Japan) Yasutaka Kamei(Kyushu.
Chapter Algorithms 3.2 The Growth of Functions 3.3 Complexity of Algorithms 3.4 The Integers and Division 3.5 Primes and Greatest Common Divisors.
Architectural Point Mapping for Design Traceability Naoyasu Ubayashi and Yasutaka Kamei Kyushu University, Japan March 26, 2012 FOAL 2012 (AOSD Workshop)
2007 Science of Design (SoD) PI Meeting – Project Nuggets NSF SoD Award No: NSF SoD-HCER Project Title: Learning Based Programming Investigator.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
A System to Generate Test Data and Symbolically Execute Programs Lori A. Clarke Presented by: Xia Cheng.
ALGORITHMS.
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Tommy Messelis * Stefaan Haspeslagh Patrick De Causmaecker *
Automated discovery in math Machine learning techniques (GP, ILP, etc.) have been successfully applied in science Machine learning techniques (GP, ILP,
Random Interpretation Sumit Gulwani UC-Berkeley. 1 Program Analysis Applications in all aspects of software development, e.g. Program correctness Compiler.
MaxSAT Evaluations SURVEY & RECENT RESULTS. Outline  Max-SAT overview  Sub problems of Max-SAT  Applications of Max-SAT  Annual Evaluations, 2015.
NetQuest: A Flexible Framework for Large-Scale Network Measurement Lili Qiu University of Texas at Austin Joint work with Han Hee Song.
System To Generate Test Data: The Analysis Program Syed Nabeel.
Outline Motivation and Contributions Related Works ILP Formulation
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
ICS 353: Design and Analysis of Algorithms Backtracking King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Tommy Messelis * Stefaan Haspeslagh Burak Bilgin Patrick De Causmaecker Greet Vanden Berghe *
Computer Systems Laboratory Stanford University Clark W. Barrett David L. Dill Aaron Stump A Framework for Cooperating Decision Procedures.
1 Double-Patterning Aware DSA Template Guided Cut Redistribution for Advanced 1-D Gridded Designs Zhi-Wen Lin and Yao-Wen Chang National Taiwan University.
Decision Procedures for String Constraints Pieter Hooimeijer 2.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Chapter One Problem Solving
Automatic Test Generation
Data Structures and Algorithms
Introduction to Problem Solving
Algorithm Design Methods
Automatic Editing with Soft Edits
Presentation transcript:

Finding Minimum Type Error Sources Zvonimir Pavlinovic Tim King Thomas Wies New York University

Motivating example [Zhang & Myers, POPL ‘14] Error: This expression has type ‘a list but an expression was expected of type unit print_string: string -> unit

Problem? Type error reports often not helpful increased debugging time difficult to learn a language by novice programmers How to improve? consider all error sources rank them by some useful criterion report top ranked sources to the programmer

Solutions? Previous research attempts: slice of type inference deduction [Wand `86, Duggan & Bent `95] program slice involved in error [Tip & Dinesh `01, Gast `05] specially crafted type systems [Chitil `01, Neubauer & Thiemann `03, Chen & Erwig `14] Drawbacks: focus on a single ranking criterion focus on a specific type system substantial compiler modifications

Challenge Can we enable compilers localize type errors abstracting from a specific ranking criterion for various type systems with modest compiler modifications? In this work: general framework for type error localization using constraint solving

Definitions ?? Error Source An error source is a set of program expressions that, once corrected, yield a well-typed program Error Source An error source is a set of program expressions that, once corrected, yield a well-typed program

Definitions Rank sources by some useful criterion by assigning weights to expressions ?? Minimum Error Source An error source with minimum cumulative weight Minimum Error Source An error source with minimum cumulative weight

Ranking criteria - example Prefer error sources requiring fewer corrections? assign weights equal to expression’s AST size ? (1) ? (3) ? (1) ? (5)

Problem definition How? search through all hole versions of an input program reduction to constraint solving: weighted maximum satisfiability modulo theories Computing Minimum Error Sources Given a program and a compiler-provided ranking criterion, find a minimum error source subject to the criterion Computing Minimum Error Sources Given a program and a compiler-provided ranking criterion, find a minimum error source subject to the criterion

Framework Support for various type systems due to SMT Modest compiler modifications Abstracts from specific ranking criteria Compiler Typing Constraint Generation Typing Constraint Generation Weighted MaxSMT Solver Weighted MaxSMT Solver input program and ranking criterion constraint minimum error sources

Weighted MaxSMT Input: hard clauses must hold soft clauses each clause assigned a weight each clause belongs to a fixed first-order theory algebraic data types, linear integer arithmetic, … Output: A satisfiable subset of soft clauses with maximum cumulative weight (hard clauses must hold)

Reduction to MaxSMT ?? hard

Implementation Subset of OCaml (Caml) Hindley-Milner type system Constraint generation using EasyOCaml constraint encoded in the theory of inductive data types Weighted MaxSMT procedures using Sat4j and CVC4 circa 500 lines of Java code Evaluation on ~350 programs from [Lerner et al., `07]

Evaluation 15% increase in accuracy over OCaml ranking criterion: size of expression seconds program size in LOC

Constraint size

Performance improvements Type checking EXPTIME-complete [Mairson `90, Kfoury et al. `90] Solution? Lazy quantifier-based instantiation Lazy unification-based instantiation Further optimizations Constraint slicing Preemptive cutting

Contributions Clean problem formulation type error localization as an optimization problem abstracts from ranking criteria General algorithm reduction to weighted MaxSMT constraint solving supports various type systems due to SMT modest compiler modifications Thank you!