+ All Categories
Home > Documents > Logic Programming with Solution Preferences Hai-Feng Guo University of Nebraska at Omaha, USA.

Logic Programming with Solution Preferences Hai-Feng Guo University of Nebraska at Omaha, USA.

Date post: 27-Mar-2015
Category:
Upload: bailey-kennedy
View: 217 times
Download: 0 times
Share this document with a friend
Popular Tags:
25
Logic Programming with Solution Preferences Hai-Feng Guo University of Nebraska at Omaha, USA
Transcript
  • Slide 1

Logic Programming with Solution Preferences Hai-Feng Guo University of Nebraska at Omaha, USA Slide 2 Preference Logic Programming (PLP) Proposed by Bharat Jayaraman (ICLP95, POPL96). PLP is an extension of constraint logic programming for declaratively specifying optimization problems requiring comparison and selection among alternative solutions. Slide 3 Optimization Problems Traditional specification: A set of constraints Minimizing (or maximizing) an objective function Difficult to specify in the following cases compound objectives optimization over structural domains Slide 4 Optimization using PLP Specification in PLP A set of constraints Solution preference rules Advantages Separate optimization from problem specification Declarativity and flexibility Slide 5 A simple example: search for a lowest-cost path path(X, X, 0, 0, []). path(X, Y, C, D, [(X, Y)]) :- edge(X, Y, C, D). path(X, Y, C, D, [(X, Z) | P]) :- edge(X, Z, C1, D1), path(Z, Y, C2, D2, P), D is D1 + D2, C is C1 + C2. edge(a, b, 3, 4). path(X,Y,C1, D1,_) Mode Declaration for Tabled Predicates :- table p(a 1, , a n ). p/n is a predicate name, n > 0; each a i has one of the following forms: + denotes that this indexed argument is used for variant checking; denotes that this non-indexed argument is not used for variant checking. Slide 12 Reachability :- table reach(+, +, ). reach(X, Y, E) :- reach(X, Z, E1), arc(Z, Y, E2), append(E1, E2, E). reach(X, Y, E) :- arc(X, Y, E). arc(a, b, [(a, b)]). arc(a, c, [(a, c)]). arc(b, a, [(b, a)]). :- reach(a, X, P). abc Slide 13 Built-in Modes for Tabled Predicates ModesInformal Semantics + min max last


Recommended