Computing Applicability Conditions for Plans with Loops

Size: px
Start display at page:

Download "Computing Applicability Conditions for Plans with Loops"

Transcription

1 Abacus Programs Translation Examples Computing Applicability Conditions for Plans with Loops Siddharth Srivastava Neil Immerman Shlomo Zilberstein Department of Computer Science, University of Massachusetts Amherst Twentieth International Conference on Automated Planning and Scheduling 15 May, 2010 Siddharth Srivastava Applicability Conditions for Plans with Loops 1

2 Abacus Programs Translation Examples Plans with Loops Siddharth Srivastava Applicability Conditions for Plans with Loops 2

3 Abacus Programs Translation Examples Plans with Loops Loops = smaller, more general plans; allow unknown quantities Siddharth Srivastava Applicability Conditions for Plans with Loops 2

4 Abacus Programs Translation Examples Plans with Loops: Power D C A B [Bonet et al., 2009] Siddharth Srivastava Applicability Conditions for Plans with Loops 3

5 Abacus Programs Translation Examples Plans with Loops: Power D C A B Correct numbers of iterations can reach any point in the interior Siddharth Srivastava Applicability Conditions for Plans with Loops 3

6 Abacus Programs Translation Examples Plans with Loops: Risk G S Siddharth Srivastava Applicability Conditions for Plans with Loops 4

7 Abacus Programs Translation Examples Plans with Loops: Risk G S Never reaches G! A plan with loops may traverse almost the entire state space without solving the problem Siddharth Srivastava Applicability Conditions for Plans with Loops 4

8 Abacus Programs Translation Examples Loop Effects and Preconditions Why analyze loops of actions? During construction: utility, safety of potential loops After construction: will plan Π solve problem instance x? Longstanding issues of plan reuse Triangle tables, macro operators: linear sequences [Fikes et al., 1972] Siddharth Srivastava Applicability Conditions for Plans with Loops 5

9 Abacus Programs Translation Examples Existing Approaches [Levesque, 2005, Winner and Veloso, 2007, Bonet et al., 2009] Plan Generation Observe working plans Extract repetitive patterns and make loops Loop utility justified largely by prior experience Plan Execution Apply on any problem instance No preconditions; instantiation may traverse the entire state space! (EX: [Levesque, 2005]) Fundamental problems behind these limitations: termination, reachability in plans with loops. Siddharth Srivastava Applicability Conditions for Plans with Loops 6

10 Abacus Programs Translation Examples Overview Abacus Programs Linear Abacus Programs Abacus Programs with Simple Loops Abacus Programs with Complex Loops Theoretical Results Translating Plans to Abacus Programs Empirical Results Siddharth Srivastava Applicability Conditions for Plans with Loops 7

11 Abacus Programs Definition R finite set of registers S finite set of states s 0 initial state s h halt state l S A Actions (A): Inc(r, s): r + +; goto s Dec(r, s 1, s 2 ): if r = 0 goto s 1 else r ; goto s 2 Turing-complete = reachability is undecidable Siddharth Srivastava Applicability Conditions for Plans with Loops 8

12 Linear Abacus Programs Can Efficiently Find Cumulative action effects Branch Conditions Siddharth Srivastava Applicability Conditions for Plans with Loops 9

13 Linear Abacus Programs Notation Can Efficiently Find Cumulative action effects Branch Conditions R R 1, R 2,... R k Ai A(i) R i Ai s change vector Index of Ai s register R i 1...m A1 + + Am Siddharth Srivastava Applicability Conditions for Plans with Loops 9

14 Linear Abacus Programs Notation Can Efficiently Find Cumulative action effects Branch Conditions R R 1, R 2,... R k Ai A(i) R i Ai s change vector Index of Ai s register R i 1...m A1 + + Am Siddharth Srivastava Applicability Conditions for Plans with Loops 9

15 Linear Abacus Programs: Preconditions Necessary and Sufficient Conditions Sequence of n actions; F = final register values ( R i 1 ) A(i) 0, i = 1... n F = R + 1..n Siddharth Srivastava Applicability Conditions for Plans with Loops 10

16 Abacus Programs with Simple Loops Siddharth Srivastava Applicability Conditions for Plans with Loops 11

17 Abacus Programs with Simple Loops LoopIneq( R 0 ) ( R i 1 ) A(i) 0 i = 1... n Siddharth Srivastava Applicability Conditions for Plans with Loops 11

18 Abacus Programs with Simple Loops LoopIneq( R 0 ) ( R i 1 ) A(i) 0 i = 1... n R x = R 0 + x 1..n Siddharth Srivastava Applicability Conditions for Plans with Loops 11

19 Abacus Programs with Simple Loops LoopIneq( R 0 ) ( R i 1 ) A(i) 0 R x = R 0 + x 1..n i = 1... n For l complete iterations: LoopIneq( R 0 ) LoopIneq( R 1 ) LoopIneq( R l 1 ) LoopIneq( R 0 ) LoopIneq( R l 1 ) Siddharth Srivastava Applicability Conditions for Plans with Loops 11

20 Abacus Programs with Simple Loops LoopIneq( R 0 ) ( R i 1 ) A(i) 0 R x = R 0 + x 1..n i = 1... n For l complete iterations: LoopIneq( R 0 ) LoopIneq( R 1 ) LoopIneq( R l 1 ) LoopIneq( R 0 ) LoopIneq( R l 1 ) F = R l = R 0 + l 1...n Siddharth Srivastava Applicability Conditions for Plans with Loops 11

