SlideShare a Scribd company logo
1 of 28
Download to read offline
FORMAL SPECIFICATIONS
        USING
       PDDL
       Introduction
       WordPad
       PDDL
Formal Specification –             INTRO

We can describe a system using specification
languages.

Here we see how PDDL can be used to
describe a system.

PDDL primarily describes a system using a set
of preconditions and post-conditions.

PDDL = Planning Domain Definition Language
Formal Specification –                 BULB


 Preconditions                        Post-condition
                     Switch ON




 Preconditions                        Post-condition
                     Switch OFF




           States – ON, OFF
           Actions – Switch ON, Switch OFF
Formal Specification –                                BULB


States – ON, OFF
Actions – Switch ON, Switch OFF

Switch ON:           The state of the system before this action can be
 Precondition: OFF applied
 Effect: ON The state of the system after applying this action

Switch OFF:
 Precondition: ON
 Effect: OFF
WordPad –              Event Sequence




 Initial
The execution of WordPad
can be described as a
sequence of events
                                                   Final
An event is an user input that causes WordPad to
transit from one state to another
WordPad –            Formal Specification

We can describe the event sequence of WordPad using a
specification language.

It can be
executed to verify
the correctness of
the specification
WordPad –             Formal Specification
Each state of WordPad can be considered to be the
collection of its visible and invisible contents
                                            Outside view port
                    Taskbar…Toolbar…

Events induce transition from one state to another

We can specify each event in WordPad formally using a
specification language such as PDDL




                        Let us see some examples…
WordPad –     Example

                  Initial




                            Final


      Click
WordPad –          Example

Action Name
 Deselect all selected words
Precondition
 No dialog boxes open
Effect
 No words are selected
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
Initial

                             WordPad –
                             Edit   Cut




Select
“Word2”



                                          Final
          Edit




                       Cut
WordPad –          Edit     Cut

Action Name
 Edit    Cut
Preconditions
 No dialog boxes are open
Effect
 All those words that were
selected are deleted from the view
 No words are selected
http://www.ida.liu.se/~pahas/maip/writing.html
http://www.informatik.uni-freiburg.de/~koehler/aips/PDDL-MANUAL.ps.gz
PDDL –             Planning Domain Definition Language
It is a domain definition language which is supported by
most planners.

Used to define the properties of a domain
 - predicates to be used
 - action definition

Example of planners
 - IPP -    http://www.informatik.uni-freiburg.de/~koehler/ipp.html
 - UCPOP
PDDL – Predicates
Predicate defines the property of an object,
which can be TRUE of FALSE

Example:

• Cloudy
• Big             Use in PDDL
• Yellow
                  Example:

                    Yellow T-Shirt
PDDL – Variables / Types
 C

     int iterator;
     myStruct bigStructure;

 PDDL

     ?iterator – int
     ?bigStructure - myStruct


 In PDDL data types are not predefined

 :types int myStruct
PDDL – not and or
 (and ( Yellow T-Shirt )
      ( Big Shoes )
 )

 ( not ( Yellow Shoes )
 )

 ( and ( Yellow T-Shirt )
       ( not ( Yellow Shoes ) )
 )
PDDL – forall
Let 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 Yellow
should be true for all objects in the
domain that are of type T-Shirt
PDDL – exists
If there exists even one Yellow shoe…

(:types Shoes)
(:predicates (Yellow ?things – Shoes)
)
…
(exists (?things – Shoes) (Yellow ?things)
)

This evaluates to TRUE if there exists one
or more objects which has the property
Yellow.
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
PDDL – Problem Definition
Define the problem to be solved

  Initial State –       define predicates which are true at
the beginning of the problem
  Goal State -       define predicates which are true at
the end of the problem
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(21'B)2508/$@
  HIIHFW ())(7B)2508/$@


  DFWLRQ $7,21B
PDDL –        Domain Definition - Precondition

STRIPS 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)
PDDL –        Domain Definition - Effects
STRIPS 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)
PDDL –       Domain Definition - Types

When using a parameter or bound variables in an
action you must indicate its type

