FORMAL SPECIFICATIONS        USING       PDDL       Introduction       WordPad       PDDL
Formal Specification –             INTROWe can describe a system using specificationlanguages.Here we see how PDDL can be ...
Formal Specification –                 BULB Preconditions                        Post-condition                     Switch...
Formal Specification –                                BULBStates – ON, OFFActions – Switch ON, Switch OFFSwitch ON:       ...
WordPad –              Event Sequence InitialThe execution of WordPadcan be described as asequence of events              ...
WordPad –            Formal SpecificationWe can describe the event sequence of WordPad using aspecification language.It ca...
WordPad –             Formal SpecificationEach state of WordPad can be considered to be thecollection of its visible and i...
WordPad –     Example                  Initial                            Final      Click
WordPad –          ExampleAction Name Deselect all selected wordsPrecondition No dialog boxes openEffect No words are sele...
WordPad –               Example                                       PDDL(:action Click-To-Deselect:precondition (groundS...
Initial                             WordPad –                             Edit   CutSelect“Word2”                         ...
WordPad –          Edit     CutAction Name Edit    CutPreconditions No dialog boxes are openEffect All those words that we...
http://www.ida.liu.se/~pahas/maip/writing.htmlhttp://www.informatik.uni-freiburg.de/~koehler/aips/PDDL-MANUAL.ps.gz
PDDL –             Planning Domain Definition LanguageIt is a domain definition language which is supported bymost planner...
PDDL – PredicatesPredicate defines the property of an object,which can be TRUE of FALSEExample:• Cloudy• Big             U...
PDDL – Variables / Types C     int iterator;     myStruct bigStructure; PDDL     ?iterator – int     ?bigStructure - myStr...
PDDL – not and or (and ( Yellow T-Shirt )      ( Big Shoes ) ) ( not ( Yellow Shoes ) ) ( and ( Yellow T-Shirt )       ( n...
PDDL – forallLet the all T-Shirts in this world be Yellow(:types T-Shirt)(:predicates (Yellow ?things – T-Shirt))…(forall ...
PDDL – existsIf there exists even one Yellow shoe…(:types Shoes)(:predicates (Yellow ?things – Shoes))…(exists (?things – ...
PDDL – Domain Definition Requirements – packages to be used Types – user defined types Constants – constant to be used in ...
PDDL – Problem DefinitionDefine the problem to be solved  Initial State –       define predicates which are true atthe beg...
PDDL –           Domain Definition          - Syntax GHILQH GRPDLQ 20$,1B1$0(  UHTXLUHPHQWV VWULSV@ HTXDOLW@ WSLQJ@ DGO@  ...
PDDL –        Domain Definition - PreconditionSTRIPS domain(PREDICATE_NAME ARG1 ... ARG_N)(and ATOM1 ... ATOM_N)ADL domain...
PDDL –        Domain Definition - EffectsSTRIPS domain(PREDICATE_NAME ARG1 ... ARG_N)(not (PREDICATE_NAME ARG_1 ... ARG_N)...
PDDL –       Domain Definition - TypesWhen using a parameter or bound variables in anaction you must indicate its type(:ty...
PDDL –      Problem Definitiondefine (problem PROBLEM_NAME) (:domain DOMAIN_NAME) (:objects OBJ_1 OBJ_2 ... OBJ_N) (:init ...
5
5
Upcoming SlideShare
Loading in …5
×

5

286 views
243 views

Published on

FORMAL SPECIFICATIONS
USING
PDDL
 Introduction
 WordPad
 PDDL

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
286
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

5

  1. 1. FORMAL SPECIFICATIONS USING PDDL Introduction WordPad PDDL
  2. 2. Formal Specification – INTROWe can describe a system using specificationlanguages.Here we see how PDDL can be used todescribe a system.PDDL primarily describes a system using a setof preconditions and post-conditions.PDDL = Planning Domain Definition Language
  3. 3. Formal Specification – BULB Preconditions Post-condition Switch ON Preconditions Post-condition Switch OFF States – ON, OFF Actions – Switch ON, Switch OFF
  4. 4. Formal Specification – BULBStates – ON, OFFActions – Switch ON, Switch OFFSwitch ON: The state of the system before this action can be Precondition: OFF applied Effect: ON The state of the system after applying this actionSwitch OFF: Precondition: ON Effect: OFF
  5. 5. WordPad – Event Sequence InitialThe execution of WordPadcan be described as asequence of events FinalAn event is an user input that causes WordPad totransit from one state to another
  6. 6. WordPad – Formal SpecificationWe can describe the event sequence of WordPad using aspecification language.It can beexecuted to verifythe correctness ofthe specification
  7. 7. WordPad – Formal SpecificationEach state of WordPad can be considered to be thecollection of its visible and invisible contents Outside view port Taskbar…Toolbar…Events induce transition from one state to anotherWe can specify each event in WordPad formally using aspecification language such as PDDL Let us see some examples…
  8. 8. WordPad – Example Initial Final Click
  9. 9. WordPad – ExampleAction Name Deselect all selected wordsPrecondition No dialog boxes openEffect No words are selected
  10. 10. WordPad – Example PDDL(:action Click-To-Deselect:precondition (groundState):effect (forall (?word - word) (not (selected ?word)) )) This indicates that for all the word that are defined in the system, they should not have the property selected
  11. 11. Initial WordPad – Edit CutSelect“Word2” Final Edit Cut
  12. 12. WordPad – Edit CutAction Name Edit CutPreconditions No dialog boxes are openEffect All those words that wereselected are deleted from the view No words are selected
  13. 13. http://www.ida.liu.se/~pahas/maip/writing.htmlhttp://www.informatik.uni-freiburg.de/~koehler/aips/PDDL-MANUAL.ps.gz
  14. 14. PDDL – Planning Domain Definition LanguageIt is a domain definition language which is supported bymost planners.Used to define the properties of a domain - predicates to be used - action definitionExample of planners - IPP - http://www.informatik.uni-freiburg.de/~koehler/ipp.html - UCPOP
  15. 15. PDDL – PredicatesPredicate defines the property of an object,which can be TRUE of FALSEExample:• Cloudy• Big Use in PDDL• Yellow Example: Yellow T-Shirt
  16. 16. PDDL – Variables / Types C int iterator; myStruct bigStructure; PDDL ?iterator – int ?bigStructure - myStruct In PDDL data types are not predefined :types int myStruct
  17. 17. PDDL – not and or (and ( Yellow T-Shirt ) ( Big Shoes ) ) ( not ( Yellow Shoes ) ) ( and ( Yellow T-Shirt ) ( not ( Yellow Shoes ) ) )
  18. 18. PDDL – forallLet the all T-Shirts in this world be Yellow(:types T-Shirt)(:predicates (Yellow ?things – T-Shirt))…(forall (?things – T-Shirt) (Yellow ?things))This implies that the property Yellowshould be true for all objects in thedomain that are of type T-Shirt
  19. 19. PDDL – existsIf there exists even one Yellow shoe…(:types Shoes)(:predicates (Yellow ?things – Shoes))…(exists (?things – Shoes) (Yellow ?things))This evaluates to TRUE if there exists oneor more objects which has the propertyYellow.
  20. 20. PDDL – Domain Definition Requirements – packages to be used Types – user defined types Constants – constant to be used in this domain Predicates – definition of truth statements Action - operators Preconditions – predicates that must be TRUE before this operator is applied Effects – predicates that become true after this operator is applied
  21. 21. PDDL – Problem DefinitionDefine the problem to be solved Initial State – define predicates which are true atthe beginning of the problem Goal State - define predicates which are true atthe end of the problem
  22. 22. PDDL – Domain Definition - Syntax GHILQH GRPDLQ 20$,1B1$0( UHTXLUHPHQWV VWULSV@ HTXDOLW@ WSLQJ@ DGO@ WSHV 73(B 73(B 73(B1 SUHGLFDWHV 35(,$7(B $ $ $1@ 35(,$7(B $ $ $1@ DFWLRQ $7,21B SDUDPHWHUV 3 3 31 @ SUHFRQGLWLRQ 35(21B)2508/$@ HIIHFW ())(7B)2508/$@ DFWLRQ $7,21B
  23. 23. PDDL – Domain Definition - PreconditionSTRIPS domain(PREDICATE_NAME ARG1 ... ARG_N)(and ATOM1 ... ATOM_N)ADL domain ( in addition )(not CONDITION_FORMULA)(and CONDITION_FORMULA1 ... CONDITION_FORMULA_N)(or CONDITION_FORMULA1 ... CONDITION_FORMULA_N)(forall (?V1 ?V2 ...) CONDITION_FORMULA)(exists (?V1 ?V2 ...) CONDITION_FORMULA)
  24. 24. PDDL – Domain Definition - EffectsSTRIPS domain(PREDICATE_NAME ARG1 ... ARG_N)(not (PREDICATE_NAME ARG_1 ... ARG_N))(and ATOM1 ... ATOM_N)Can we have:(or ATOM1 ... ATOM_N)ADL domain ( in addition )(when CONDITION_FORMULA EFFECT_FORMULA)(forall (?V1 ?V2 ...) EFFECT_FORMULA)Can we have:(exists (?V1 ?V2 ...) EFFECT_FORMULA)
  25. 25. PDDL – Domain Definition - TypesWhen using a parameter or bound variables in anaction you must indicate its type(:types dialogBox word)…:parameters ?db – dialogBox:effect ( forall ( ?w – word ) selected ?word )
  26. 26. PDDL – Problem Definitiondefine (problem PROBLEM_NAME) (:domain DOMAIN_NAME) (:objects OBJ_1 OBJ_2 ... OBJ_N) (:init ATOM_1 ATOM_2 ... ATOM_N) (:goal CONDITION_FORMULA) )

×