Enhancing Efficiency and Expressiveness in Answer Set Programming - - PowerPoint PPT Presentation

enhancing efficiency and expressiveness in answer set
SMART_READER_LITE
LIVE PREVIEW

Enhancing Efficiency and Expressiveness in Answer Set Programming - - PowerPoint PPT Presentation

0 Enhancing Efficiency and Expressiveness in Answer Set Programming Systems Wolfgang Faber faber@kr.tuwien.ac.at Enhancing Efficiency and Expressiveness in ASP Systems 1 Agenda Answer Set Programming Syntax and Semantics Answer


slide-1
SLIDE 1

Enhancing Efficiency and Expressiveness in Answer Set Programming Systems

Wolfgang Faber faber@kr.tuwien.ac.at

slide-2
SLIDE 2

Enhancing Efficiency and Expressiveness in ASP Systems 1

Agenda

  • Answer Set Programming – Syntax and Semantics
  • Answer Set Computation

– Computing Deterministic Consequences – Choice Heuristics

  • Experiments
  • Weak Constraints
  • Front-ends

– Inheritance – Diagnosis

  • Conclusions
slide-3
SLIDE 3

Enhancing Efficiency and Expressiveness in ASP Systems 2

Answer Set Programming – Syntax

Sets of clauses of the following form:

a1 ∨ · · · ∨ an :− b1, · · · , bk, not bk+1, · · · , not bm.

  • ai, bj may contain variables
  • ai, bj may be of the form ¬x

(true/strong/explicit negation)

  • Rules, Facts, Integrity Constraints
slide-4
SLIDE 4

Enhancing Efficiency and Expressiveness in ASP Systems 3

Answer Set Programming – Semantics

  • Defi ned on the Ground Program
  • Answer Sets: Consistent Sets of Ground Generalized Atoms
  • Satisfy all clauses:

Whenever the body is true, the head must be true as well.

  • Subset Minimality
  • Stability through Gelfond-Lifschitz-Transformation
slide-5
SLIDE 5

Enhancing Efficiency and Expressiveness in ASP Systems 4

Example: Hamiltonian Path

Input: vertex(V), arc(V1,V2), start(V)

reached(X) :− start(X). reached(X) :− in ham( ,X). in ham(X,Y) ∨ out ham(X,Y) :− reached(X), arc(X,Y). :− in ham(X,Y), in ham(X,Y1), Y != Y1. :− in ham(X,Y), in ham(X1,Y), X != X1. :− vertex(X), not reached(X).

slide-6
SLIDE 6

Enhancing Efficiency and Expressiveness in ASP Systems 5

Answer Set Computation – DLV Architecture

Diagnosis Frontend Inheritance Frontend Brave/Cautious Frontend User Interface Frontend True Negation Filtering Output Further Frontends

Objectivity

Oracle File System Grounding Intelligent Model Generator Model Checker Frontend Planning Program Ground DLV kernel

slide-7
SLIDE 7

Enhancing Efficiency and Expressiveness in ASP Systems 6

Model Generator

  • Computes candidate Answer Sets
  • Alternation:

– Computation of Deterministic Extension – Choice

  • until no choice is left
slide-8
SLIDE 8

Enhancing Efficiency and Expressiveness in ASP Systems 7

Model Generator – Architecture

DetCons Choice

empty stack

PTs exist yes no Exit Model Check

inconsistency

Backtracking Output DS Linear Stack

pop push

slide-9
SLIDE 9

Enhancing Efficiency and Expressiveness in ASP Systems 8

Supporting Rules

A rule r supports an atom a w.r.t. an Answer Set A if

  • 1. the body of r is true in A and
  • 2. a is the only atom in the head of r, which is true in A.

Theorem: For any atom a in an answer set A of a program P , there exists at least one rule r ∈ P which supports a.

slide-10
SLIDE 10

Enhancing Efficiency and Expressiveness in ASP Systems 9

Four Truthvalues

T true M must-be-true U undefi ned F false M T U F Knowledge Truth Non-standard truthvalue must-be-true for atoms which are known to be true in any extending answer set, but which miss a supporting rule.

slide-11
SLIDE 11

Enhancing Efficiency and Expressiveness in ASP Systems 10

Deterministic Consequences

Make inferences based on

  • rule satisfaction
  • supporting rules for a must-be-true atom
  • number of potentially supporting rules for atoms

All these inferences are local with respect to the rules, in which an atom which changed truthvalue occurs, and are effi ciently implemented.