(:types dialogBox word)
…
:parameters ?db – dialogBox
:effect ( forall ( ?w – word ) selected ?word )
PDDL –      Problem Definition

define (problem PROBLEM_NAME)
 (:domain DOMAIN_NAME)
 (:objects OBJ_1 OBJ_2 ... OBJ_N)
 (:init ATOM_1 ATOM_2 ... ATOM_N)
 (:goal CONDITION_FORMULA)
 )
Formal Specifications Using PDDL Introduction

More Related Content

Similar to Formal Specifications Using PDDL Introduction

How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?Sandro Mancuso
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)Jose Manuel Pereira Garcia
 
Open source report writing tools for IBM i Vienna 2012
Open source report writing tools for IBM i  Vienna 2012Open source report writing tools for IBM i  Vienna 2012
Open source report writing tools for IBM i Vienna 2012COMMON Europe
 
Bronx study jam 1
Bronx study jam 1Bronx study jam 1
Bronx study jam 1Peter Birdsall
 
Tuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkPatrick Wendell
 
Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGateAnar Godjaev
 
Debugging Modern C++ Application with Gdb
Debugging Modern C++ Application with GdbDebugging Modern C++ Application with Gdb
Debugging Modern C++ Application with GdbSenthilKumar Selvaraj
 
Save time by applying clean code principles
Save time by applying clean code principlesSave time by applying clean code principles
Save time by applying clean code principlesEdorian
 
Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...
Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...
Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...CA Technologies
 
...and thus your forms automagically disappeared
...and thus your forms automagically disappeared...and thus your forms automagically disappeared
...and thus your forms automagically disappearedLuc Bors
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI TestingReginald Stadlbauer
 
Dog Ont In Dog
Dog Ont In DogDog Ont In Dog
Dog Ont In DogDario Bonino
 
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonTWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonCodemotion
 
A brief introduction to PostgreSQL
A brief introduction to PostgreSQLA brief introduction to PostgreSQL
A brief introduction to PostgreSQLVu Hung Nguyen
 
Android studio tips and tricks
Android studio tips and tricksAndroid studio tips and tricks
Android studio tips and tricksOleg Mazhukin
 

Similar to Formal Specifications Using PDDL Introduction (20)

Chado-XML
Chado-XMLChado-XML
Chado-XML
 
How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
Open source report writing tools for IBM i Vienna 2012
Open source report writing tools for IBM i  Vienna 2012Open source report writing tools for IBM i  Vienna 2012
Open source report writing tools for IBM i Vienna 2012
 
Bronx study jam 1
Bronx study jam 1Bronx study jam 1
Bronx study jam 1
 
Core java
Core javaCore java
Core java
 
Tuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache Spark
 
Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Debugging Modern C++ Application with Gdb
Debugging Modern C++ Application with GdbDebugging Modern C++ Application with Gdb
Debugging Modern C++ Application with Gdb
 
Refactoring
RefactoringRefactoring
Refactoring
 
Save time by applying clean code principles
Save time by applying clean code principlesSave time by applying clean code principles
Save time by applying clean code principles
 
Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...
Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...
Advanced CA Endevor® Software Change Manager Processor Coding Techniques: Pra...
 
...and thus your forms automagically disappeared
...and thus your forms automagically disappeared...and thus your forms automagically disappeared
...and thus your forms automagically disappeared
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 
Dog Ont In Dog
Dog Ont In DogDog Ont In Dog
Dog Ont In Dog
 
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonTWINS: OOP and FP - Warburton
TWINS: OOP and FP - Warburton
 
Drools rule Concepts
Drools rule ConceptsDrools rule Concepts
Drools rule Concepts
 
A brief introduction to PostgreSQL
A brief introduction to PostgreSQLA brief introduction to PostgreSQL
A brief introduction to PostgreSQL
 
React/Redux
React/ReduxReact/Redux
React/Redux
 
Android studio tips and tricks
Android studio tips and tricksAndroid studio tips and tricks
Android studio tips and tricks
 

