Siddharth Srivastava, Neil Immerman, Shlomo Zilberstein University of Massachusetts Amherst.

Slides:



Advertisements
Similar presentations
Siddharth Srivastava, Shlomo Zilberstein, Neil Immerman University of Massachusetts Amherst Hector Geffner Universitat Pompeu Fabra.
Advertisements

Logic: The Big Picture Propositional logic: atomic statements are facts –Inference via resolution is sound and complete (though likely computationally.
Lecture 24 MAS 714 Hartmut Klauck
Querying Workflow Provenance Susan B. Davidson University of Pennsylvania Joint work with Zhuowei Bao, Xiaocheng Huang and Tova Milo.
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
Chapter 8 ICS 412. Code Generation Final phase of a compiler construction. It generates executable code for a target machine. A compiler may instead generate.
Static Single Assignment CS 540. Spring Efficient Representations for Reachability Efficiency is measured in terms of the size of the representation.
Control Structures Any mechanism that departs from straight-line execution: –Selection: if-statements –Multiway-selection: case statements –Unbounded iteration:
1 Graphplan José Luis Ambite * [* based in part on slides by Jim Blythe and Dan Weld]
Chapter 10 Code Optimization. A main goal is to achieve a better performance Front End Code Gen Intermediate Code source Code target Code user Machine-
1 Complexity of domain-independent planning José Luis Ambite.
Timed Automata.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
For Monday Finish chapter 12 Homework: –Chapter 13, exercises 8 and 15.
Fundamentals of Python: From First Programs Through Data Structures
Planning with Loops Some New Results Yuxiao (Toby) Hu and Hector Levesque University of Toronto.
Planning CSE 473 Chapters 10.3 and 11. © D. Weld, D. Fox 2 Planning Given a logical description of the initial situation, a logical description of the.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Compiler Challenges, Introduction to Data Dependences Allen and Kennedy, Chapter 1, 2.
Improving code generation. Better code generation requires greater context Over expressions: optimal ordering of subtrees Over basic blocks: Common subexpression.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
CSE 830: Design and Theory of Algorithms
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
EECS 598: Background in Theory of Computation Igor L. Markov and John P. Hayes
CS 412/413 Spring 2007Introduction to Compilers1 Lecture 29: Control Flow Analysis 9 Apr 07 CS412/413 Introduction to Compilers Tim Teitelbaum.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Improving Code Generation Honors Compilers April 16 th 2002.
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
By: Er. Sukhwinder kaur.  Computation Computation  Algorithm Algorithm  Objectives Objectives  What do we study in Theory of Computation ? What do.
CHA2555 Week2: Knowledge Representation, Logic and Planning Lee McCluskey First term:
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
Chapter 12 Recursion, Complexity, and Searching and Sorting
Computer Science 340 Software Design & Testing UML Sequence Diagrams.
Dynamic Program Analysis with Partial Execution and Summary Thomas Huining Feng CHESS, UC Berkeley May 8, 2007 CS.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
1 Querying Infinite Databases Safety of Datalog Queries over infinite Databases (Sagiv and Vardi ’90) Queries and Computation on the Web (Abiteboul and.
G ENETIC P ROGRAMMING Ranga Rodrigo March 17,
Artificial Intelligence: Introduction Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1 Reasoning with Infinite stable models Piero A. Bonatti presented by Axel Polleres (IJCAI 2001,
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
THE HALTING PROBLEM - PROOF. Review  What makes a problem decidable?  3 properties of an efficient algorithm?  What is the meaning of “complete”, “mechanistic”,
Artificial Intelligence
Code Optimization.
Data Structures and Algorithms
Introduction to Algorithms
Lecture 2 Introduction to Programming
Algorithm Analysis CSE 2011 Winter September 2018.
Introduction to Computer Programming
Intermediate Representations
Module #7: Algorithmic Complexity
Intermediate Representations
Analysis models and design models
Module #7: Algorithmic Complexity
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
GraphPlan Jim Blythe.
[* based in part on slides by Jim Blythe and Dan Weld]
Presentation transcript:

Siddharth Srivastava, Neil Immerman, Shlomo Zilberstein University of Massachusetts Amherst

 Cyclic control is essential in algorithms  Essential to many branches of AI for the same reasons  Makes control structures compact, more generally applicable  Examples: ▪ Workflow mining ▪ Programming by demonstration ▪ Automated planning ▪ Automated service composition ▪ Synthesis of robot controllers

[Eker et al. ‘09]

 Given: sequences of ops for reversing small linked lists  Generate: reverse algorithm for unbounded LL

 Plans with loops: broad applicability [Winner et al. ’03, Bonet et al. ’09, Hu et al. ’10]

[ICAPS GenPlan‘09, AIJ ‘11] Common Challenges  Applicability test  Cost of instantiation  Domain coverage  Quality of instantiation  Complexity of representation  Control knowledge +  A method for instantiation Given a problem instance, will the execution of this GP solve it? i.e.: Terminate? Reach a goal state? = Correctness Given a problem instance, will the execution of this GP solve it? i.e.: Terminate? Reach a goal state? = Correctness

Typical assumption: loop = non-nested iteration over collections Fundamental Open Questions Are there useful, more general classes where reasoning about loops is even computable? How can we categorize such problem classes? How can we determine if a cyclic control flow will terminate and achieve a desired result in these classes? Fundamental Open Questions Are there useful, more general classes where reasoning about loops is even computable? How can we categorize such problem classes? How can we determine if a cyclic control flow will terminate and achieve a desired result in these classes?

[Abacus Programs]

 Finite sets of states & registers  Actions with unit increments/decrements  Decrement actions have two effects:  If R1=0, goto S3  If R1>0: R1--; goto S2 Turing Machine-equivalent model of computation [Lambek, 61]

 Abacus programs can express any control flow  The reachability problem: Can state S i be reached in an execution? Addresses both termination and correctness

 But reachability is equivalent to the halting problem for Turing machines in general… Undecidable! We identified useful cases where it can be solved

 We build on this idea to develop methods for  Simple loops  Monotone simple loops with shortcuts

Need to be monotone: Net change on a register (if any) in each simple loop must have the same sign

loop 1 loop 2 Loop1: increases R1 by 3 Loop2: decreases it by 2, then increases it by 5 Precondition for 1 iteration is order dependent (maintain R1 ≥ 0): Loop1, Loop2Loop2, Loop1 R1 ≥ 0R1 ≥ 2 Such conditions cannot even be expressed efficiently using linear constraints We compute conditions for an adversarial ordering

 Computed conditions are also necessary if:  every simple loop with shortcuts is order independent [Srivastava et al., ICAPS-10]

 These results allow us to:  Test correctness of a given generalized plan  Search for safe control structures

Under some conditions, can ensure: All branch effects categorized by “role”-counts Role-counts undergo constant change due to actions [Srivastava et al., AIJ-11]

 Are there useful, more general classes where reasoning about loops is even computable?  Yes!  How can we categorize such problem classes?  Abacus programs; structural properties  In these classes, how can we determine if a cyclic control flow will terminate and achieve a desired result?  Translation to abacus programs  Reachability queries

 Removing monotonicity makes reachability undecidable  even for simple loops with shortcuts!  Future Work  Efficiently expressing order dependent preconditions  Identifying greater classes of abacus programs(?) where reachability is decidable to be continued…