Constraint Logic Programming: A Survey - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Constraint Logic Programming: A Survey

Description:

Joxan Jaffar and Michael J. Maher. IBM Thomas J. Watson Research Center ... Pow(1,y,z) awaits grounding of y. Constraint Logic Programming: A Survey. Mar 20, 2002 ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 16
Provided by: Shar224
Category:

less

Transcript and Presenter's Notes

Title: Constraint Logic Programming: A Survey


1
Constraint Logic Programming A Survey
  • Joxan Jaffar and Michael J. Maher
  • IBM Thomas J. Watson Research Center

Presented by Sharath R. Cholleti
Center for Distributed Object Computing Department
of Computer Science Washington University
2
Introduction
  • Constraint Logic Programming (CLP)
  • Constraint Solving Logic Programming
  • Declarative paradigms
  • Example sumto(n, 12..n)
  • sumto(0,0).
  • sumto(N,S) - Ngt1, NltS, sumto(N-1, S-N).
  • ?- Slt3, sumto(N,S)
  • Three answers (N0, S0), (N1, S1) (N2,
    S3)

3
Example
4
Key features
  • Constraints specify the query as well as answers
  • During execution, new variables and constraints
    are created
  • Satisfiabilty of the collection of constraints is
    tested

5
Constraint Languages
  • SKETCHPAD interactive drawing system
  • THINGLAB OO flavor
  • JUNO
  • CONSTRAINTS
  • 2LP c-like
  • CHARME
  • ILOG C library

6
CLP Languages
  • Prolog II
  • CLP(R) linear arithmetic constraints
  • CHIP
  • Prolog III
  • LOGIN
  • LIFE
  • BNR-Prolog
  • Computes over 3 domains
  • Boolean algebra, finite domains, arithmetic over
    real numbers

7
Top-down Execution
  • Operational semantics as a transition system on
    states
  • ltA,C,Sgt
  • A collection of as-yet-unseen constraints
  • C active constraints
  • S passive constraints
  • Transitions
  • ltA U a, C, Sgt ? ltA U B, C, S U (ah)gt
  • h ? B is a rule of P

8
Top-down Execution (cont)
  • Consistency or satisfiability
  • Resolution
  • Inference
  • Infer(C,S)
  • C S ?? C S
  • Stronger the collection of active constraints,
    the earlier the failure
  • Strong infer function?
  • Depth-first search with chronological backtracking

9
Implementation Issues
  • Manipulation of constraints
  • Top-down systems

10
Incrementality
  • Incremental to be practical
  • S o1,o2,..,ok-1
  • Non-incremental
  • cost(S, ok) gt cost(o1,o2,..,ok)
  • Incremental
  • cost(o1,o2,..,ok-1) cost(S, ok) lt
    cost(o1,o2,..,ok)
  • Practical
  • cost(o1,o2,..,ok-1) cost(S, ok)
    cost(o1,o2,..,ok) X

11
Satisfiabilty
  • Various algorithms
  • Gaussian elimination
  • Simplex method
  • Makanin algorithm
  • Davis-Putnam algorithm
  • Boolean algebra
  • Variable elimination
  • Integer programming

12
Backtracking
  • Restore the state of the constraint solver
  • Trailing of constraints
  • Prolog binding of variables
  • CLP record changes to constraints
  • In CLP an expression might be completely changed
  • Value trail each variable is trailed with
    associated expression (constraint)
  • Time-stamps same choice point

13
Inference Engine
  • Delaying/wakeup of goals constraints
  • When passive constraint becomes active
  • Pow(x,y,z)
  • Pow(1,y,z) awaits grounding of y

14
(No Transcript)
15
Applications
  • Two classes
  • Query
  • Combinatorial
  • Analysis and synthesis of analog circuits
  • Options trading analysis
  • Temporal reasoning
  • Cutting stock
  • DNA sequencing
  • Scheduling
Write a Comment
User Comments (0)
About PowerShow.com