Reachability, Schedulability and Optimality

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Clocked Mazurkiewicz Traces and Partial Order Reductions for Timed Automata D. Lugiez, P. Niebert, S. Zennou Laboratoire d Informatique Fondamentale de.
Chapter 4: Informed Heuristic Search
Review: Search problem formulation
Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,
ECE 667 Synthesis and Verification of Digital Circuits
Introduction to Formal Methods for SW and HW Development 09: SAT Based Abstraction/Refinement in Model-Checking Roberto Sebastiani Based on work and slides.
SAT Based Abstraction/Refinement in Model-Checking Based on work by E. Clarke, A. Gupta, J. Kukula, O. Strichman (CAV’02)
UPPAAL Introduction Chien-Liang Chen.
Hybrid System Verification Synchronous Workshop 2003 A New Verification Algorithm for Planar Differential Inclusions Gordon Pace University of Malta December.
Timed Automata.
ISE480 Sequencing and Scheduling Izmir University of Economics ISE Fall Semestre.
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
Hybrid Approach to Model-Checking of Timed Automata DAT4 Project Proposal Supervisor: Alexandre David.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
CSC 423 ARTIFICIAL INTELLIGENCE
Search in AI.
UCb Tools and Application of Timed Automata UPPAAL & Optimal Scheduling Kim G. Larsen
Review: Search problem formulation
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
CS 536 Spring Global Optimizations Lecture 23.
Scheduling Using Timed Automata Borzoo Bonakdarpour Wednesday, April 13, 2005 Selected Topics in Algorithms and Complexity (CSE960)
Sanjit A. Seshia and Randal E. Bryant Computer Science Department
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
1 Verification Options & Beyond Reachability or how to make UPPAAL perform better and more Kim Guldstrand Larsen
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
1 Efficient Verification of Timed Automata Kim Guldstrand Larsen Paul PetterssonMogens Nielsen
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
SCHEDULING AIRCRAFT LANDING Mike Gerson Albina Shapiro.
State-Space Searches. 2 State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
State-Space Searches.
Copyright R. Weber Search in Problem Solving Search in Problem Solving INFO 629 Dr. R. Weber.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
ULB, November 2004 As cheap as possible: Linearly Priced Timed Automata Gerd Behrmann, Ed Brinksma, Ansgar Fehnker, Thomas Hune, Kim Larsen, Paul Pettersson,
1 Outline:  Outline of the algorithm  MILP formulation  Experimental Results  Conclusions and Remarks Advances in solving scheduling problems with.
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
Department of Mechanical Engineering The University of Strathclyde, Glasgow Hybrid Systems: Modelling, Analysis and Control Yan Pang Department of Mechanical.
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Lazy Abstraction Jinseong Jeon ARCS, KAIST CS750b, KAIST2/26 References Lazy Abstraction –Thomas A. Henzinger et al., POPL ’02 Software verification.
Oded Maler December Major Work Directions SAT Solving for Difference Logic Axxom case-study Scheduling with Timed Automata.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Real-Time Model Checking on Secondary Storage Stefan Edelkamp and Shahid Jabbar Chair for Programming Systems and Compiler Construction Computer Science.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Lecture 3: Uninformed Search
1 Outline:  Optimization of Timed Systems  TA-Modeling of Scheduling Tasks  Transformation of TA into Mixed-Integer Programs  Tree Search for TA using.
Scheduling Lacquer Productions with Uppaal AXXOM case study of the Ametist project Angelika Mader Distributed and Embedded Systems Group, University of.
1 Model Checking of of Timed Systems Rajeev Alur University of Pennsylvania.
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
CS 312: Algorithm Analysis Lecture #33: Branch and Bound, Job Assignment This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
1 ECE 517: Reinforcement Learning in Artificial Intelligence Lecture 21: Dynamic Multi-Criteria RL problems Dr. Itamar Arel College of Engineering Department.
IE 312 Review 1. The Process 2 Problem Model Conclusions Problem Formulation Analysis.
Adversarial Search 2 (Game Playing)
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
TESTCOM/FATES Test Plan Generation for Concurrent Real-Time Systems based on Zone Coverage Analysis Farn Wang Dept. of Electrical Eng. National Taiwan.
Symbolic Model Checking of Software Nishant Sinha with Edmund Clarke, Flavio Lerda, Michael Theobald Carnegie Mellon University.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
The Time-abstracting Bisimulation Equivalence  on TA states: Preserve discrete state changes. Abstract exact time delays. s1s2 s3  a s4  a 11 s1s2.
Instructor: Rajeev Alur
On Using Linearly Priced Timed Automata for Flow Analysis
Timed Automata Formal Systems Pallab Dasgupta Professor,
Artificial Intelligence
Artificial Intelligence Chapter 8 Uninformed Search
Introducing Underestimates
State-Space Searches.
State-Space Searches.
State-Space Searches.
Presentation transcript:

Reachability, Schedulability and Optimality Ansgar Fehnker June 3

Outline Timed automata a la Uppaal From Reachability to Schedulability LPTAs Priced regions and operations Algorithm Termination Priced Zones Verification vs. Optimization Guiding and Bounding examples