Recently uploaded

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Formal Specifications Using PDDL Introduction

  • 1. FORMAL SPECIFICATIONS USING PDDL Introduction WordPad PDDL
  • 2. Formal Specification – INTRO We can describe a system using specification languages. Here we see how PDDL can be used to describe a system. PDDL primarily describes a system using a set of preconditions and post-conditions. PDDL = Planning Domain Definition Language
  • 3. Formal Specification – BULB Preconditions Post-condition Switch ON Preconditions Post-condition Switch OFF States – ON, OFF Actions – Switch ON, Switch OFF
  • 4. Formal Specification – BULB States – ON, OFF Actions – Switch ON, Switch OFF Switch ON: The state of the system before this action can be Precondition: OFF applied Effect: ON The state of the system after applying this action Switch OFF: Precondition: ON Effect: OFF
  • 5.
  • 6. WordPad – Event Sequence Initial The execution of WordPad can be described as a sequence of events Final An event is an user input that causes WordPad to transit from one state to another
  • 7. WordPad – Formal Specification We can describe the event sequence of WordPad using a specification language. It can be executed to verify the correctness of the specification
  • 8. WordPad – Formal Specification Each state of WordPad can be considered to be the collection of its visible and invisible contents Outside view port Taskbar…Toolbar… Events induce transition from one state to another We can specify each event in WordPad formally using a specification language such as PDDL Let us see some examples…
  • 9. WordPad – Example Initial Final Click
  • 10. WordPad – Example Action Name Deselect all selected words Precondition No dialog boxes open Effect No words are selected
  • 11. 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
  • 12. Initial WordPad – Edit Cut Select “Word2” Final Edit Cut
  • 13. WordPad – Edit Cut Action Name Edit Cut Preconditions No dialog boxes are open Effect All those words that were selected are deleted from the view No words are selected
  • 15. PDDL – Planning Domain Definition Language It is a domain definition language which is supported by most planners. Used to define the properties of a domain - predicates to be used - action definition Example of planners - IPP - http://www.informatik.uni-freiburg.de/~koehler/ipp.html - UCPOP
  • 16. PDDL – Predicates Predicate defines the property of an object, which can be TRUE of FALSE Example: • Cloudy • Big Use in PDDL • Yellow Example: Yellow T-Shirt
  • 17. PDDL – Variables / Types C int iterator; myStruct bigStructure; PDDL ?iterator – int ?bigStructure - myStruct In PDDL data types are not predefined :types int myStruct
  • 18. PDDL – not and or (and ( Yellow T-Shirt ) ( Big Shoes ) ) ( not ( Yellow Shoes ) ) ( and ( Yellow T-Shirt ) ( not ( Yellow Shoes ) ) )
  • 19. PDDL – forall Let 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 Yellow should be true for all objects in the domain that are of type T-Shirt
  • 20. PDDL – exists If there exists even one Yellow shoe… (:types Shoes) (:predicates (Yellow ?things – Shoes) ) … (exists (?things – Shoes) (Yellow ?things) ) This evaluates to TRUE if there exists one or more objects which has the property Yellow.
  • 21. 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
  • 22. PDDL – Problem Definition Define the problem to be solved Initial State – define predicates which are true at the beginning of the problem Goal State - define predicates which are true at the end of the problem
  • 23. 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(21'B)2508/$@ HIIHFW ())(7B)2508/$@ DFWLRQ $7,21B
  • 24. PDDL – Domain Definition - Precondition STRIPS 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)
  • 25. PDDL – Domain Definition - Effects STRIPS 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)
  • 26. PDDL – Domain Definition - Types When using a parameter or bound variables in an action you must indicate its type (:types dialogBox word) … :parameters ?db – dialogBox :effect ( forall ( ?w – word ) selected ?word )
  • 27. PDDL – Problem Definition define (problem PROBLEM_NAME) (:domain DOMAIN_NAME) (:objects OBJ_1 OBJ_2 ... OBJ_N) (:init ATOM_1 ATOM_2 ... ATOM_N) (:goal CONDITION_FORMULA) )