21 Abacus Programs with Simple Loops: Preconditions Necessary and Sufficient Conditions For l complete iterations of a loop with n actions LoopIneq( R 0 ) LoopIneq( R l 1 ) F = R l = R 0 + l 1...n Siddharth Srivastava Applicability Conditions for Plans with Loops 12

22 Recall: Approach Translate plans with loops into abacus programs (preserve structure) Design algorithms for finding preconditions of classes of abacus programs Need to represent sensing actions. Siddharth Srivastava Applicability Conditions for Plans with Loops 13

23 Non-deterministic Actions NSet Action NSet(r, s 1, s 2 ) or set r to 0; goto s 1 S set r to 1; goto s 2 S Siddharth Srivastava Applicability Conditions for Plans with Loops 14

24 Non-deterministic Actions NSet Action NSet(r, s 1, s 2 ) or set r to 0; goto s 1 S set r to 1; goto s 2 S Abacus programs don t need NSet for computational power (Turing-complete). NSet allows in-place translation of plans with sensing actions. Find preconditions in terms of effect counts Siddharth Srivastava Applicability Conditions for Plans with Loops 14

25 Simple Loops with Shortcuts Siddharth Srivastava Applicability Conditions for Plans with Loops 15

26 Simple Loops with Shortcuts More commonly considered nested loops Siddharth Srivastava Applicability Conditions for Plans with Loops 15

27 Simple Loops with Shortcuts More commonly considered nested loops...can be translated by changing the start node. Siddharth Srivastava Applicability Conditions for Plans with Loops 15

28 Simple Loops with Shortcuts Siddharth Srivastava Applicability Conditions for Plans with Loops 15

29 Monotonicity Monotone Shortcuts The net change on a register due to every simple loop created by shortcuts must be in the same direction (positive/negative). Siddharth Srivastava Applicability Conditions for Plans with Loops 16

30 Simple Loops with Shortcuts: Computing Preconditions Suppose: m simple loops; k 1,..., k m iterations F = R 0 + m i=0 k i loop i k i iterations of loop i: no register can fall below zero. Need: least intermediate value of every register 0. Siddharth Srivastava Applicability Conditions for Plans with Loops 17

31 Constraining Minimum Register Values Constraints on Min Values m simple loops; k 1,..., k m iterations R j R + : R 0 j + δ bj 0 R j R : R 0 j + m i=0 k i loop i +δ bj loop bj 0 Notation R + R registers with net positive change registers with net negative change ĵ index of loop with greatest partial negative change on R j. Siddharth Srivastava Applicability Conditions for Plans with Loops 18

32 Order Dependence Constraints on Minimum Register Values R j R + : R 0 j + δ bj 0 R j R : R 0 j + m i=0 k i loop i +δbj loop bj 0 Example loop 1 increase R 1 by 3. loop 2 decrease R 1 by 2, then increase it by 5. Efficiently expressing general order dependent constraints: open problem! Siddharth Srivastava Applicability Conditions for Plans with Loops 19

33 Order Dependence Constraints on Minimum Register Values R j R + : R 0 j + δ bj 0 R j R : R 0 j + m i=0 k i loop i +δbj loop bj 0 Example loop 1 increase R 1 by 3. loop 2 decrease R 1 by 2, then increase it by 5. Constraint R (sufficient condition) Efficiently expressing general order dependent constraints: open problem! Siddharth Srivastava Applicability Conditions for Plans with Loops 19

34 Order Dependence Constraints on Minimum Register Values R j R + : R 0 j + δ bj 0 R j R : Example R 0 j + m i=0 k i loop i +δbj loop bj 0 loop 1 increase R 1 by 3. loop 2 decrease R 1 by 2, then increase it by 5. Constraint R (sufficient condition) Accurate Conditions Order dependent! Efficiently expressing general order dependent constraints: open problem! Siddharth Srivastava Applicability Conditions for Plans with Loops 19

35 Equality Constraints, Order Dependence Non-spurious equality constraint: inherently order dependent Equality constraints, δ bj loop bj induce order dependence (details in paper). Siddharth Srivastava Applicability Conditions for Plans with Loops 20

36 Main Results Let S be a node in an abacus program Π, all of whose strongly connected components are simple loops or simple loops with monotone shortcuts; F: a vector of register values. Theorem We can compute a disjunction of linear constraints on the initial register values ( R 0 ) for reaching S with F. The computed conditions are necessary and sufficient if every simple loop with shortcuts is order independent, and sufficient otherwise. Siddharth Srivastava Applicability Conditions for Plans with Loops 21

37 Abacus Programs Translation Examples Translating Plans To Abacus Programs Siddharth Srivastava Applicability Conditions for Plans with Loops 22

38 Abacus Programs Translation Examples Translating Plans To Abacus Programs #{obj, atl1}=1 movetl1() Changes in role counts: #{obj, atl1, int}++ #{obj, atl1} #{obj, atl2, int}++ #{obj, atl1, int} #{obj, atl2}++ #{obj, atl2, int} c {obj, atl1} {obj, atl1, int} {obj, atl2, int} {truck, atl1} {obj, atl1} choose c: obj(c) atl1(c) #{obj, atl1}>1 {truck, atl1} {obj, atl1} {truck, atl1} {truck, atl2} loadt(c) {obj, atl1} movetl2() {obj, atl1} unloadt() {truck, atl2} {obj, atl1} {obj, atl2} {obj, atl2} {obj, atl2} {obj, atl2} {obj, atl2} S 1 S 2 S 3 S 4 S 5 {truck, atl1} c {obj, atl1} {obj, atl2} S 6 Works for all unary, and a class of binary domains Siddharth Srivastava Applicability Conditions for Plans with Loops 22