Timed Automata Network of Automata Synchronization (CCS-like) a! a? (UPPAAL) Network of Automata Synchronization (CCS-like) a! a?

Timed Automata Network of Automata Clocks in description (UPPAAL) Network of Automata Synchronization (CCS-like) Clocks in description Time passes uniformly Guard/reset on action Invariants on location x  7 3  x  7 y > 4 a! a? y:=0 Uppaal is a modelchecker forTimed Automata with emphasis on reachability properties

Motivation Observation Unsafe Safe Many scheduling problems can be phrased in a natural way as reachability problems for timed automata! Unsafe Safe 25min 20min 10min 5min Can they make it within 60 minutes ?

Motivation Unsafe Safe What schedule minimizes crossings? take! y:=0 y>=20 release! L==1 y>=25 safe y>=5 y>=10 take? release? L:=1-L unsafe L==0 take! y:=0 y>=25 release! L==1 safe 25min 20min 10min 5min What schedule minimizes crossings? What schedule mini-mizes unsafe time? Can they make it within 60 minutes ? What is the fastest schedule? Unsafe Safe

Linearly Priced Timed Automata 4 2.5 x 2 cost’=1 cost+=4 cost’=0 cost’=2 b x<5 y>2 x<3 y:=0 a c Timed Automata + Costs on transitions and locations. Cost of performing transition: Transition cost. Cost of performing delay d: ( d x location cost ). (a,x=y=0) (b,x=y=0) (b,x=y=2) (2.5) (a,x=0,y=2) Cost of Execution Trace: Sum of costs: 4 + 5 + 0 = 9

Example: Aircraft Landing cost t E L T E earliest landing time T target time L latest time e cost rate for being early l cost rate for being late d fixed cost for being late e*(T-t) d+l*(t-T) Planes have to keep separation distance to avoid turbulences caused by preceding planes Runway

Example: Aircraft Landing 4 earliest landing time 5 target time 9 latest time 3 cost rate for being early 1 cost rate for being late 2 fixed cost for being late land! cost+=2 x <= 5 x <= 9 cost’=3 cost’=1 x=5 land! Planes have to keep separation distance to avoid turbulences caused by preceding planes Runway

Symbolic semantics of Linearly Priced Timed Automata

Zones c a b Basic idea: Define a delay and reset over zones y delay x -2  x-y 0 delay 1  y  4 0  x  3 -2  x-y 0 y x x<3 x<3 y>2 a c b y:=0

Zones c a b Basic idea: Define a delay and reset over zones y reset y 0  x  3 -2  x-y 0 y 0  y  0 0  x  3 reset y x x<3 x<3 y>2 a c b y:=0

Priced Zones c a b Basic idea: Define a linear cost function on zones cost=c - 1 x + 2 y cost=c’’ -1 x + 3 y cost=c’+ 0 x + 2 y delay -1 3 cost = c - 1 x + 2 y y 2 2 -1 x cost’=1 cost+=4 cost’=0 cost’=2 x<3 x<5 y>2 a c b y:=0

Priced Zones c a b Basic idea: Define a delay and reset over zones y cost = c - 1 x + 2 y y reset y -1 1 cost = c’+ 1 x cost = c - 1 x 2 -1 x x<3 x<3 y>2 a c b y:=0

State-Space Exploration Algorithm

An Algorithm State-Space Exploration + Use of global variable Cost. Updated Cost whenever goal state with min( C ) <Cost is found: Cost= Cost=80 Cost=60 80 60

An Algorithm Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C)= and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost

An Algorithm Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C)= and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost Performs: symbolic operations Delay, Conjun-ction, and Reset of clocks.

An Algorithm C C’ Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= C’ is bigger & cheaper than C Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C)= and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost . is a well-quasi ordering which guarantees termination!

When the algorithm terminates, the value of COST equals mincost(). An Algorithm Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C)= and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost Theorem When the algorithm terminates, the value of COST equals mincost().

Efficient Reachability of LPTAs

Verification vs. Optimization Verification Algorithms: Checks a logical property for the entire state-space Efficient blind search. Optimization Algorithms: Finds (near) optimal solutions. Uses techniques to avoid non-optimal parts of the state-space (e.g. Branch and Bound). Objective: Bridge the gap between these two. New techniques and applications in UPPAAL. Safe side reachable? 80 Min time of reaching safe side? 60

Minimum-Cost Order The basic algorithm finds the minimum cost trace. Breadth or Depth-first search-order. Problem: Searches the entire state-space. Minimum-Cost Search Order: Always explore state with smallest minimum cost first.

Fact: First found goal state is optimal. Minimum-Cost Order Fact: First found goal state is optimal. Cost grows along all paths. The search can terminate when first goal state found. Like Dijkstra’s shortest path algorithm. Simpler algorithm: variable Cost no longer needed.

Estimates of Remaining Cost Often a conservative estimate of the remaining cost can be found. REM( l, C ) = conservative estimate of remaining cost. Bridge example: REM( l, C ) = time of slowest person on Unsafe side. At least 25 mins needed to complete schedule.

