Presentation is loading. Please wait.

Presentation is loading. Please wait.

Knowledge and Systems Research Group, University of Huddersfield B vs OCL: Comparing Specification Languages for Planning Domains Diane Kitchin, Lee McCluskey,

Similar presentations


Presentation on theme: "Knowledge and Systems Research Group, University of Huddersfield B vs OCL: Comparing Specification Languages for Planning Domains Diane Kitchin, Lee McCluskey,"— Presentation transcript:

1 Knowledge and Systems Research Group, University of Huddersfield B vs OCL: Comparing Specification Languages for Planning Domains Diane Kitchin, Lee McCluskey, Margaret West TALK to be given by: Ron Simpson Knowledge and Software Systems Research Group, The University of Huddersfield

2 Knowledge and Systems Research Group, University of Huddersfield Formal Software Specification Languages Artificial Intelligence Planning Domain Model Languages Process/ Systems/ Requirements Modelling Languages CSP Petri Nets Z BVDM UML SSADM PDDL OCL h Declarative/ Descriptive Languages SE AI

3 Knowledge and Systems Research Group, University of Huddersfield Formal Specification Languages (eg B) are ‘close’ to Planning Domain Model Languages (eg OCL h ) They share: the concept of a `state' the technique of using pre and post conditions in state transformation, via operations to specify state dynamics the assumptions of closed world, default persistence and instantaneous operator execution the presence of state invariants for validity and documentation purposes.

4 Knowledge and Systems Research Group, University of Huddersfield Capturing domain knowledge very accurately.. the need: Real Planning Applications now exist in safety- related areas: Space mission control Military resource control Robot control - among many other implications (!) there is a need to establish and maintain highly accurate domain knowledge

5 Knowledge and Systems Research Group, University of Huddersfield Accurate domain knowledge.. How? Our current method using GIPO: Knowledge Sources Operational Domain Model Knowledge Formulation Validation Processes GIPO OCL h

6 Knowledge and Systems Research Group, University of Huddersfield Accurate domain knowledge.. How? Method using a FSL: Knowledge Sources Formal Specification Operational Domain Model Knowledge Formulation Validation and Translation

7 Knowledge and Systems Research Group, University of Huddersfield Accurate domain knowledge.. How? FSL = ‘B’, Tool = B-Toolkit Knowledge Sources Formal Specification Operational Domain Model Knowledge Formulation Validation and Translation ‘BToolkit’ B

8 Knowledge and Systems Research Group, University of Huddersfield Paper content: Compare GIPO to B- Toolkit ( OCL h vs B) Both GIPO and B-Toolkit are tools environments that provide tools for the capture and debugging of formal models The B method is of industrial-strength and while the B-Toolkit is commercially available, GIPO is a research tool

9 Knowledge and Systems Research Group, University of Huddersfield Simple Comparison Method Take some typical worlds which have been represented in OCL h using GIPO (Blocks World, Tyre World). Re-formulate them using the B-Toolkit. Compare the Process and Result of the formulation.

10 Knowledge and Systems Research Group, University of Huddersfield Domain Model Formulation in OCL h : GIPO. GIPO contains  domain model editors  basic static analysis checking tools. is object class hierarchy consistent? do object state descriptions satisfy invariants? are predicate structures and operator schema mutually consistent? are task specifications consistent with the domain model?  a plan stepper  a reachability analyser  solution animator  a random task generator  hierarchy consistency check  operator learning mechanism Acquisition of Objects/ Classes /Invariants Operator Acquisition Static Analysis Tools More Static Analysis Solving simple tasks using The Plan Stepper Solving more complex Tasks with Planners

11 Knowledge and Systems Research Group, University of Huddersfield GIPO’s GUI

12 Knowledge and Systems Research Group, University of Huddersfield Domain Model Formulation in B: B-Toolkit Define a set of abstract machines To define each machine, define its variables, its invariant, its initialisation and operations e.g. MACHINE: Blocks_World SETS: Block, Gripper VARIABLES: On_Block, On_Table, Gripped, Free

13 Knowledge and Systems Research Group, University of Huddersfield B-Toolkit Animator

14 Knowledge and Systems Research Group, University of Huddersfield Domain Model Formulation in B: Language Comparison

15 Knowledge and Systems Research Group, University of Huddersfield Domain Model Formulation in B: B-Toolkit Generate and Discharge ‘Proof Obligations’ A set of proof obligations involving consistency properties of a system can be automatically generated by the B-Tool. e.g.: (1) Consistency of initialisation: the initialisation must establish the invariant. (2) Consistency of operation: each operation must preserve the invariant. Execute (Animate) Operations

16 Knowledge and Systems Research Group, University of Huddersfield

17

18

19 Discharged Proof Obligation

20 Knowledge and Systems Research Group, University of Huddersfield General Results - 1 B allows the user to encode more precise details about the relations in the domain than GIPO - they can be relations, 1-1 functions etc, and can be given accurate restrictions. This level of precision is certainly not available in most planning languages, and is attractive in safety-related applications. As OCL h is aimed specifically at planning, it has in-built structures and mechanisms that anticipate the entities that are to be represented. This makes the encoding rather more compact than the B specification. Encoding in B, as one would expect from a general language, one is left with more choices and decisions in the encoding process.

21 Knowledge and Systems Research Group, University of Huddersfield General Results -2 Both languages assume default persistence and a closed world. The differences in this respect are subtle, in that in B a variable involved in a precondition remains unaltered by default. However in OCL h there is a local open-world assumption in operator descriptions - a `prevail' is required if precondition variables are unchanged. Regarding validation and debugging, both GIPO and the B-Toolkit provide effective, automated tool support which performs validation/consistency checks and identifies the presence of bugs. Not surprisingly, the B-Toolkit was more reliable at finding inconsistencies in some cases, as it demands a more detailed specification, and the tool is more developed.

22 Knowledge and Systems Research Group, University of Huddersfield Conclusions The comparison shows a remarkable similarity between the two languages and tool functions. The advantages in using a method such as B are that - it is mathematically based so that formal reasoning can be used to deduce desirable (and potentially undesirable) properties. - support for the method is available via tools - such as the Toolkit. However, the disadvantages are that - there are no special planning - oriented features, - the B specification, once validated, would have to be translated into a more planner-friendly language in order to be used with current planning engines. FUTURE WORK: - build a B -> OCL translator - try out B on a complex planning world


Download ppt "Knowledge and Systems Research Group, University of Huddersfield B vs OCL: Comparing Specification Languages for Planning Domains Diane Kitchin, Lee McCluskey,"

Similar presentations


Ads by Google