39 Abacus Programs Translation Examples Empirical Results s f 3 = mf 3 = 7 i=0 k i; s f 1 = s0 1 7 i=0 k i k 0 k 5 k 6 k 7 = 0 Siddharth Srivastava Applicability Conditions for Plans with Loops 23

40 Abacus Programs Translation Examples Empirical Results Time Taken to Compute Preconditions Problem Time (s) Problem Time(s) Accumulator 0.01 Prize-A(7) 0.02 Corner-A 0.00 Recycling 0.02 Diagonal 0.01 Striped Tower 0.02 Hall-A 0.01 Transport 0.01 Prize-A(5) 0.01 Transport (conditional) 0.06 Siddharth Srivastava Applicability Conditions for Plans with Loops 24

41 Abacus Programs Translation Examples Conclusion An approach for computing summarized effects of loops of actions Use during construction and for precondition evaluation Future work: Greater translation to abacus programs (counts of properties) Further categorization of tractable classes Expression of order dependent constraints Use of symbolic precondition evaluation for non-numeric branches. Siddharth Srivastava Applicability Conditions for Plans with Loops 25

42 Abacus Programs Translation Examples Complete Preconditions Preconditions for a Simple Loop with Shortcuts l = P m i=0 k i; F = R 0 + P m i=0 k i loop i R j R : R j R + : W x=0 j,...,m j ki<x = 0; k x 0; R 0 j + P i x k i loop i + δ x loop x 0 Wx=0 j,...,m j ki<x = 0; k x 0; R 0 j + δ x 0 Siddharth Srivastava Applicability Conditions for Plans with Loops 26

43 Abacus Programs Translation Examples References I Bonet, B., Palacios, H., and Geffner, H. (2009). Automatic derivation of memoryless policies and finite-state controllers using classical planners. In Proc. of the 19th International Conf. on Artificial Intelligence Planning and Scheduling. Fikes, R., Hart, P., and Nilsson, N. (1972). Learning and Executing Generalized Robot Plans. Technical report, AI Center, SRI International. Levesque, H. J. (2005). Planning with loops. In Proc. of IJCAI, pages Siddharth Srivastava Applicability Conditions for Plans with Loops 27

44 Abacus Programs Translation Examples References II Winner, E. and Veloso, M. M. (2007). LoopDISTILL: Learning domain-specific planners from example plans. In Workshop on AI Planning and Learning, ICAPS. Siddharth Srivastava Applicability Conditions for Plans with Loops 28

Computing Applicability Conditions for Plans with Loops