Estimates of Remaining Cost Basic Algorithm + Estimate of remaining cost: Only states with (min(C) + REM(l, C)) < Cost are further explored. Cost=80 min( C ) + REM( l, C )  80

Estimates of Remaining Cost Basic Algorithm + Estimate of remaining cost: Only states with (min(C) + REM(l, C)) < Cost are further explored. Cost=80 min( C ) + REM( l, C )  80 Minimum Cost + Estimate of remaining cost: Explore states with smallest ( min(C) + REM( l, C ) ) first.

Basic Algorithm + Heuristics: State with highest h is explored first. Using Heuristics Allows the users to control the search order according to heuristics. Symbolic states extended to (l, C, h), where h is the priority of a state. Transitions are annotated with assignments to h. Flexible! Basic Algorithm + Heuristics: State with highest h is explored first.

Examples

Try to schedule planes in the order of their preferred landing times Using Heuristics Try to schedule planes in the order of their preferred landing times

Aircraft Landing Problem runways Benchmark by Beasley et al 2000

Example: Bridge Problem What is the fastest schedule? BF = Breadth-First, DF = Depth-First, MC = Minimum Cost Order, MC+ = MC + REM Number of symbolic states generated with cost-extended version of UPPAAL. Minimum Cost Order + Estimate of Remaining cost <10% of Breadth-First Search.

SIDMAR Steel Production Plant Crane A Machine 1 Machine 2 Machine 3 A. Fehnker [RTCSA99], T. Hune, K. G. Larsen, P. Pettersson [DSV00] Case study of Esprit-LTR project 26270 VHS Physical plant of SIDMAR located in Gent, Belgium. Part between blast furnace and hot rolling mill. Objective: model the plant, obtain schedule and control program for plant. Lane 1 Machine 4 Machine 5 Lane 2 Buffer Crane B Storage Place Continuos Casting Machine

SIDMAR Steel Production Plant Crane A Input: sequence of steel loads (“pigs”). Machine 1 Machine 2 Machine 3 @10 @20 2 @10 2 2 Lane 1 Machine 4 Machine 5 15 @10 Load follows Recipe to obtain certain quality, e.g: start; T1@10; T2@20; T3@10; T2@10; end within 120. Lane 2 16 Buffer Crane B =127 Storage Place Good schedules for ten batches within seconds, rather than bad schedules for five batches within almost an hour. @40 Continuos Casting Machine Output: sequence of higher quality steel.

SIDMAR Steel Production Plant LEGO RCX Mindstorms. Local controllers with control programs. IR protocol for remote invocation of programs. Central controller. crane a m1 m2 m3 m4 m5 crane b buffer storage central controller casting Synthesis

Heuristics: BPM protocol Heuristic: search first for constant input 1  Up to 50% reduction for erroneous instances of a simple communcation protocol.

Conclusion Advantages Disadvantages Our goal Future work Easy and flexible modeling of systems Whole range of verification techniques becomes available Controller/Program synthesis Disadvantages Existing scheduling approaches perform somewhat better Our goal See how far we get; Integrate model checking and scheduling theory. Future work Tailoring Linear Programming to Priced Zones Translation trace to schedule, re-use of schedules, ...

Related Work Alur, Courcourbetis, Henzinger (1993) Accumulated delays in Realtime Systems Alur, Torre, Pappas (HSCC’01) Optimal Paths in Weighted Timed Automata Behrmann, Fehnker, et all (HSCC’01) Minimum-Cost Reachability for Priced Timed Automata

Related Work (cont) Asarin & Maler (1999) Time optimal control using backwards fixed point computation Niebert, Tripakis & Yovine (2000) Minimum-time reachability using forward reachability Behrmann, Fehnker et all (TACAS’2001, CAV’01) Minimum-time reachability using Branch-and-Bound Brinksma, Maler, Fehnker(STTT02) Using UPPAAL en SPIN to compute optimal schedules. Abdeddaim, Maler (CAV’01) Job-Shop Scheduling using Timed Automata General Trend (AAAI’01): Integrating Scheduling/Planning and Model Checking

End of slide show

Linearly Priced Timed Automata x<3 y>2 {x:=0} a c cost’=1 cost+=4 cost’=0 cost’=2 b Timed Automata + Costs on transitions and locations. Cost of performing transition: Transition cost. Cost of performing delay d: ( d x location cost ). (a,x=y=0) (b,x=y=0) (b,x=y=2) (2.5) (a,x=0,y=2) 4 2.5 x 2 Cost of Execution Trace: Sum of costs: 4 + 5 + 0 = 9

Regions x y 1 2 3 4 5 x<3 x<3 y>2 a c {x:=0} b

Regions x y 1 2 3 4 5 x<3 x<3 y>2 a c {x:=0} b

Regions c a b x<3 x<3 y>2 {x:=0} y y y x 3 1 2 x 3 1 2 x 3 1 Alur & Dill Regions x<3 x<3 y>2 a c {x:=0} b y y y x 3 1 2 x 3 1 2 x 3 1 2 1 2 3 1 2 3 1 2 3 Transitions with and w/o reset and delay can be considered as transitions on regions!