Download presentation

Presentation is loading. Please wait.

Published byDaisy Britnell Modified about 1 year ago

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

2
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

3
[Eker et al. ‘09]

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

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

6
[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

7
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?

8
[Abacus Programs]

9
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]

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

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

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

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

14
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

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

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

17
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]

18
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

19
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…

20

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google