Computing Applicability Conditions for Plans with Loops Computing Applicability Conditions for Plans with Loops Siddharth Srivastava and Neil Immerman and Shlomo Zilberstein Department of Computer Science University of Massachusetts Amherst, MA 01003 {siddharth,

More information

Learning Generalized Plans Using Abstract Counting

Learning Generalized Plans Using Abstract Counting Learning Generalized Plans Using Abstract Counting Siddharth Srivastava, Neil Immerman, Shlomo Zilberstein Twenty Third Conference on Artificial Intelligence 17 th July, 2008 Overview Abstraction Mechanism

More information

Artificial Intelligence

Artificial Intelligence JID:ARTINT AID:538 /FLA [m3g; v 1.47; Prn:9/10/010; 7:51] P.1 (1-33) Artificial Intelligence ( ) Contents lists available at ScienceDirect Artificial Intelligence www.elsevier.com/locate/artint A new representation

More information

Using Abstraction for Generalized Planning

Using Abstraction for Generalized Planning Using Abstraction for Generalized Planning iddharth rivastava and Neil Immerman and hlomo Zilberstein Department of Computer cience, University of Massachusetts, Amherst, MA 0002 Abstract Given the complexity

More information

Abstract Planning with Unknown Object Quantities and Properties

Abstract Planning with Unknown Object Quantities and Properties Proceedings of the Eighth Symposium on Abstraction, Reformulation, and Approximation (SARA2009) Abstract Planning with Unknown Object Quantities and Properties Siddharth Srivastava and Neil Immerman and

More information

Principles of AI Planning. Principles of AI Planning. 7.1 How to obtain a heuristic. 7.2 Relaxed planning tasks. 7.1 How to obtain a heuristic

Principles of AI Planning. Principles of AI Planning. 7.1 How to obtain a heuristic. 7.2 Relaxed planning tasks. 7.1 How to obtain a heuristic Principles of AI Planning June 8th, 2010 7. Planning as search: relaxed planning tasks Principles of AI Planning 7. Planning as search: relaxed planning tasks Malte Helmert and Bernhard Nebel 7.1 How to

More information

Generalized Planning With Procedural Domain Control Knowledge

Generalized Planning With Procedural Domain Control Knowledge Generalized Planning With Procedural Domain Control Knowledge Javier Segovia and Sergio Jiménez and Anders Jonsson Dept. Information and Communication Technologies Universitat Pompeu Fabra Roc Boronat

More information

Planning with Recursive Subgoals

Planning with Recursive Subgoals Planning with Recursive Subgoals Han Yu 1, Dan C. Marinescu 1, Annie S. Wu 1, and Howard Jay Siegel 2 1 School of Computer Science, University of Central Florida, P. O. Box 162362, Orlando, FL 32816-2362

More information

Semi-Independent Partitioning: A Method for Bounding the Solution to COP s

Semi-Independent Partitioning: A Method for Bounding the Solution to COP s Semi-Independent Partitioning: A Method for Bounding the Solution to COP s David Larkin University of California, Irvine Abstract. In this paper we introduce a new method for bounding the solution to constraint

More information

Domain-Dependent Heuristics and Tie-Breakers: Topics in Automated Planning

Domain-Dependent Heuristics and Tie-Breakers: Topics in Automated Planning Domain-Dependent Heuristics and Tie-Breakers: Topics in Automated Planning Augusto B. Corrêa, André G. Pereira, Marcus Ritt 1 Instituto de Informática Universidade Federal do Rio Grande do Sul (UFRGS)

More information

MATH 1A MIDTERM 1 (8 AM VERSION) SOLUTION. (Last edited October 18, 2013 at 5:06pm.) lim

MATH 1A MIDTERM 1 (8 AM VERSION) SOLUTION. (Last edited October 18, 2013 at 5:06pm.) lim MATH A MIDTERM (8 AM VERSION) SOLUTION (Last edited October 8, 03 at 5:06pm.) Problem. (i) State the Squeeze Theorem. (ii) Prove the Squeeze Theorem. (iii) Using a carefully justified application of the

More information

BACKWARD-FORWARD SEARCH FOR MANIPULATION PLANNING

BACKWARD-FORWARD SEARCH FOR MANIPULATION PLANNING BACKWARD-FORWARD SEARCH FOR MANIPULATION PLANNING Caelan Garrett, Tomás Lozano-Pérez, and Leslie Kaelbling MIT CSAIL - IROS 2015 Hybrid Planning Mixed discrete/continuous state & actions Hybrid Planning

More information

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Roman Barták Charles University in Prague, Faculty of Mathematics and Physics Institute for Theoretical Computer

More information

Fast and Informed Action Selection for Planning with Sensing

Fast and Informed Action Selection for Planning with Sensing Fast and Informed Action Selection for Planning with Sensing Alexandre Albore 1, Héctor Palacios 1, and Hector Geffner 2 1 Universitat Pompeu Fabra Passeig de Circumvalació 8 08003 Barcelona Spain 2 ICREA

More information

Chapter 12. Mobile Robots

Chapter 12. Mobile Robots Chapter 12. Mobile Robots The Quest for Artificial Intelligence, Nilsson, N. J., 2009. Lecture Notes on Artificial Intelligence, Spring 2012 Summarized by Kim, Soo-Jin Biointelligence Laboratory School

More information

A Planning Graph Heuristic for Forward-Chaining Adversarial Planning

A Planning Graph Heuristic for Forward-Chaining Adversarial Planning A Planning Graph Heuristic for Forward-Chaining Adversarial Planning Pascal Bercher and Robert Mattmüller Institut für Informatik, Albert-Ludwigs-Universiät Freiburg July 18, 2008 Technical Report 238

More information

Acknowledgements. Outline

Acknowledgements. Outline Acknowledgements Heuristic Search for Planning Sheila McIlraith University of Toronto Fall 2010 Many of the slides used in today s lecture are modifications of slides developed by Malte Helmert, Bernhard

More information

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014 CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014 YOUR NAME: YOUR ID: ID TO RIGHT: ROW: SEAT: The exam will begin on the next page. Please, do not turn the page until told. When you are told to begin

More information

Heuristic Search for Planning

Heuristic Search for Planning Heuristic Search for Planning Sheila McIlraith University of Toronto Fall 2010 S. McIlraith Heuristic Search for Planning 1 / 50 Acknowledgements Many of the slides used in today s lecture are modifications

More information

CmpSci 187: Programming with Data Structures Spring 2015

CmpSci 187: Programming with Data Structures Spring 2015 CmpSci 187: Programming with Data Structures Spring 2015 Lecture #9 John Ridgway February 26, 2015 1 Recursive Definitions, Algorithms, and Programs Recursion in General In mathematics and computer science

More information

8.1 Polynomial-Time Reductions

8.1 Polynomial-Time Reductions 8.1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. Those with polynomial-time algorithms.

More information

Lecture 8: Control Structures I

Lecture 8: Control Structures I Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 8: Control Structures I Intro. to Programming, lecture 8: Control structures

More information

3. Logical Values. Boolean Functions; the Type bool; logical and relational operators; shortcut evaluation

3. Logical Values. Boolean Functions; the Type bool; logical and relational operators; shortcut evaluation 140 3. Logical Values Boolean Functions; the Type bool; logical and relational operators; shortcut evaluation Our Goal 141 int a; std::cin >> a; if (a % 2 == 0) std::cout

More information

3. Logical Values. Our Goal. Boolean Values in Mathematics. The Type bool in C++

3. Logical Values. Our Goal. Boolean Values in Mathematics. The Type bool in C++ Our Goal 3. Logical Values Boolean Functions; the Type bool; logical and relational operators; shortcut evaluation int a; std::cin >> a; if (a % 2 == 0) std::cout

More information

3. Logical Values. Our Goal. Boolean Values in Mathematics. The Type bool in C++

3. Logical Values. Our Goal. Boolean Values in Mathematics. The Type bool in C++ 148 Our Goal 149 3. Logical Values Boolean Functions; the Type bool; logical and relational operators; shortcut evaluation int a; std::cin >> a; if (a % 2 == 0) std::cout

More information

Symbolic LAO* Search for Factored Markov Decision Processes

Symbolic LAO* Search for Factored Markov Decision Processes Symbolic LAO* Search for Factored Markov Decision Processes Zhengzhu Feng Computer Science Department University of Massachusetts Amherst MA 01003 Eric A. Hansen Computer Science Department Mississippi

More information

Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn. 4. Testing

Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn. 4. Testing 4. vs. Model Checking (usually) means checking the correctness of source code Model Checking means verifying the properties of a model given in some formal (not program code) notation Attention: things

More information

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance. Algorithm Design Patterns and Anti-Patterns Chapter 8 NP and Computational Intractability Algorithm design patterns. Ex.! Greed. O(n log n) interval scheduling.! Divide-and-conquer. O(n log n) FFT.! Dynamic

More information

Abstract Interpretation

Abstract Interpretation Abstract Interpretation Ranjit Jhala, UC San Diego April 22, 2013 Fundamental Challenge of Program Analysis How to infer (loop) invariants? Fundamental Challenge of Program Analysis Key issue for any analysis

More information

Labeled RTDP: Improving the Convergence of Real-Time Dynamic Programming

Labeled RTDP: Improving the Convergence of Real-Time Dynamic Programming From: ICAPS-03 Proceedings. Copyright 2003, AAAI (www.aaai.org). All rights reserved. Labeled RTDP: Improving the Convergence of Real-Time Dynamic Programming Blai Bonet Computer Science Department University

More information

Software Model Checking with Abstraction Refinement

Software Model Checking with Abstraction Refinement Software Model Checking with Abstraction Refinement Computer Science and Artificial Intelligence Laboratory MIT Armando Solar-Lezama With slides from Thomas Henzinger, Ranjit Jhala and Rupak Majumdar.

More information

Statements or Basic Blocks (Maximal sequence of code with branching only allowed at end) Possible transfer of control

Statements or Basic Blocks (Maximal sequence of code with branching only allowed at end) Possible transfer of control Control Flow Graphs Nodes Edges Statements or asic locks (Maximal sequence of code with branching only allowed at end) Possible transfer of control Example: if P then S1 else S2 S3 S1 P S3 S2 CFG P predecessor

More information

Einführung in die Programmierung Introduction to Programming

Einführung in die Programmierung Introduction to Programming Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 8: Control Structures I In this (double) lecture The notion of algorithm Basic

More information

Simplifying Loop Invariant Generation Using Splitter Predicates. Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University

Simplifying Loop Invariant Generation Using Splitter Predicates. Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University Simplifying Loop Invariant Generation Using Splitter Predicates Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University Loops and Loop Invariants Loop Head x = 0; while( x

More information

4. Logical Values. Our Goal. Boolean Values in Mathematics. The Type bool in C++

4. Logical Values. Our Goal. Boolean Values in Mathematics. The Type bool in C++ 162 Our Goal 163 4. Logical Values Boolean Functions; the Type bool; logical and relational operators; shortcut evaluation int a; std::cin >> a; if (a % 2 == 0) std::cout

More information

Learning to Choose Instance-Specific Macro Operators

Learning to Choose Instance-Specific Macro Operators Learning to Choose Instance-Specific Macro Operators Maher Alhossaini Department of Computer Science University of Toronto Abstract The acquisition and use of macro actions has been shown to be effective

More information

Temporal Dynamic Controllability Revisited

Temporal Dynamic Controllability Revisited Temporal Dynamic Controllability Revisited Paul Morris and Nicola Muscettola NASA Ames Research Center Moffett Field, CA 94043 (pmorris mus)@email.arc.nasa.gov Abstract An important issue for temporal

More information

Computability and Complexity Sample Exam Questions

Computability and Complexity Sample Exam Questions Computability and Complexity Sample Exam Questions Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Family Name: Given Name: Matriculation Number: Study Code: Total: 100 Points. 51 Points: GEN4 64 Points:

More information

Strong Controllability of Disjunctive Temporal Problems with Uncertainty

Strong Controllability of Disjunctive Temporal Problems with Uncertainty Strong Controllability of Disjunctive Temporal Problems with Uncertainty Bart Peintner 1, Kristen Brent Venable 2, and Neil Yorke-Smith 1 1 Artificial Intelligence Center, SRI International. {peintner,nysmith}@ai.sri.com

More information

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 Algorithm Design Patterns and Anti-Patterns Algorithm design patterns.

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 9 January 26, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis decidable, RE, co-re languages Deciding and Recognizing

More information

Compiler Design. Fall Control-Flow Analysis. Prof. Pedro C. Diniz

Compiler Design. Fall Control-Flow Analysis. Prof. Pedro C. Diniz Compiler Design Fall 2015 Control-Flow Analysis Sample Exercises and Solutions Prof. Pedro C. Diniz USC / Information Sciences Institute 4676 Admiralty Way, Suite 1001 Marina del Rey, California 90292

More information

CSCI 270: Introduction to Algorithms and Theory of Computing Fall 2017 Prof: Leonard Adleman Scribe: Joseph Bebel

CSCI 270: Introduction to Algorithms and Theory of Computing Fall 2017 Prof: Leonard Adleman Scribe: Joseph Bebel CSCI 270: Introduction to Algorithms and Theory of Computing Fall 2017 Prof: Leonard Adleman Scribe: Joseph Bebel We will now discuss computer programs, a concrete manifestation of what we ve been calling

More information

Chapter 3: Search. c D. Poole, A. Mackworth 2010, W. Menzel 2015 Artificial Intelligence, Chapter 3, Page 1

Chapter 3: Search. c D. Poole, A. Mackworth 2010, W. Menzel 2015 Artificial Intelligence, Chapter 3, Page 1 Chapter 3: Search c D. Poole, A. Mackworth 2010, W. Menzel 2015 Artificial Intelligence, Chapter 3, Page 1 Searching Often we are not given an algorithm to solve a problem, but only a specification of

More information

NDL A Modeling Language for Planning

NDL A Modeling Language for Planning NDL A Modeling Language for Planning Jussi Rintanen Aalto University Department of Computer Science February 20, 2017 Abstract This document describes the NDL modeling language for deterministic full information

More information

A short manual for the tool Accumulator

A short manual for the tool Accumulator A short manual for the tool Accumulator ZHAO Jianhua State Key Laboratory of Novel Software Technology Dept. of Computer Sci. and Tech. Nanjing University Nanjing, Jiangsu, P.R.China 210093 zhaojh@nju.edu.cn

More information

Formalizing the PRODIGY Planning Algorithm

Formalizing the PRODIGY Planning Algorithm Formalizing the PRODIGY Planning Algorithm Eugene Fink eugene@cs.cmu.edu http://www.cs.cmu.edu/~eugene Manuela Veloso veloso@cs.cmu.edu http://www.cs.cmu.edu/~mmv Computer Science Department, Carnegie

More information

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance. Algorithm Design Patterns and Anti-Patterns 8. NP and Computational Intractability Algorithm design patterns. Ex.! Greed. O(n log n) interval scheduling.! Divide-and-conquer. O(n log n) FFT.! Dynamic programming.

More information

Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming

Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming Raphael Arias Technische Universität München 19.1.2015 Abstract

More information

Having a BLAST with SLAM

Having a BLAST with SLAM Having a BLAST with SLAM # #2 Topic: Software Model Checking via Counter-Example Guided Abstraction Refinement There are easily two dozen SLAM/BLAST/MAGIC papers; I will skim. #3 SLAM Overview INPUT: Program

More information

Metis: Arming Fast Downward with Pruning and Incremental Computation

Metis: Arming Fast Downward with Pruning and Incremental Computation Metis: Arming Fast Downward with Pruning and Incremental Computation Yusra Alkhazraji University of Freiburg, Germany alkhazry@informatik.uni-freiburg.de Florian Pommerening University of Basel, Switzerland

More information

Program Static Analysis. Overview

Program Static Analysis. Overview Program Static Analysis Overview Program static analysis Abstract interpretation Data flow analysis Intra-procedural Inter-procedural 2 1 What is static analysis? The analysis to understand computer software

More information

ScienceDirect. Plan Restructuring in Multi Agent Planning

ScienceDirect. Plan Restructuring in Multi Agent Planning Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 46 (2015 ) 396 401 International Conference on Information and Communication Technologies (ICICT 2014) Plan Restructuring

More information

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch. Iterative Improvement Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible

More information

6 th International Planning Competition: Uncertainty Part

6 th International Planning Competition: Uncertainty Part 6 th International Planning Competition: Uncertainty Part Daniel Bryce SRI International bryce@ai.sri.com Olivier Buffet LORIA-INRIA olivier.buffet@loria.fr Abstract The 6 th International Planning Competition

More information

International Planning Competition Uncertainty Part: Benchmarks and Results

International Planning Competition Uncertainty Part: Benchmarks and Results International Planning Competition Uncertainty Part: Benchmarks and Results Daniel Bryce Olivier Buffet September, Introduction Organizing an automated planning competition raises various difficulties:

More information

CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 2016

CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 2016 CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 016 YOUR NAME: YOUR ID: ID TO RIGHT: ROW: SEAT: The exam will begin on the next page. Please, do not turn the page until told. When you are told to begin

More information

From Conformant into Classical Planning: Efficient Translations That May be Complete Too

From Conformant into Classical Planning: Efficient Translations That May be Complete Too From Conformant into Classical Planning: Efficient Translations That May be Complete Too Héctor Palacios Departamento de Tecnología Universitat Pompeu Fabra 08003 Barcelona, SPAIN hector.palacios@upf.edu

More information

Concurrent Systems Modeling using Petri Nets Part II

Concurrent Systems Modeling using Petri Nets Part II Concurrent Systems Modeling using Petri Nets Part II Marlon Dumas (Based on lecture material by Wil van der Aalst Eindhoven University of Technology, The Netherlands http://www.workflowcourse.com) PN-1

More information

Lecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming

Lecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming Structured Programming & an Introduction to Error Lecture Objectives Review the basic good habits of programming To understand basic concepts of error and error estimation as it applies to Numerical Methods

More information

Theorem 2.9: nearest addition algorithm

Theorem 2.9: nearest addition algorithm There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used

More information

Distance and Collision Detection

Distance and Collision Detection Distance and Collision Detection Efi Fogel efif@post.tau.ac.il School of computer science, Tel Aviv University Fall 2003/4 Motion Planning seminar 1/33 The Papers A Fast Procedure for Computing the Distance

More information

A Crash Course in Compilers for Parallel Computing. Mary Hall Fall, L2: Transforms, Reuse, Locality

A Crash Course in Compilers for Parallel Computing. Mary Hall Fall, L2: Transforms, Reuse, Locality A Crash Course in Compilers for Parallel Computing Mary Hall Fall, 2008 1 Overview of Crash Course L1: Data Dependence Analysis and Parallelization (Oct. 30) L2 & L3: Loop Reordering Transformations, Reuse

More information

CS450 - Structure of Higher Level Languages

CS450 - Structure of Higher Level Languages Spring 2018 Streams February 24, 2018 Introduction Streams are abstract sequences. They are potentially infinite we will see that their most interesting and powerful uses come in handling infinite sequences.

More information

CS 135 Fall 2018 Final Exam Review. CS 135 Fall 2018 Final Exam Review 1

CS 135 Fall 2018 Final Exam Review. CS 135 Fall 2018 Final Exam Review 1 CS 135 Fall 2018 Final Exam Review CS 135 Fall 2018 Final Exam Review 1 Final Exam Information The final exam will be held on Saturday, December 15 th 9:00AM - 11:30AM in the PAC Check your exam seating

More information

COMP 102: Computers and Computing

COMP 102: Computers and Computing COMP 102: Computers and Computing Lecture 26: Final Exam Review Instructor: Kaleem Siddiqi (siddiqi@cim.mcgill.ca) Class web page: www.cim.mcgill.ca/~siddiqi/102.html Number Representation and Logic Binary

More information

VS 3 : SMT Solvers for Program Verification

VS 3 : SMT Solvers for Program Verification VS 3 : SMT Solvers for Program Verification Saurabh Srivastava 1,, Sumit Gulwani 2, and Jeffrey S. Foster 1 1 University of Maryland, College Park, {saurabhs,jfoster}@cs.umd.edu 2 Microsoft Research, Redmond,

More information

An Approach to State Aggregation for POMDPs

An Approach to State Aggregation for POMDPs An Approach to State Aggregation for POMDPs Zhengzhu Feng Computer Science Department University of Massachusetts Amherst, MA 01003 fengzz@cs.umass.edu Eric A. Hansen Dept. of Computer Science and Engineering

More information

Classical Planning Problems: Representation Languages

Classical Planning Problems: Representation Languages jonas.kvarnstrom@liu.se 2017 Classical Planning Problems: Representation Languages History: 1959 3 The language of Artificial Intelligence was/is logic First-order, second-order, modal, 1959: General

More information

Modeling Crisis Management System With the Restricted Use Case Modeling Approach

Modeling Crisis Management System With the Restricted Use Case Modeling Approach Modeling Crisis Management System With the Restricted Use Case Modeling Approach Gong Zhang 1, Tao Yue 2, and Shaukat Ali 3 1 School of Computer Science and Engineering, Beihang University, Beijing, China

More information

King s Research Portal

King s Research Portal King s Research Portal Link to publication record in King's Research Portal Citation for published version (APA): Krivic, S., Cashmore, M., Ridder, B. C., & Piater, J. (2016). Initial State Prediction

More information

Concurrent Systems Modeling using Petri Nets Part II

Concurrent Systems Modeling using Petri Nets Part II Concurrent Systems Modeling using Petri Nets Part II Marlon Dumas (Based on lecture material by Wil van der Aalst Eindhoven University of Technology, The Netherlands http://www.workflowcourse.com) PN-1

More information

CpSc 421 Final Solutions

CpSc 421 Final Solutions CpSc 421 Final Solutions Do any eight of the ten problems below. If you attempt more than eight problems, please indicate which ones to grade (otherwise we will make a random choice). This allows you to

More information

Fault-Tolerant Planning under Uncertainty

Fault-Tolerant Planning under Uncertainty Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence Fault-Tolerant Planning under Uncertainty Luis Pineda, Yi Lu, Shlomo Zilberstein, Claudia V. Goldman School of

More information

Logic Programming and MDPs for Planning. Alborz Geramifard

Logic Programming and MDPs for Planning. Alborz Geramifard Logic Programming and MDPs for Planning Alborz Geramifard Winter 2009 Index Introduction Logic Programming MDP MDP+ Logic + Programming 2 Index Introduction Logic Programming MDP MDP+ Logic + Programming

More information

Efficiently Reasoning about Programs

Efficiently Reasoning about Programs Efficiently Reasoning about Programs Neil Immerman College of Computer and Information Sciences University of Massachusetts, Amherst Amherst, MA, USA people.cs.umass.edu/ immerman co-r.e. complete Halt

More information

The Fast Downward Planning System

The Fast Downward Planning System Journal of Artificial Intelligence Research 26 (2006) 191 246 Submitted 01/05; published 07/06 The Fast Downward Planning System Malte Helmert Institut für Informatik Albert-Ludwigs-Universität Freiburg

More information

NP and computational intractability. Kleinberg and Tardos, chapter 8

NP and computational intractability. Kleinberg and Tardos, chapter 8 NP and computational intractability Kleinberg and Tardos, chapter 8 1 Major Transition So far we have studied certain algorithmic patterns Greedy, Divide and conquer, Dynamic programming to develop efficient

More information

Extending PDDL for Hierarchical Planning and Topological Abstraction

Extending PDDL for Hierarchical Planning and Topological Abstraction Extending PDDL for Hierarchical Planning and Topological Abstraction Adi Botea and Martin Müller and Jonathan Schaeffer Department of Computing Science, University of Alberta Edmonton, Alberta, Canada

More information

UNIVERSITY OF TORONTO Faculty of Arts and Science

UNIVERSITY OF TORONTO Faculty of Arts and Science UNIVERSITY OF TORONTO Faculty of Arts and Science Midterm 2 s CSC148H1F Duration: 50 min. Instructors: Diane Horton, David Liu. Examination Aids: Provided aid sheet Name: Student Number: Please read the

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Planning with Primary Effects: Experiments and Analysis

Planning with Primary Effects: Experiments and Analysis Planning with Primary Effects: Experiments and Analysis Eugene Fink Computer Science, Carnegie Mellon University Pittsburgh, Pennsylvania 15213, USA eugene@cs.cmu.edu Qiang Yang Computer Science, University

More information

Planning with Loops. Hector J. Levesque Λ Dept. of Computer Science University of Toronto Toronto, Ont. M5S 3H5

Planning with Loops. Hector J. Levesque Λ Dept. of Computer Science University of Toronto Toronto, Ont. M5S 3H5 Planning with Loops Hector J. Levesque Λ Dept. of Computer Science University of Toronto Toronto, Ont. M5S 3H5 hector@cs.toronto.edu Abstract Unlike the case for sequential and conditional planning, much

More information

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE A Modern Approach to Discrete Mathematics SIXTH EDITION Judith L. Gersting University of Hawaii at Hilo W. H. Freeman and Company New York Preface Note to the

More information

Chapter S:V. V. Formal Properties of A*

Chapter S:V. V. Formal Properties of A* Chapter S:V V. Formal Properties of A* Properties of Search Space Graphs Auxiliary Concepts Roadmap Completeness of A* Admissibility of A* Efficiency of A* Monotone Heuristic Functions S:V-1 Formal Properties

More information

Compiling for Advanced Architectures

Compiling for Advanced Architectures Compiling for Advanced Architectures In this lecture, we will concentrate on compilation issues for compiling scientific codes Typically, scientific codes Use arrays as their main data structures Have

More information

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions Dr. Amotz Bar-Noy s Compendium of Algorithms Problems Problems, Hints, and Solutions Chapter 1 Searching and Sorting Problems 1 1.1 Array with One Missing 1.1.1 Problem Let A = A[1],..., A[n] be an array

More information

AM 121: Intro to Optimization Models and Methods Fall 2017

AM 121: Intro to Optimization Models and Methods Fall 2017 AM 121: Intro to Optimization Models and Methods Fall 2017 Lecture 10: Dual Simplex Yiling Chen SEAS Lesson Plan Interpret primal simplex in terms of pivots on the corresponding dual tableau Dictionaries

More information

Generic Types and their Use in Improving the Quality of Search Heuristics

Generic Types and their Use in Improving the Quality of Search Heuristics Generic Types and their Use in Improving the Quality of Search Heuristics Andrew Coles and Amanda Smith Department of Computer and Information Sciences, University of Strathclyde, 26 Richmond Street, Glasgow,

More information

COMP 382: Reasoning about algorithms

COMP 382: Reasoning about algorithms Spring 2015 Unit 2: Models of computation What is an algorithm? So far... An inductively defined function Limitation Doesn t capture mutation of data Imperative models of computation Computation = sequence

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Announcements Grading questions:

More information

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens CS 188: Artificial Intelligence Fall 2008 Announcements Grading questions: don t panic, talk to us Newsgroup: check it out Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted

More information

GRAPHING LINEAR INEQUALITIES AND FEASIBLE REGIONS

GRAPHING LINEAR INEQUALITIES AND FEASIBLE REGIONS SECTION 3.1: GRAPHING LINEAR INEQUALITIES AND FEASIBLE REGIONS We start with a reminder of the smart way to graph a Linear Equation for the typical example we see in this course, namely using BOTH X- and

More information

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012 CS-XXX: Graduate Programming Languages Lecture 9 Simply Typed Lambda Calculus Dan Grossman 2012 Types Major new topic worthy of several lectures: Type systems Continue to use (CBV) Lambda Caluclus as our

More information

Theory of Computer Science

Theory of Computer Science Theory of Computer Science D3. GOTO-Computability Malte Helmert University of Basel April 25, 2016 Overview: Computability Theory Computability Theory imperative models of computation: D1. Turing-Computability

More information

CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION

CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION 1. What is performance measurement? 2. What is an algorithm? 3. How the algorithm is good? 4. What are the

More information

Recursion. COMS W1007 Introduction to Computer Science. Christopher Conway 26 June 2003

Recursion. COMS W1007 Introduction to Computer Science. Christopher Conway 26 June 2003 Recursion COMS W1007 Introduction to Computer Science Christopher Conway 26 June 2003 The Fibonacci Sequence The Fibonacci numbers are: 1, 1, 2, 3, 5, 8, 13, 21, 34,... We can calculate the nth Fibonacci

More information

Chapter 3 Complexity of Classical Planning

Chapter 3 Complexity of Classical Planning Lecture slides for Automated Planning: Theory and Practice Chapter 3 Complexity of Classical Planning Dana S. Nau CMSC 722, AI Planning University of Maryland, Spring 2008 Licensed under the Creative Commons

More information

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path. Chapter 3 Trees Section 3. Fundamental Properties of Trees Suppose your city is planning to construct a rapid rail system. They want to construct the most economical system possible that will meet the

More information

CASE BASED REASONING A SHORT OVERVIEW

CASE BASED REASONING A SHORT OVERVIEW CASE BASED REASONING A SHORT OVERVIEW Z. Budimac, V. Kurbalija Institute of Mathematics and Computer Science, Fac. of Science, Univ. of Novi Sad Trg D. Obradovića 4, 21000 Novi Sad, Yugoslavia zjb@im.ns.ac.yu,

More information