1 / 56

CHR + D + A + O Operational Semantics in Fluent Calculus

CHR + D + A + O Operational Semantics in Fluent Calculus. December, 2007. Simple Fluent Calculus (SFC). Introduction. A many-sorted first-order language with equality Includes: Sorts: FLUENT < STATE, ACTION, SIT Functions: Predicate. Abbreviations. Foundational Axioms (F state ).

bardia
Download Presentation

CHR + D + A + O Operational Semantics in Fluent Calculus

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. CHR + D + A + O Operational Semantics in Fluent Calculus December, 2007

  2. SimpleFluent Calculus (SFC)

  3. Introduction • A many-sorted first-order language with equality • Includes: • Sorts: FLUENT < STATE, ACTION, SIT • Functions: • Predicate

  4. Abbreviations

  5. Foundational Axioms (Fstate)

  6. SFC Domain Axiomatization • State Constraints • Unique simple Action Precondition Axiom for each function symbol with range ACTION • A set of State Update Axioms • Foundational Axioms (Fstate) • Possibly further domain-specific axioms

  7. Pure State Formula • It may contain then: • Hold(f,z), where f is a fluent and z is a state • Any domain predicates referencing only the domain sorts

  8. State Constraints • Ex:

  9. Action Precondition Axiom • Ex:

  10. State Update Axiom • Ex: Question: Is it possible to change a previously “unknown” number of fluents at once? “Delta” is a pure state formula, so it can’t be used to generate the needed fluents. V+ and V- are just “fluent sets”... Can I use a function to generate these fluent sets?

  11. CHR Operational Semantics in Fluent Calculus

  12. Domain Sorts (1/2) • RULE • Ex: gcd(0) <=> true | true. • RULE_ID • ATOM < CONSTRAINT • p(1,2,7) • UDC < ATOM • BIC < ATOM • EQUATION < BIC

  13. Domain Sorts (2/2) • FORMULA < CONSTRAINT • CONJUNCTION < FORMULA • EQ_CONJ < CONJUNCTION • BIC_CONJ < CONJUNCTION • UDC_CONJ < CONJUNCTION

  14. “Domain” Sorts • BICS_STATE < STATE • UDCS_STATE < STATE • GOAL_STATE < STATE Question: Can I specialize the reserved sorts? Are the specialized ones considered “Domain” sorts?

  15. Domain Functions (1/5) G – Goal U – User Defined Constraints Store B – Built-in Constraint Store H – Propagation History0 • S0 :  SIT • The initial situation • InGoal : CONSTRAINT  FLUENT • The constraint x is in G • InUdc : UDC  FLUENT • The user defined constraint x is in U • InBic : BIC  FLUENT • The built-in constraint x is in B

  16. Domain Functions (2/5) • RuleId : RULE  RULE_ID • Returns an unique identifier for the passed rule • InPropHistory : RULE_ID x UDC_CONJ x EQ_CONJ  FLUENT • f = InPropHistory(rule, constraints, equations) • The ‘rule’ was executed with the conjunction of matching ‘constraints’ generating the conjunction of ‘equations’

  17. Domain Functions (3/5) • MakeGoal : CONJUNCTION  GOAL_STATE • Makes an state containing an InGoal(c) fluent for each constraint c in the conjunction • MakeBICS : BIC_CONJ  BICS_STATE • Makes an state containing an InBic(c) fluent for each constraint c in the conjunction • MakeUDCS : UDC_CONJ  UDCS_STATE • Makes an state containing an InUdc(c) fluent for each constraint c in the conjunction

  18. Domain Functions (4/5) • “,” : CONSTRAINT x CONSTRAINT  CONJUNCTION •  : CONSTRAINT x CONJUNCTION • true :  BIC • false :  BIC

  19. Domain Functions (5/5) • SimplifRule : UDC_CONJ x BIC_CONJ x CONJUNCTION  RULE • PropagRule : UDC_CONJ x BIC_CONJ x CONJUNCTION  RULE • SimpagRule : UDC_CONJ x UDC_CONJ x BIC_CONJ x CONJUNCTION  RULE • These functions make up a rule from its parts

  20. Domain Predicates (1/3) • InQuery : CONSTRAINT • The constraint is in the initial goal (query) • DisjointVariables : RULE x CONSTRAINT • DisjointVariables(rule, constraint) • No variable in ‘rule’ appears in ‘constraint’

  21. Domain Predicates (2/3) • Matching : UDC_CONJ x UDC_CONJ x EQ_CONJ • Matching(head, matching, equations) • The conjunction of udc constraints ‘head’ matches the conj. of udc constraints ‘matching’ generating the conj. of matching equations ‘equations’ • Matching(“p(X) , q(Y)”,“p(A), p(2)”,“X=A, Y=2”) • Matching(“p(X) , q(Y)”,“p(A), p(2)”, “X=2, Y=A”)

  22. Domain Predicates (3/3) • checkEntails : BIC_CONJ x EQ_CONJ x BIC_CONJ • checkEntails(bics, head, guard) • CT |= bics   x (head ^ guard)

  23. Domain Actions • Solve: BIC  ACTION • Introduce: UDC  ACTION • Simplify: RULE x UDC_CONJ x EQ_CONJ  ACTION • Propagate: RULE x UDC_CONJ x EQ_CONJ  ACTION • Simpagate: RULE x UDC_CONJ x UDC_CONJ x EQ_CONJ  ACTION

  24. Abbreviations (1/2) These expressions cannot be defined as domain predicates, since a pure state formula forces all predicates to refer just to domain sorts.

  25. Abbreviations (2/2)

  26. Initial State (State Constraint)

  27. CHR Transitions

  28. Introduce g – goal being introduced (UDC) z – state (STATE) s – situation (SIT)

  29. Solve g – goal being solved (BIC) z – state (STATE) s – situation (SIT)

  30. Simplify hR – Rule Head (UDC_CONJ) g – Rule guard (BIC_CONJ) b – Rule body (UDC_CONJ) z – state (STATE) m – matching constraints (UDC_CONJ) e – matching equations (EQ_CONJ) bics – the BIC store as a conjunction of BICS (BIC_CONJ)

  31. Simplify hR – Rule Head (UDC_CONJ) g – Rule guard (BIC_CONJ) b – Rule body (UDC_CONJ) s – situation (SIT) m – matching constraints (UDC_CONJ) e – matching equations (EQ_CONJ)

  32. Propagate hk – Rule Head (UDC_CONJ) g – Rule guard (BIC_CONJ) b – Rule body (UDC_CONJ) z – state (STATE) m – matching constraints (UDC_CONJ) e – matching equations (EQ_CONJ)

  33. Propagate hk – Rule Head (UDC_CONJ) g – Rule guard (BIC_CONJ) b – Rule body (UDC_CONJ) s – situation (SIT) m – matching constraints (UDC_CONJ) e – matching equations (EQ_CONJ)

  34. Simpagate hk – Rule Head Keep (UDC_CONJ) hR – Rule Head Remove (UDC_CONJ) g – Rule guard (BIC_CONJ) b – Rule body (UDC_CONJ) z – state (STATE) mk – matching head keep constraints (UDC_CONJ) mR – matching head remove constraints (UDC_CONJ) e – matching equations (EQ_CONJ)

  35. Simpagate hk – Rule Head Keep (UDC_CONJ) hR – Rule Head Remove (UDC_CONJ) g – Rule guard (BIC_CONJ) b – Rule body (UDC_CONJ) s – situation (SIT) mk – matching head keep constraints (UDC_CONJ) mR – matching head remove constraints (UDC_CONJ) e – matching equations (EQ_CONJ)

  36. CHR + DOperational Semantics in Fluent Calculus

  37. Nondeterminism in Fluent Calculus • Simple disjunctive state update axiom • θn is a first-order formula without terms of any reserved sort

  38. Domain Sorts • DISJUNCTION < FORMULA • CHOICE < DISJUNCTION • ((a11, ... , a1n) ; ... ; (am1,... ,amn)), where all aij are ATOM’s

  39. Domain Functions • “;” : CONSTRAINT x CONSTRAINT  DISJUNCTION •  : CONSTRAINT x FORMULA

  40. Domain Actions • Split : CHOICE  ACTION

  41. Actions

  42. Split c – choice being splitted (CHOICE) bi – a component of the choice (CONJUNCTION) z – state (STATE) s – situation (SIT)

  43. CHR + D + AOperational Semantics in Fluent Calculus

  44. Domain Sorts • JUSTIFICATION < CONJUNCTION • “a1, ... , an”, where all ai are atoms

  45. Domain Functions (1/3) J - Justifications • Just : CONSTRAINT x JUSTIFICATION  FLUENT • Just(c,j) • The constraint c is justified by j • MakeJust : CONJUNCTION x JUSTIFICATION  STATE • Makes an state containing an Just(c,j) fluent for each constraint c in the conjunction

  46. Domain Functions (2/3) • SelectJust : JUSTIFICATION x STATE STATE • SelectJust(j,z) • Selects the fluents of the form “Just(c,jc)” in z such that JustifiedBy(c, j, z) • SelectConstraint : JUSTIFICATION x STATE STATE • SelectConstraint(j,z) • Selects the fluents of the form “InUdc(c)”, “InBic(c)” or “InGoal(c)” in z such that JustifiedBy(c, j, z)

  47. Domain Functions (3/3) • SelectPropHistory : JUSTIFICATION x STATE STATE • SelectPropHistory(j,z) • Selects the fluents of the form “PropHistory(rule,matched,equations)” in z such that for some constraint c in ‘matched’, JustifiedBy(c, j, z)

  48. Abbreviations

  49. Domain Actions • AddConstraint : CONSTRAINT x JUSTIFICATION  ACTION • RemoveConstraint : JUSTIFICATION  ACTION

  50. Initial State

More Related