slide-12
SLIDE 12

Enhancing Efficiency and Expressiveness in ASP Systems 11

Heuristics

Dynamic Heuristics

DetCons PT atoms DetCons DetCons DetCons

  • early detection of inconsistencies
  • a lot of information for the heuristic function
  • expensive computation
slide-13
SLIDE 13

Enhancing Efficiency and Expressiveness in ASP Systems 12

Heuristics Definitions

  • h1: Minimize “short” unsatisfi ed clauses, balanced by an additive and

multiplicative criterion.

  • h2: Minimize undefi ned atoms, balanced by a “min/max” criterion.
  • h3: Minimize must-be-true atoms of increasing level, maximize satisfi ed

clauses, no balancing.

  • h4: Balanced version of h3, using sum.
slide-14
SLIDE 14

Enhancing Efficiency and Expressiveness in ASP Systems 13

Benchmarks

  • 3SAT: Satisfi ability of propositional formulae
  • HAMPATH: Existence of a Hamiltonian Path
  • BLOCKSWORLD: Plan-fi nding in a well-known AI setting
  • STRATCOMP: Deciding whether some companies are strategic
slide-15
SLIDE 15

Enhancing Efficiency and Expressiveness in ASP Systems 14

slide-16
SLIDE 16

Enhancing Efficiency and Expressiveness in ASP Systems 15

Optimizations for Computing Heuristics

  • 1. Criterion when the heuristic values of two literals will be equal.
  • 2. First-level heuristics:
  • A more effi ciently computable heuristics selects a subset of the choice

candidates.

  • On this subset, the more expensive heuristics is evaluated.
slide-17
SLIDE 17

Enhancing Efficiency and Expressiveness in ASP Systems 16

slide-18
SLIDE 18

Enhancing Efficiency and Expressiveness in ASP Systems 17

Weak Constraints

Clauses of the following form:

:∼ L1, · · · , Lm, not Lm+1, · · · , not Ln. [w : l] Li :

classical literals

w ≥ 1 :

integer weight

l ≥ 1 :

integer priority level Informal semantics: violation of a weak constraint causes a cost. Answer sets are those answer sets of the weak-constraint-free program, which minimize the sum of weights of violated weak constraints along the priority levels.

slide-19
SLIDE 19

Enhancing Efficiency and Expressiveness in ASP Systems 18

Example: Traveling Salesperson

Input: vertex(V), arc cost(V1,V2,C), start(V) Program: Hamiltonian Path plus

arc(X,Y) :− arc cost(X,Y,C). :∼ in ham(X,Y), arc cost(X,Y,C). [C:1]

slide-20
SLIDE 20

Enhancing Efficiency and Expressiveness in ASP Systems 19

Inheritance

Objects — object identifi er, inheritance relation, rules

  • 1

{ auth(bob) :− not auth(ann). (r1) auth(ann) ∨ auth(tom) :− not ¬auth(alice). } (r2)

  • 2 : o1

{ ¬auth(alice). } (r3)

  • 3 : o1

{ ¬auth(bob). } (r4)

Informal semantics:

  • Overriding of literals and rules.
  • All rules must be satisfi ed or overridden.
  • Minimality, stability.
slide-21
SLIDE 21

Enhancing Efficiency and Expressiveness in ASP Systems 20

Diagnosis

Input: Hypotheses, a theory, observations H,T,O Options: Semantics of explanation (Abduction, Consistency) Minimality criterion Output: A (minimal) set of hypotheses ∆ ⊆ H explaining the observations by the theory

T O

slide-22
SLIDE 22

Enhancing Efficiency and Expressiveness in ASP Systems 21

Further Front-ends

  • Planning Front-End

– New action language K – Optimistic and secure planning

  • SQL3
  • Prioritized logic programs

– Preferred Answer Sets – Weakly Preferred Answer Sets

  • plp by Delgrande/Schaub/Tompits (priorities)
  • nlp by Pearce/Sarsakov/Schaub/Tompits/Woltran (nested expressions)
slide-23
SLIDE 23

Enhancing Efficiency and Expressiveness in ASP Systems 22

Conclusions

  • Optimization techniques for ASP systems

– Truthvalue “M” – Heuristics

  • Enhancing Expressiveness and Knowledge Modeling Features
  • f ASP systems

– Weak Constraints – Inheritance and other front-ends

  • Implementation and Experimentation