1 / 45

Nitin Kumar Yadav RMIT University, Melbourne nitin.yadav@student.rmit.au

An empirical evaluation of regression and progression approaches for behavior composition. Nitin Kumar Yadav RMIT University, Melbourne nitin.yadav@student.rmit.edu.au. Minor thesis - semester 2, 2009, under the supervision of Dr. Sebastian Sardina , RMIT university.

arvin
Download Presentation

Nitin Kumar Yadav RMIT University, Melbourne nitin.yadav@student.rmit.au

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An empirical evaluation of regression and progression approaches for behavior composition Nitin Kumar Yadav RMIT University, Melbourne nitin.yadav@student.rmit.edu.au Minor thesis - semester 2, 2009, under the supervision of Dr. Sebastian Sardina, RMIT university

  2. An empirical evaluation of regression and progression approaches for behavior composition Behavior Composition Regression and Progression techniques Regression approach Implementation Framework for behavior composition experiments Experiments Conclusion Contents

  3. Behavior Composition What is a behavior ? • Behavior • Logic of a machine • Web service • Stand alone component • Abstracted as finite transition systems • Available behaviors can be non-deterministic Painting Blocks Example1 1. Sardina,Patrizi & De Giacomo, Proceedings of Principles of Knowledge Representation and Reasoning (KR),pages 640-650, September 2008. AAAI Press.

  4. Behavior Composition Behaviors perform actions in a shared environment ArmB: prepare

  5. Behavior Composition Behaviors perform actions in a shared environment ArmA: clean Behavior guards over the environments must be satisfied.

  6. Behavior Composition Behaviors perform actions in a shared environment ArmA: dispose

  7. Behavior Composition Behaviors perform actions in a shared environment ArmC: recharge

  8. Behavior Composition What is behavior composition ? • Can the behaviors, executing one at a time realize a virtual target ? • Does there exist a controller which can guarantee that the available behaviors can always do the actions that the target can request.

  9. Behavior Composition Enacted system of available behaviors a1 b1 c1 a2 b3 c1 a1 b1 c1 a2 b3 c1 a1 b3 c1 a2 b2 c1 a2 b1 c1 a1 b1 c2 a2 b2 c1 a2 b1 c1 a1 b1 c2 a1 b2 c1 e3 e3 e1 e1 e2 e3 e2 e2 e2 e2 e2 e2 A: clean A: clean B: paint A: clean A: clean B: prepare B: paint A: clean C: recharge A: clean A: recharge C: prepare All what the system can do

  10. Behavior Composition Enacted target system recharge paint dispose t1 t2 t3 t4 t5 t3 t4 t5 clean e1 e2 e3 e3 e4 e1 e2 e2 prepare clean dispose paint paint recharge All what the target can request

  11. Behavior Composition • Does the enacted system ‘behave’ like the enacted target ?

  12. Techniques Two approaches for behavior composition based on simulation • Regression based approach [Sardina,Patrizi & De Giacomo, KR 2008] • Progression based approach [Stroeder & Pagnucco, 2009, IJCAI 2009]

  13. Simulation • A transition system T1 simulates another transition system T2 iff T1 can ‘mimic’ all the states of T2 • A state in the available system mimics another state in the target system if: • It can do all the actions that the target state can do • The successor state in the available system as a result of such an action simulates the resulting state in the target system • Simulation is a relation of states of the enacted system and the states of the enacted target which can be ‘mimicked’.

  14. Progression approach – IJCAI ‘09 • Salient features • Works by expanding ‘decision nodes’ and marking ‘bad’ states and propagating marking backwards. • Expands states in relation to the target • Similar to how we reason • Implementation available • Java based • Uses recursion to expand and mark states

  15. Regression approach • Step1 • Build the enacted system and enacted target independent of each other • Step2 • Assume each system states simulates every target state. i.e. add a potential simulation link from each system state to every target state.

  16. Regression approach • Step3 • Iteratively remove the links that violate the simulation definition i.e. • Can the state simulate the target state ? • Is the resulting state in simulation with the resulting state of the target ? • If the target state is final but the behavior states are not • Stop when no more links can be removed • A solution exists if the initial state is in the simulation relation

  17. Regression approach Example Enacted System C: Recharge A: dispose a1 b1 c1 a1 b3 c1 a1 b1 c1 a1 b1 c2 a2 b2 c1 a1 b1 c2 a1 b1 c1 a1 b1 c1 a1 b3 c1 a2 b2 c1 a1 b2 c1 a1 b1 c1 a1 b3 c1 a1 b3 c1 t1 t4 t5 t2 t1 A: Recharge e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e1 e1 e2 B: paint e1 e1 e2 e1 e2 A: dispose B:prepare C: Recharge A: Recharge B: Recharge A: clean C:recharge X Enacted Target X X paint recharge dispose prepare

  18. Regression approach Example Enacted System C: Recharge A: dispose a1 b1 c1 a1 b3 c1 a1 b1 c1 a1 b1 c2 a2 b2 c1 a1 b1 c2 a1 b1 c1 a1 b1 c1 a1 b3 c1 a2 b2 c1 a1 b2 c1 a1 b1 c1 a1 b3 c1 a1 b3 c1 t1 t4 t5 t2 t1 A: Recharge e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e1 e1 e2 B: paint e1 e1 e2 e1 e2 A: dispose B:prepare C: Recharge A: Recharge B: Recharge A: clean C:recharge Enacted Target paint recharge dispose prepare

  19. Regression approach Example Enacted System C: Recharge A: dispose a1 b1 c1 a1 b3 c1 a1 b1 c1 a1 b1 c2 a2 b2 c1 a1 b1 c2 a1 b1 c1 a1 b1 c1 a1 b3 c1 a2 b2 c1 a1 b2 c1 a1 b1 c1 a1 b3 c1 a1 b3 c1 t1 t4 t5 t2 t1 A: Recharge e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e1 e1 e2 B: paint e1 e1 e2 e1 e2 A: dispose B:prepare C: Recharge A: Recharge B: Recharge A: clean C:recharge Assume X X X X X Enacted Target paint recharge dispose prepare

  20. Regression approach • Salient features • Enacted system and the enacted target are built independent of each other • Allows recovery from behavior failure and any uncontrolled action • The enacted system can be stored in memory and different targets can then be checked for solution

  21. Regression approach Implementation • Related tools available • Symfony, Opus [De Giacomo et all, 2009, University of Rome ‘La Sapienza’] • Used for web services composition • Do not have a concept of environment and guards • Our implementation • First serious and complete implementation • Optimizations added on top of the original approach

  22. Regression approach Optimizations • Step2 : Original • Starts with links from every system state connected to every target state • In each iteration check • If the state is in simulation ? • Is the resulting state in simulation ? • Is the state final ? • Step2: Optimization 1: • Starts with links between the ‘similar’ states. i.e. add link only if the system state can do all what a target state can request. • In each iteration • Is the resulting state in simulation ?

  23. Regression approach Step2: Original Enacted System C: Recharge A: dispose a1 b1 c1 a1 b3 c1 a1 b1 c1 a1 b1 c2 a2 b2 c1 a1 b1 c2 a1 b1 c1 a1 b1 c1 a1 b3 c1 a2 b2 c1 a1 b2 c1 a1 b1 c1 a1 b3 c1 a1 b3 c1 t1 t4 t5 t2 t1 A: Recharge e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e1 e1 e2 B: paint e1 e1 e2 e1 e2 A: dispose B:prepare C: Recharge A: Recharge B: Recharge A: clean C:recharge Enacted Target paint recharge dispose prepare

  24. Regression approach Step2: Optimized Enacted System C: Recharge A: dispose a1 b1 c1 a1 b3 c1 a1 b1 c1 a1 b1 c2 a2 b2 c1 a1 b1 c2 a1 b1 c1 a1 b1 c1 a1 b3 c1 a2 b2 c1 a1 b2 c1 a1 b1 c1 a1 b3 c1 a1 b3 c1 t1 t4 t5 t2 t1 A: Recharge e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e1 e1 e2 B: paint e1 e1 e2 e1 e2 A: dispose B:prepare C: Recharge A: Recharge B: Recharge A: clean C:recharge Enacted Target paint recharge dispose prepare

  25. Regression approach Optimization 2 • Parent state checking. • If a link is removed in the iteration, we need to check ONLY the parent states. • Consider the chain example. t1 s1 t2 s4 t3 t5 s2 s5 t4 s3 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 Enacted System a b a a a a Enacted Target a a

  26. Regression approach Optimization 2 • Original approach (also optimization 1) • Optimization 2 s1 t1 t1 s1 t5 s2 s5 s5 s4 t4 t5 s2 t2 t2 s4 t4 s3 t3 t3 s3 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 System NO SOLUTION Target a b a b a a a a a a a a System a a a a Target

  27. Regression approach Optimization 2 • Original approach (also optimization 1) • Optimization 2 s1 t1 t1 s1 t5 s2 s5 s5 s4 t4 t5 s2 t2 t2 t4 s4 t3 s3 t3 s3 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 System NO SOLUTION Target a b a b a a a a a a a a System a a a a NO SOLUTION Target

  28. Regression approach Optimization 3 • 3rd optimization • Check if the initial state of the system is still in simulation • Reduces the number of iterations if no solution exists • Consider the modified chain example t1 s1 s5 t4 s2 t5 t2 s4 t3 s3 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 a b a a a a System b a Target

  29. Regression approach Optimization 3 • Original approach (also optimization 1) • Optimization 3 s1 t1 t1 s1 t5 s2 s5 s5 s4 t4 t5 s2 t2 t2 s4 t4 t3 s3 t3 s3 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 System 3 2 1 NO SOLUTION Target a b a b a a a a a a a a System 1 b a a b NO SOLUTION Target

  30. Benchmarking Framework • Benchmarking in Java. • compilation • First generation of JVM entirely interpreted • Just In Time compilation • Hot Spot dynamic compilation • Class loading • Garbage Collection • Accuracy of system.currentTimeMillis() is platform dependent. http://www.ibm.com/developerworks/library/j-jtp12214/

  31. Benchmarking Framework • Japex. • measures class loading, compilation time, garbage collection time. • Easy to implement driver classes • public void prepare(TestCasetestCase); • public void warmup(TestCasetestCase); • public void run(TestCasetestCase); • Define test cases in xml http://www.ibm.com/developerworks/library/j-jtp12214/

  32. Benchmarking Framework • Designing Benchmark Problems using a library of available behaviors by manipulating them.

  33. Benchmarking Framework • No of behaviors • If a solution exists, increasing the number of behaviors exponentially complicates the problem without affecting the ‘reliazability’. • Example • armA:1 1 1 1 • armB:1 2 3 4 • armC:1 1 1 1 Test case 4 Test case 2 Test case 3 Test case 1

  34. Benchmarking Framework • Target Complexity • Make the target do multiple loops without affecting the solution. • Example recharge prepare prepare prepare paint paint paint t2 t3 t3 t4 t5 t4 t2 t1 t1 t5 t1 t2 t3 t4 t5 recharge clean clean clean dispose dispose dispose paint paint paint recharge

  35. Benchmarking Framework • Target Complexity with solution break • The last loop of the target requests an unknown action. • Multiple break points recharge breakAction recharge recharge recharge recharge Target 1 Target 1 Target 1 Target 1 Target 1 Target 1 Target 1 Target 1 breakAction breakAction

  36. Benchmarking Framework • Environment Complexity • Similar to target complexity except for • Removal of guards from the target/behaviors • Chains • Single behavior and target with ‘n’ states. • Behavior cannot do the last action of the target t1 s1 t2 t3 t5 s2 s5 s4 t4 s3 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 Enacted System a b a a a a a a Enacted Target

  37. Benchmarking Framework • ND Amplification • Add more non-deterministic states to an already existing non-deterministic behavior recharge recharge paint paint prepare prepare prepare prepare clean clean Paint, clean Paint, clean b4 b4 b3 b3 b2 b2 b1 b1 ND Amplification = 1 paint prepare Paint, clean b2`

  38. Experiments • No of Behaviors

  39. Experiments • No of Behaviors

  40. Experiments • Target Complexity

  41. Experiments • Target Complexity

  42. Experiments • Complex web services example From honor’s thesis of Paolo Felli, Service Composition through Synthesis Techniques based on Alternating-time Temporal Logic, University of Rome

  43. Experiments

  44. Conclusion • First serious implementation of regression approach • The first optimization should always be done • The second optimization is beneficial of patterns similar to chain • Benchmark problems creation by modifying existing problems.

  45. Comparing the speed of the techniques Questions ?

More Related