Improving typeerror messages in functional languages


 Shana Willis
 2 years ago
 Views:
Transcription
1 Improving typeerror messages in Bastiaan Heeren Universiteit Utrecht January 5, 200
2 Contents Introduction Constraints Type inference rules Solving constraints Solving inconsistencies Future work Conclusion 2
3 Introduction Example of an erroneous expression: f = \x > case x of 0 > False > one 2 > two 3 > three Error message produced by Hugs: ERROR example.hs (line ): Type error in case expression *** Term : one *** Type : String *** Does not match : Bool 3
4 Introduction Problems in current type inferencing algorithms: local approach error message is only a brief explanation only one error message is reported Improvements: global approach a better explanation of the type conflict multiple error messages are reported 4
5 Expression language Expression language: data Expr = Variable String Literal String Apply Expr Expr Lambda String Expr Case Expr Alternatives Let String Expr Expr data Alternatives = Empty Alternative Expr Expr Alternatives no syntactic sugar simplified let expression 5
6 Type language Type language: data Type = TVar Int TCon String TApp Type Type type arrow ( ) is represented as a constant no quantifiers 6
7 Constraints Equality constraint: represents the unification of two types for example : a Int b Instance constraint: represents an instantiation of a (polymorphic) type contains a set of monomorphic variables for example : a< Int b 7
8 Type inference rules [VAR] [LIT] aisfresh  x : a, [x a]  literal : primitive type, no constraints no constraints [APP] aisfresh  f : tf, Af  e : te, Ae [ABS] aisfresh  e : t, A  (f e) : a, Af Ae  (\x e) : a t,a\ x tf te a {s a (x s) A} 8
9 Type inference rules [CASE] aandbarefresh  p : tp, Ap  pi :tpi,api for i [..n]  ei :tei,aei for i [..n]  (case p of p e; ;pn en;) : b, Ap (Ae Ap) (Aen Apn) a tp a tpi b tei {s t (x s) Api,(x t) Aei } for i [..n] for i [..n] for i [..n] 9
10 Type inference rules [LET] aisfresh  e : te, Ae  b : tb, Ab  (let x = e in b) : tb, (Ae Ab) \ x a te {s a (x s) Ae } {s<m a (x s) Ab } where M=Ae\x 0
11 Example [VAR] [VAR]  i : t3, [i t3]  i : t4, [i t4]  ii:,[i t3, i t4] [APP] t3 t4  x :, [x ]  \x x:t, [VAR] [ABS] t  let i = \x xinii:, t3 < t2 t4 < t2 t2 t [LET]
12 Solving constraints Equality graph: vertex edge : type variable or type constant : equality constraint Each type variable occurs exactly once in a vertex Initial state for the expression let i = \x xinii result type errors set of constraints : t : t2 t #3 : t3 t4 : t3 < t2 #5 : t4 < t2 equality graph t t2 t3 t4 2
13 Solving constraints Equality constraints: a rule for each combination TCon c TCon c2 if c and c2 are equal then remove else error TCon c TVar v addanedgebetweencandv TCon c TApp t t2 error TVar v TVar v2 addanedgebetweenvandv2 TApp t t2 TApp t3 t4 split constraint into (t t3) and (t2 t4) TVar v TApp t t2 decomposition of v 3
14 Solving constraints result type t3 errors set of constraints : t Int Int... equality graph t t2 t3 #7 t4 Substitution: [t := t6, t2 := t7 t8, t3 := t9 t0, t4 := t t2] result type set of constraints equality graph t9 t0 : t6 Int Int... t7 t6 t8 errors t9 #7 t t0 #7 t2 substituted 4
15 Solving constraints Instance constraints: t <M t2 is changed into an equality constraint as soon as t2 is fixed (a fixed type does not change during the rest of the computation) A type is fixed if all the type variables it contains are fixed. A type variable is fixed if:  it does not occur in an equality constraint  it does not occur on the left hand side of an instance constraint  all the type variables in its connected component are fixed 5
16 Example simplify #3 #5 t t2 t3 t3 t4 < < t t4 t2 t2 t t3 t2 t4 6
17 Example decompose #3 #5 t t2 t3 t3 t4 < < t t4 t2 t2 t t3 t2 substitution t2 := t6 t7 t4 7
18 Example simplify #3 #5 t t6 t7 t3 t3 t4 < < t t4 t6 t7 t6 t7 t t3 t7 t6 substitution t2 := t6 t7 t4 8
19 Example instantiate #3 #5 t t6 t7 t3 t3 t4 < < t t4 t6 t7 t6 t7 t t3 t7 t6 t4 9
20 Example decompose #3 #5 t t6 t7 t3 t3 t4 t t4 t8 t8 t9 t9 t t3 t7 t6 t8 substitution t9 t4 t3 := t0 t 20
21 Example simplify #3 #5 t t6 t7 t0 t t0 t t4 t t4 t8 t8 t9 t9 t t7 t6 t0 t8 t substitution t9 t4 t3 := t0 t 2
22 Example simplify #3 #5 t t6 t7 t0 t t0 t t4 t t4 t8 t8 t9 t9 t t7 t6 t9 t0 t8 t #3 #3 t4 22
23 Example decompose #3 #5 t t6 t7 t0 t t0 t t4 t t4 t8 t8 t9 t9 substitution t t7 t4 := t2 t3 := t4 t8 := t6 t7 t0 := t8 t9 t := t20 t2 t6 t9 t0 t8 t #3 #3 t4 23
24 Example simplify #3 #5 t t6 t7 t0 t t0 t t2 t3 t4 t t4 t8 t8 t9 t9 t t8 t6 t20 #3 #3 t7 t6 t2 t4 substitution t4 := t2 t3 := t4 t8 := t6 t7 t0 := t8 t9 t := t20 t2 t9 t9 t7 t2 #3 #3 t3 24
25 Example result type #3 #5 t t6 t7 t0 t t0 t t2 t3 t4 t t4 t8 t8 t9 t9 a a t t8 t6 t20 #3 #3 t7 t6 t2 t4 #5 t9 #5 t9 t7 t2 #3 #3 t3 25
26 Solving inconsistencies Int : t Int Int t #3 t2 t3 Int Bool wrong paths: {,,#3,} {,,#3,} decompose paths: {,,} {,,} {,#3,} 26
27 Solving inconsistencies Int : t Int Int t #3 t2 t3 Int Bool wrong paths: {,,#3,} {,,#3,} decompose paths: {,,} {,,} {,#3,} minimal set {,} {,} {,} {,#3} {,} {#3,} 27
28 Solving inconsistencies Int : t Int Int t #3 t2 t3 Int Bool removal cost minimal set #3 good good paths: {,} {,} {,} {,} {,#3} {,} {#3,} 28
29 Solving inconsistencies Int : t Int Int t #3 t2 t3 Int Bool removal cost minimal set #3 good trust 5 5 each constraint has a trust value {,} {,} {,} {,#3} {,} {#3,} 29
30 Solving inconsistencies Int : t Int Int t #3 t2 t3 Int Bool removal cost minimal set #3 good trust 5 5 cost ( + good) * trust {,} {,} {,} {,#3} {,} {#3,} 30
31 Solving inconsistencies Int : t Int Int t #3 t2 t3 Int Bool removal cost minimal set total cost #3 good trust 5 5 cost remove the constraints in the set with the lowest total cost {,} {,} {,} {,#3} {,} {#3,}
32 Solving inconsistencies Int t t2 t3 Int Bool the inconsistency is removed 32
33 Future work Explicit typing Type synonyms Type classes Kindinferencing Type tracing Advanced output BANE 33
34 Conclusion Lefttoright bias is completely removed Several heuristics increase the exactness of the error message considerably Possibility to add more heuristics 34
Chapter 7: Functional Programming Languages
Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language
More informationAdding GADTs to OCaml the direct approach
Adding GADTs to OCaml the direct approach Jacques Garrigue & Jacques Le Normand Nagoya University / LexiFi (Paris) https://sites.google.com/site/ocamlgadt/ Garrigue & Le Normand Adding GADTs to OCaml 1
More informationThe Clean programming language. Group 25, Jingui Li, Daren Tuzi
The Clean programming language Group 25, Jingui Li, Daren Tuzi The Clean programming language Overview The Clean programming language first appeared in 1987 and is still being further developed. It was
More informationAP CALCULUS AB 2007 SCORING GUIDELINES (Form B)
AP CALCULUS AB 2007 SCORING GUIDELINES (Form B) Question 4 Let f be a function defined on the closed interval 5 x 5 with f ( 1) = 3. The graph of f, the derivative of f, consists of two semicircles and
More informationHigherOrder Logic. Specification and Verification with HigherOrder Logic
HigherOrder Logic Specification and Verification with HigherOrder Logic Arnd PoetzschHeffter Software Technology Group Fachbereich Informatik Technische Universität Kaiserslautern Sommersemester 2010
More informationMAT12X Intermediate Algebra
MAT12X Intermediate Algebra Workshop I  Exponential Functions LEARNING CENTER Overview Workshop I Exponential Functions of the form y = ab x Properties of the increasing and decreasing exponential functions
More informationTop Quality Type Error Messages
Top Quality Type Error Messages Top Kwaliteit Typeringsfoutmeldingen (met een samenvatting in het Nederlands) Proefschrift ter verkrijging van de graad van doctor aan de Universiteit Utrecht op gezag van
More informationSatisfiability Checking
Satisfiability Checking SATSolving Prof. Dr. Erika Ábrahám Theory of Hybrid Systems Informatik 2 WS 10/11 Prof. Dr. Erika Ábrahám  Satisfiability Checking 1 / 40 A basic SAT algorithm Assume the CNF
More informationMoving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an objectoriented language. This document describes some of the differences between objectoriented programming in Scheme (which we hope you
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 information3.1 Solving Systems Using Tables and Graphs
Algebra 2 Chapter 3 3.1 Solve Systems Using Tables & Graphs 3.1 Solving Systems Using Tables and Graphs A solution to a system of linear equations is an that makes all of the equations. To solve a system
More informationChapter 6: Query Decomposition and Data Localization
Chapter 6: Query Decomposition and Data Localization Query Decomposition Data Localization Acknowledgements: I am indebted to Arturas Mazeika for providing me his slides of this course. DDB 2008/09 J.
More informationDynamic Programming. Applies when the following Principle of Optimality
Dynamic Programming Applies when the following Principle of Optimality holds: In an optimal sequence of decisions or choices, each subsequence must be optimal. Translation: There s a recursive solution.
More informationArtificial Intelligence Methods (G52AIM)
Artificial Intelligence Methods (G52AIM) Dr Rong Qu rxq@cs.nott.ac.uk Constructive Heuristic Methods Constructive Heuristics method Start from an empty solution Repeatedly, extend the current solution
More informationBoolean Representations and Combinatorial Equivalence
Chapter 2 Boolean Representations and Combinatorial Equivalence This chapter introduces different representations of Boolean functions. It then discuss the applications of these representations for proving
More informationAdvanced Functional Programming (9) Domain Specific Embedded Languages
Advanced Functional Programming (9) Domain Specific Embedded Languages Advanced Functional Programming (9) Domain Specific Embedded Languages, Universiteit Utrecht http://www.cs.uu.nl/groups/st/ February
More informationFinal Exam Review. CS 1428 Fall Jill Seaman. Final Exam
Final Exam Review CS 1428 Fall 2011 Jill Seaman 1 Final Exam Friday, December 9, 11:00am to 1:30pm Derr 241 (here) Closed book, closed notes, clean desk Comprehensive (covers entire course) 25% of your
More informationTECHNICAL UNIVERSITY OF CRETE DATA STRUCTURES FILE STRUCTURES
TECHNICAL UNIVERSITY OF CRETE DEPT OF ELECTRONIC AND COMPUTER ENGINEERING DATA STRUCTURES AND FILE STRUCTURES Euripides G.M. Petrakis http://www.intelligence.tuc.gr/~petrakis Chania, 2007 E.G.M. Petrakis
More information5.1. Systems of Linear Equations. Linear Systems Substitution Method Elimination Method Special Systems
5.1 Systems of Linear Equations Linear Systems Substitution Method Elimination Method Special Systems 5.11 Linear Systems The possible graphs of a linear system in two unknowns are as follows. 1. The
More informationShortest InspectionPath. Queries in Simple Polygons
Shortest InspectionPath Queries in Simple Polygons Christian Knauer, Günter Rote B 0505 April 2005 Shortest InspectionPath Queries in Simple Polygons Christian Knauer, Günter Rote Institut für Informatik,
More informationSection IV.1: Recursive Algorithms and Recursion Trees
Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller
More informationTypeScript for C# developers. Making JavaScript manageable
TypeScript for C# developers Making JavaScript manageable Agenda What is TypeScript OO in TypeScript Closure Generics Iterators Asynchronous programming Modularisation Debugging TypeScript 2 What is TypeScript
More informationWhy? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
More informationOutline Basic concepts of Python language
Data structures: lists, tuples, sets, dictionaries Basic data types Examples: int: 12, 0, 2 float: 1.02, 2.4e2, 1.5e3 complex: 3+4j bool: True, False string: "Test string" Conversion between types int(2.8)
More informationChapter 15 Functional Programming Languages
Chapter 15 Functional Programming Languages Introduction  The design of the imperative languages is based directly on the von Neumann architecture Efficiency (at least at first) is the primary concern,
More informationProgramming Language Rankings. Lecture 15: Type Inference, polymorphism & Type Classes. Top Combined. Tiobe Index. CSC 131! Fall, 2014!
Programming Language Rankings Lecture 15: Type Inference, polymorphism & Type Classes CSC 131 Fall, 2014 Kim Bruce Top Combined Tiobe Index 1. JavaScript (+1) 2. Java (1) 3. PHP 4. C# (+2) 5. Python (1)
More informationCompiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F021 Compiler overview source code lexical analysis tokens intermediate code generation
More informationTemporal Logics. Computation Tree Logic
Temporal Logics CTL: definition, relationship between operators, adequate sets, specifying properties, safety/liveness/fairness Modeling: sequential, concurrent systems; maximum parallelism/interleaving
More informationObfuscation: know your enemy
Obfuscation: know your enemy Ninon EYROLLES neyrolles@quarkslab.com Serge GUELTON sguelton@quarkslab.com Prelude Prelude Plan 1 Introduction What is obfuscation? 2 Control flow obfuscation 3 Data flow
More information6.2 Permutations continued
6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of
More information1. What s wrong with the following proofs by induction?
ArsDigita University Month : Discrete Mathematics  Professor Shai Simonson Problem Set 4 Induction and Recurrence Equations Thanks to Jeffrey Radcliffe and Joe Rizzo for many of the solutions. Pasted
More informationSection 9.5: Equations of Lines and Planes
Lines in 3D Space Section 9.5: Equations of Lines and Planes Practice HW from Stewart Textbook (not to hand in) p. 673 # 35 odd, 237 odd, 4, 47 Consider the line L through the point P = ( x, y, ) that
More informationType Inference for FirstClass Messages with MatchFunctions
Type Inference for FirstClass Messages with MatchFunctions Paritosh Shroff Scott F. Smith Johns Hopkins University {pari, scott}@cs.jhu.edu Abstract Messages that can be treated as firstclass entities
More informationNetwork (Tree) Topology Inference Based on Prüfer Sequence
Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,
More informationeach college c i C has a capacity q i  the maximum number of students it will admit
n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i  the maximum number of students it will admit each college c i has a strict order i
More informationRecursion. Slides. Programming in C++ Computer Science Dept Va Tech Aug., 2001. 19952001 Barnette ND, McQuain WD
1 Slides 1. Table of Contents 2. Definitions 3. Simple 4. Recursive Execution Trace 5. Attributes 6. Recursive Array Summation 7. Recursive Array Summation Trace 8. Coding Recursively 9. Recursive Design
More informationCassandra. References:
Cassandra References: Becker, Moritz; Sewell, Peter. Cassandra: Flexible Trust Management, Applied to Electronic Health Records. 2004. Li, Ninghui; Mitchell, John. Datalog with Constraints: A Foundation
More informationBasic Polymorphic Typechecking
Science of Computer Programming 8/2 (April 1987) Revised 6/21/88 Basic Polymorphic Typechecking Luca Cardelli AT&T Bell Laboratories, Murray Hill, NJ 07974 (current address: DEC SRC, 130 Lytton Ave, Palo
More informationRacket Style Guide Fall 2016
CS17 Integrated Introduction to Computer Science Hughes Racket Style Guide Fall 2016 Contents 1 Introduction 1 2 Naming 1 3 Formatting 1 4 Equality 4 5 Conditionals 4 5.1 Prefer Cond to If......................................
More informationTHREE DIMENSIONAL GEOMETRY
Chapter 8 THREE DIMENSIONAL GEOMETRY 8.1 Introduction In this chapter we present a vector algebra approach to three dimensional geometry. The aim is to present standard properties of lines and planes,
More informationIntroduction to Proofs
Chapter 1 Introduction to Proofs 1.1 Preview of Proof This section previews many of the key ideas of proof and cites [in brackets] the sections where they are discussed thoroughly. All of these ideas are
More informationCS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013
Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)
More informationFuld Skolerapport for Søhusskolen, i Odense kommune, for skoleår 2013/2014 for klassetrin(ene) 9. med reference Tilsvarende klassetrin i kommunen
Side 1 af 41 Side 2 af 41 Side 3 af 41 Side 4 af 41 Side 5 af 41 Side 6 af 41 Side 7 af 41 Side 8 af 41 Side 9 af 41 Side 10 af 41 Side 11 af 41 Side 12 af 41 Side 13 af 41 Side 14 af 41 Side 15 af 41
More informationFuld Skolerapport for Hunderupskolen, i Odense kommune, for skoleår 2013/2014 for klassetrin(ene) 7. med reference Tilsvarende klassetrin i kommunen
Side 1 af 43 Side 2 af 43 Side 3 af 43 Side 4 af 43 Side 5 af 43 Side 6 af 43 Side 7 af 43 Side 8 af 43 Side 9 af 43 Side 10 af 43 Side 11 af 43 Side 12 af 43 Side 13 af 43 Side 14 af 43 Side 15 af 43
More informationAbsolute Value Equations and Inequalities
Key Concepts: Compound Inequalities Absolute Value Equations and Inequalities Intersections and unions Suppose that A and B are two sets of numbers. The intersection of A and B is the set of all numbers
More informationCode Kingdoms Learning: What, where, when and how
codekingdoms Code Kingdoms Learning: What, where, when and how for kids, with kids, by kids. Resources overview We have produced a number of resources designed to help people use Code Kingdoms. There are
More informationSoftware Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.
Software Testing Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Testing can only reveal the presence of errors and not the
More informationHomework 15 Solutions
PROBLEM ONE (Trees) Homework 15 Solutions 1. Recall the definition of a tree: a tree is a connected, undirected graph which has no cycles. Which of the following definitions are equivalent to this definition
More informationConstraint Satisfaction Problems. Constraint Satisfaction Problems. Greedy Local Search. Example. 1 Greedy algorithm. 2 Stochastic Greedy Local Search
Constraint Satisfaction Problems June 19, 2007 Greedy Local Search Constraint Satisfaction Problems Greedy Local Search Bernhard Nebel, Julien Hué, and Stefan Wölfl AlbertLudwigsUniversität Freiburg
More informationJournal of Functional Programming, volume 3 number 4, 1993. Dynamics in ML
Journal of Functional Programming, volume 3 number 4, 1993. Dynamics in ML Xavier Leroy École Normale Supérieure Michel Mauny INRIA Rocquencourt Abstract Objects with dynamic types allow the integration
More informationEconomics 326: Duality and the Slutsky Decomposition. Ethan Kaplan
Economics 326: Duality and the Slutsky Decomposition Ethan Kaplan September 19, 2011 Outline 1. Convexity and Declining MRS 2. Duality and Hicksian Demand 3. Slutsky Decomposition 4. Net and Gross Substitutes
More informationSynthesizing Proof Planning Methods and ΩANTS Agents from Mathematical Knowledge
Synthesizing Proof Planning Methods and ΩANTS Agents from Mathematical Knowledge Serge Autexier, Dominik Dietrich dietrich@ags.unisb.de Saarland University, Saarbrücken MKM 06 p.1 Motivation Knowledgebased
More informationSoftware Testing & Verification 2013/2014 Universiteit Utrecht
Software Testing & Verification 2013/2014 Universiteit Utrecht 2nd Jul. 2014, 13:3016:30, BBL 001 Lecturer: Wishnu Prasetya You are allowed to bring along the Appendix of the LN. Part I [3pt (6 0.5)]
More informationHow to Write a Checker in 24 Hours
How to Write a Checker in 24 Hours Clang Static Analyzer Anna Zaks and Jordan Rose Apple Inc. What is this talk about? The Clang Static Analyzer is a bug finding tool It can be extended with custom checkers
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 informationImproving KnowledgeBased System Performance by Reordering Rule Sequences
Improving KnowledgeBased System Performance by Reordering Rule Sequences Neli P. Zlatareva Department of Computer Science Central Connecticut State University 1615 Stanley Street New Britain, CT 06050
More informationTranslating Generalized Algebraic Data Types to System F
Translating Generalized Algebraic Data Types to System F Martin Sulzmann and Meng Wang {sulzmann,wangmeng}@comp.nus.edu.sg School of Computing, National University of Singapore S16 Level 5, 3 Science Drive
More informationLecture Notes on Spanning Trees
Lecture Notes on Spanning Trees 15122: Principles of Imperative Computation Frank Pfenning Lecture 26 April 26, 2011 1 Introduction In this lecture we introduce graphs. Graphs provide a uniform model
More informationCompiler Design. Type Checking
Compiler Design Type Checking Static Checking Token Stream Parser Abstract Syntax Tree Static Checker Decorated Abstract Syntax Tree Intermediate Code Generator Intermediate Code Static (Semantic) Checks
More informationWellSeparated Pair Decomposition for the Unitdisk Graph Metric and its Applications
WellSeparated Pair Decomposition for the Unitdisk Graph Metric and its Applications Jie Gao Department of Computer Science Stanford University Joint work with Li Zhang Systems Research Center HewlettPackard
More informationAspectOriented Programming with Type Classes
AspectOriented Programming with Type Classes Martin Sulzmann School of Computing, National University of Singapore S16 Level 5, 3 Science Drive 2, Singapore 117543 sulzmann@comp.nus.edu.sg Meng Wang School
More informationReducing Clocks in Timed Automata while Preserving Bisimulation
Reducing Clocks in Timed Automata while Preserving Bisimulation Shibashis Guha Chinmay Narayan S. ArunKumar Indian Institute of Technology Delhi {shibashis, chinmay, sak}@cse.iitd.ac.in arxiv:1404.6613v2
More informationComplexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar
Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples
More informationWhat is Shell Script?
Linux Shell Scripts What is Shell Script? We have seen some basic shell commands, it s time to move on to scripts. There are two ways of writing shell programs. You can type a sequence of commands and
More informationBasic Notions on Graphs. Planar Graphs and Vertex Colourings. Joe Ryan. Presented by
Basic Notions on Graphs Planar Graphs and Vertex Colourings Presented by Joe Ryan School of Electrical Engineering and Computer Science University of Newcastle, Australia Planar graphs Graphs may be drawn
More informationPlanSpace Search. Searching for a Solution Plan in a Graph of Partial Plans
PlanSpace Search Searching for a Solution Plan in a Graph of Partial Plans Literature Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning Theory and Practice, chapter 2 and 5. Elsevier/Morgan
More informationGrading: A1=90% and above; A=80% to 89%; B1=70% to 79%; B=60% to 69%; C=50% to 59%; D=34% to 49%; E=Repeated; 1 of 55 pages
100001 A1 100002 A1 100003 B 100004 B 100005 B 100006 A 100007 C 100008 C 100009 B1 100010 D 100011 A 100012 B 100013 B 100014 B1 100015 C 100016 B1 100017 A1 100018 A1 100019 A1 100020 B1 100021 A 100022
More informationCpSc810 Goddard Notes Chapter 2. Representations
CpSc810 Goddard Notes Chapter 2 Representations There are many issues to consider when choosing a representation. For example, how to depict a definition. What about time? Causality? Uncertainty? (For
More informationCMPS 102 Solutions to Homework 1
CMPS 0 Solutions to Homework Lindsay Brown, lbrown@soe.ucsc.edu September 9, 005 Problem.. p. 3 For inputs of size n insertion sort runs in 8n steps, while merge sort runs in 64n lg n steps. For which
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 informationSeminar. Path planning using Voronoi diagrams and BSplines. Stefano Martina stefano.martina@stud.unifi.it
Seminar Path planning using Voronoi diagrams and BSplines Stefano Martina stefano.martina@stud.unifi.it 23 may 2016 This work is licensed under a Creative Commons AttributionShareAlike 4.0 International
More informationJedd: A BDDbased Relational Extension of Java
Jedd: A BDDbased Relational Extension of Java Ondřej Lhoták Laurie Hendren Sable Research Group, School of Computer Science McGill University, Montreal, Canada {olhotak,hendren}@sable.mcgill.ca ABSTRACT
More informationGREATEST COMMON DIVISOR
DEFINITION: GREATEST COMMON DIVISOR The greatest common divisor (gcd) of a and b, denoted by (a, b), is the largest common divisor of integers a and b. THEOREM: If a and b are nonzero integers, then their
More informationFoundations of Computing Discrete Mathematics Solutions to exercises for week 2
Foundations of Computing Discrete Mathematics Solutions to exercises for week 2 Agata Murawska (agmu@itu.dk) September 16, 2013 Note. The solutions presented here are usually one of many possiblities.
More informationA Static Analyzer for Large SafetyCritical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation
PLDI 03 A Static Analyzer for Large SafetyCritical Software B. Blanchet, P. Cousot, R. Cousot, J. Feret L. Mauborgne, A. Miné, D. Monniaux,. Rival CNRS École normale supérieure École polytechnique Paris
More informationClipping polygons the SutherlandHodgman algorithm
Clipping polygons would seem to be quite complex. Clipping polygons would seem to be quite complex. single Clipping polygons would seem to be quite complex. single Clipping polygons would seem to be quite
More information(Refer Slide Time 1.50)
Discrete Mathematical Structures Dr. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 2 Lecture #11 Induction Today we shall consider proof
More informationComputational Geometry
Lecture 10: 1 Lecture 10: Voronoi diagram Spatial interpolation Given some trees, seen from above, which region will they occupy? 2 Lecture 10: Voronoi diagram Spatial interpolation Given some trees, seen
More informationUnix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2
Unix Shell Scripts Norman Matloff July 30, 2008 Contents 1 Introduction 1 2 Invoking Shell Scripts 2 2.1 Direct Interpretation....................................... 2 2.2 Indirect Interpretation......................................
More informationPython Programming: An Introduction To Computer Science
Python Programming: An Introduction To Computer Science Chapter 8 Booleans and Control Structures Python Programming, 2/e 1 Objectives æ To understand the concept of Boolean expressions and the bool data
More informationNote: This App is under development and available for testing on request. Note: This App is under development and available for testing on request. Note: This App is under development and available for
More informationOn every sheet please give your first name, last name, and matriculation number.
RHEINISCH WESTFÄLISCHE TECHNISCHE HOCHSCHULE AACHEN LEHR UND FORSCHUNGSGEBIET INFORMATIK 2 RWTH Aachen D52056 Aachen GERMANY http://verify.rwthaachen.de/ LuFG Informatik II Functional Programming Exam,
More informationA production system monitor for parallel computers
Carnegie Mellon University Research Showcase @ CMU Computer Science Department School of Computer Science 1977 A production system monitor for parallel computers Charles L.(Charles Lanny) Forgy Carnegie
More informationCOMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
More informationTranslating to Java. Translation. Input. Many Level Translations. read, get, input, ask, request. Requirements Design Algorithm Java Machine Language
Translation Translating to Java Introduction to Computer Programming The job of a programmer is to translate a problem description into a computer language. You need to be able to convert a problem description
More informationIteration CHAPTER 6. Topic Summary
CHAPTER 6 Iteration TOPIC OUTLINE 6.1 while Loops 6.2 for Loops 6.3 Nested Loops 6.4 Offby1 Errors 6.5 Random Numbers and Simulations 6.6 Loop Invariants (AB only) Topic Summary 6.1 while Loops Many
More informationMonotone Partitioning. Polygon Partitioning. Monotone polygons. Monotone polygons. Monotone Partitioning. ! Define monotonicity
Monotone Partitioning! Define monotonicity Polygon Partitioning Monotone Partitioning! Triangulate monotone polygons in linear time! Partition a polygon into monotone pieces Monotone polygons! Definition
More informationChapter 2: Algorithm Discovery and Design. Invitation to Computer Science, C++ Version, Third Edition
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition Objectives In this chapter, you will learn about: Representing algorithms Examples of algorithmic problem
More informationPart I. Multiple Choice Questions (2 points each):
Part I. Multiple Choice Questions (2 points each): 1. Which of the following is NOT a key component of object oriented programming? (a) Inheritance (b) Encapsulation (c) Polymorphism (d) Parallelism ******
More informationGCE. Computing. Mark Scheme for January 2011. Advanced Subsidiary GCE Unit F452: Programming Techniques and Logical Methods
GCE Computing Advanced Subsidiary GCE Unit F452: Programming Techniques and Logical Methods Mark Scheme for January 2011 Oxford Cambridge and RSA Examinations OCR (Oxford Cambridge and RSA) is a leading
More informationPOLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful
POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful RALF HINZE Institute of Information and Computing Sciences Utrecht University Email: ralf@cs.uu.nl Homepage: http://www.cs.uu.nl/~ralf/
More informationUniversity of Potsdam Faculty of Computer Science. Clause Learning in SAT Seminar Automatic Problem Solving WS 2005/06
University of Potsdam Faculty of Computer Science Clause Learning in SAT Seminar Automatic Problem Solving WS 2005/06 Authors: Richard Tichy, Thomas Glase Date: 25th April 2006 Contents 1 Introduction
More informationSpark. Fast, Interactive, Language Integrated Cluster Computing
Spark Fast, Interactive, Language Integrated Cluster Computing Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauley, Michael Franklin, Scott Shenker, Ion Stoica UC
More informationExtending Dependencies with Conditions
Extending Dependencies with Conditions Loreto Bravo University of Edinburgh lbravo@inf.ed.ac.uk Wenfei Fan Univ. of Edinburgh & Bell Labs wenfei@inf.ed.ac.uk Shuai Ma University of Edinburgh sma1@inf.ed.ac.uk
More informationOutline. Conditional Statements. Logical Data in C. Logical Expressions. Relational Examples. Relational Operators
Conditional Statements For computer to make decisions, must be able to test CONDITIONS IF it is raining THEN I will not go outside IF Count is not zero THEN the Average is Sum divided by Count Conditions
More informationChapter 7: Relational Database Design
Chapter 7: Relational Database Design Pitfalls in Relational Database Design Decomposition Normalization Using Functional Dependencies Normalization Using Multivalued Dependencies Normalization Using Join
More informationEuler Paths and Euler Circuits
Euler Paths and Euler Circuits An Euler path is a path that uses every edge of a graph exactly once. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler path starts and
More information