Abstract

Given

a

parallel

program

represented

by

a

task

graph

the

objective

of

a

scheduling

algorithm

is

to

minimize

the

overall

execution

time

of

the

program

by

properly

assigning

the

nodes

of

the

graph

to

the

processors

In

this

paper

we

propose

a

novel

GA-based

algorithm

with

an

objective

to

simultaneously

meet

the

goals

of

high

performance

scalability

and

fast

running

time

Theproposed

PGS

-LRB-

Parallel

Genetic

Scheduling

-RRB-

algorithm

itself

is

a

parallel

algorithm

and

generates

high

quality

solutions

in

a

short

time

By

encoding

a

scheduling

list

as

a

chromosome

the

PGS

algorithm

can

potentially

generate

an

optimal

scheduling

list

which

in

turn

leads

toan

optimal

schedule

The

major

strength

of

the

PGS

algorithm

lies

in

its

two

efficient

genetic

operators

the

order

crossover

and

mutation

which

effectively

combine

the

building-blocks

of

good

scheduling

lists

to

construct

better

lists

When

evaluated

with

random

task

graphs

for

which

optimal

solutions

are

known

the

algorithm

generates

optimal

solutions

for

more

than

half

of

the

test

cases

and

close-to-optimal

for

the

remaining

cases

Introduction

Given

a

parallel

program

modeled

by

a

node

and

edgeweighted

directed

acyclic

graph

-LRB-

DAG

-RRB-

finding

an

optimal

schedule

with

a

minimum

turnaround

time

is

well

known

to

be

an

NP-complete

problem

-LSB-

-RSB-

-LSB-

-RSB-

The

problem

can

be

solved

in

a

polynomial-time

only

for

a

few

simplified

cases

-LSB-

-RSB-

-LSB-

-RSB-

If

the

simplifying

assumptions

of

these

cases

are

relaxed

the

problem

becomes

NP-hard

in

the

strong

sense

Therefore

state-space

search

techniques

are

considered

to

be

the

only

resort

for

finding

optimal

solutions

-LSB-

-RSB-

However

most

of

these

techniques

are

still

designed

to

work

under

restricted

environments

and

are

not

applicable

to

general

situations

Due

to

the

intractability

of

the

scheduling

problem

many

polynomial-time

heuristics

are

reported

to

tackle

the

problem

under

more

pragmatic

situations

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

While

these

heuristics

are

shown

to

be

effective

in

experimental

studies

they

usually

can

not

generate

optimal

solutions

and

there

is

no

guarantee

in

their

performance

in

general

Furthermore

these

heuristics

are

usually

not

scalable

in

terms

of

their

running

times

and

solution

quality

for

large

problem

sizes

In

view

of

the

drawbacks

of

the

existing

sequential

scheduling

heuristics

we

aim

at

designing

a

new

scheduling

scheme

that

has

a

high

capability

to

generate

optimal

solutions

and

is

also

fast

and

scalable

To

obtain

high

quality

solutions

we

devise

a

genetic

formulation

of

the

scheduling

problem

in

which

scheduling

lists

-LRB-

ordering

of

tasks

for

scheduling

-RRB-

are

systematically

combined

by

using

computationally

efficient

operators

so

as

to

determine

an

optimal

scheduling

list

To

achieve

a

reduced

time

complexity

the

proposed

algorithm

is

parallelized

The

algorithm

scales

well

with

the

number

of

processors

Moreover

the

algorithm

considers

the

problem

for

general

DAGs

without

making

simplifying

assumptions

The

remainder

of

the

paper

is

organized

as

follow

In

the

next

section

we

provide

the

problem

statement

In

Section

we

present

the

proposed

parallel

genetic

scheduling

algorithm

Examples

are

used

to

illustrate

the

functionality

of

the

proposed

technique

In

Section

we

describe

our

experimental

study

and

its

results

Finally

we

provide

some

concluding

remarks

in

the

last

section

Problem

Statement

In

static

scheduling

a

parallel

program

canbe

modeled

by

a

directed

acyclic

graph

-LRB-

DAG

-RRB-

where

V

is

a

set

of

v

nodes

and

E

is

a

set

of

e

directed

edges

A

node

in

the

DAG

represents

a

task

which

in

turn

is

a

set

of

instructions

that

must

be

executed

sequentially

without

preemption

in

the

same

processor

The

weight

associated

with

a

node

which

represents

the

amount

of

time

needed

for

a

processor

to

execute

the

task

is

called

the

computation

cost

of

a

node

and

is

denoted

by

The

edges

in

the

DAG

correspond

to

the

communication

messages

and

precedence

constraints

among

the

nodes

The

weight

associated

with

an

edge

which

represents

the

amount

of

time

needed

to

communicate

the

data

is

called

the

communication

cost

of

the

edge

The

communication-to-computation-ratio

-LRB-

CCR

-RRB-

of

a

parallel

program

is

defined

as

its

average

communication

cost

divided

by

its

average

computation

cost

on

a

given

system

An

example

DAG

is

shown

in

Figure

The

target

multiprocessor

system

is

modeled

as

a

fully-connected

network

of

processing

elements

-LRB-

PEs

-RRB-

The

objective

of

scheduling

is

to

minimizing

the

schedule

length

which

is

defined

as

the

maximum

finish

time

among

all

tasks

The

Proposed

Parallel

Genetic

Algorithm

for

Scheduling

Genetic

algorithms

are

intelligent

search

techniques

which

have

found

many

applications

in

optimization

problems

-LSB-

-RSB-

-LSB-

-RSB-

In

simple

terms

given

a

well-defined

search-space

in

which

each

point

is

represented

by

a

bit

string

called

a

chromosome

a

GA

is

applied

by

using

three

genetic

This

research

was

supported

by

the

Hong

Kong

Research

Grants

Council

under

contract

number

HKUST

G

V

E

-LRB-

-RRB-

ni

w

ni

-LRB-

-RRB-

A

Parallel

Genetic-Search-Based

Algorithm

for

Scheduling

Arbitrary

Task

Graphs

to

Multiprocessors

Yu-Kwong

Kwok

and

Ishfaq

Ahmad

Department

of

Computer

Science

The

Hong

Kong

University

of

Science

and

Technology

Hong

Kong

Email

-LCB-

csricky

iahmad

-RCB-

@cs

ust.hk

search

operators

selection

crossover

and

mutation

to

improve

the

quality

of

a

population

of

potential

solutions

Due

to

its

recombinative

nature

in

the

searching

process

a

GA

can

be

very

effective

in

finding

optimal

solutions

-LSB-

-RSB-

The

proposed

genetic

formulation

of

the

scheduling

problem

is

as

follows

Encoding

We

make

a

valid

scheduling

list

as

a

chromosome

A

valid

scheduling

list

is

one

in

which

the

nodes

of

the

DAG

are

in

a

topological

order

Fitness

of

a

Chromosome

Fitness

value

is

defined

as

where

the

schedule

length

SL

is

determined

by

using

the

start-time

minimization

method

Thus

the

fitness

of

a

chromosome

is

always

bounded

between

and

Generation

of

the

Initial

Population

An

initial

population

is

generated

from

a

set

of

scheduling

lists

which

are

constructed

by

ALAP

ordering

b-level

ordering

t-level

ordering

static-level

ordering

and

a

random

topological

ordering

These

different

orderings

not

only

provide

the

necessary

diversity

yet

also

represent

a

population

with

a

higher

fitness

than

a

set

of

totally

random

topological

orderings

The

whole

population

is

then

generated

from

these

orderings

by

performing

random

swapping

of

nodes

Genetic

Operators

As

the

standard

crossover

and

mutation

operators

may

violate

precedence

constraints

we

need

to

use

some

other

well-defined

genetic

operators

The

inversion

operator

is

not

considered

because

it

can

obviously

generate

invalid

scheduling

lists

We

use

the

order

crossover

-LSB-

-RSB-

We

also

describe

a

a

mutation

operator

based

on

node-swapping

Order

Crossover

Operator

We

consider

a

single-point

order

crossover

operator

That

is

given

two

parents

we

first

pass

the

left

segment

-LRB-

i.e.

the

segment

on

the

left

of

the

crossover

point

-RRB-

from

the

first

parent

called

parent

to

the

child

Then

we

construct

the

right

fragment

of

the

child

by

taking

the

remaining

nodes

from

the

other

parent

called

parent

in

the

same

order

An

example

of

the

crossover

operator

is

given

in

Figure

-LRB-

a

-RRB-

Note

that

the

chromosomes

shown

in

the

figure

are

all

valid

topological

ordering

of

the

DAG

in

Figure

-LRB-

a

-RRB-

The

left

segment

of

parent

is

passed

directly

to

the

child

Then

the

nodes

in

the

right

segment

of

parent

are

appended

to

the

child

according

to

their

order

in

parent

This

order

crossover

operator

is

easy

to

implement

and

permits

fast

processing

The

most

important

merit

is

that

it

never

violates

the

precedence

constraints

as

dictated

by

following

theorem

Theorem

The

order

crossover

operator

always

produces

a

valid

scheduling

list

from

two

valid

parent

chromosomes

Proof

Suppose

we

are

given

two

parent

chromosomes

and

Let

the

crossover

point

be

chosen

at

the

kth

position

Then

after

applying

the

order

crossover

the

child

will

be

for

some

indices

x

and

y.

Obviously

the

precedence

constraints

among

any

two

nodes

at

or

before

the

kth

position

will

be

respected

For

a

node

at

or

before

the

kth

position

and

a

node

after

the

kth

position

the

precedence

constraint

-LRB-

if

any

-RRB-

will

also

be

respected

because

their

relative

positions

are

the

same

as

in

parent

Finally

for

any

two

nodes

after

the

kth

position

the

precedence

constraint

-LRB-

if

any

-RRB-

will

also

be

respected

because

their

relative

positions

are

the

same

as

in

parent

by

definition

of

the

order

crossover

operator

-LRB-

Q.E.D.

-RRB-

Mutation

Operator

We

define

the

mutation

operator

as

a

swapping

of

two

nodes

in

the

list

A

valid

topological

order

can

be

transformed

into

another

topological

order

by

swapping

some

nodes

Not

every

pairs

of

nodes

can

be

swapped

without

violating

the

precedence

constraints

Two

nodes

are

interchangeable

if

they

are

not

lying

on

the

same

path

in

the

DAG

Using

a

pre-processing

depth-first

traversal

of

the

DAG

we

can

check

whether

two

nodes

are

interchangeable

in

a

constant

time

during

the

search

An

example

is

given

in

Figure

-LRB-

b

-RRB-

where

two

interchangeable

nodes

and

are

randomly

chosen

and

their

positions

in

the

list

are

swapped

Control

Parameters

We

use

adaptive

control

parameters

as

suggested

by

Srinivas

et

al.

-LSB-

-RSB-

The

adaptive

crossover

rate

is

defined

as

follows

where

is

the

maximum

fitness

value

in

the

local

population

is

the

average

fitness

value

is

the

fitness

value

of

the

fitter

parent

for

the

crossover

and

is

a

positive

real

constant

less

than

The

adaptive

mutation

rate

is

Figure

An

example

DAG

w

ni

-LRB-

-RRB-

SL

-LRB-

-RRB-

w

ni

-LRB-

-RRB-

n

n

-LCB-

-RCB-

n

n

-LCB-

-RCB-

parent

parent

crossover

point

Figure

-LRB-

a

-RRB-

An

example

of

the

order

crossover

operator

Mutated

-LRB-

swapped

and

-RRB-

n

Figure

-LRB-

b

-RRB-

An

example

of

the

mutation

operator

-LCB-

-RCB-

-LCB-

-RCB-

-LCB-

-RCB-

-LCB-

-RCB-

-LCB-

n

-RCB-

n

niv

-LCB-

-RCB-

n

n

n

j

v

-LCB-

-RCB-

n

n

ik

n

jx

n

j

y

-LCB-

-RCB-

n

mc

mc

k

c

f

m

a

x

f

-LRB-

-RRB-

f

m

a

x

f

av

g

-LRB-

-RRB-

f

maxf

av

g

f

k

c

mc

defined

as

follows

where

f

is

the

fitness

value

of

the

chromosome

to

be

mutated

and

is

a

positive

real

constant

less

than

Using

the

above

adaptive

crossover

and

mutation

rate

the

best

chromosome

is

protected

from

disruption

by

crossover

and

mutation

On

the

other

hand

when

the

population

tends

to

be

become

more

homogeneous

both

rates

increase

because

will

be

about

the

same

as

Thus

under

such

a

situation

chromosomes

are

more

likely

to

be

perturbed

Note

that

even

though

the

initial

setting

of

the

crossover

rate

and

mutation

rate

is

the

same

for

all

the

parallel

processors

the

adaptive

strategy

gradually

leads

to

the

desired

heterogeneity

of

the

parameters

among

the

processors

Two

other

control

parameters

which

are

critical

to

the

performance

of

a

GA

are

the

population

size

and

the

number

of

generation

Usually

and

are

fixed

for

all

problem

sizes

However

this

is

not

appropriate

because

larger

problems

require

more

time

for

exploration

and

exploitation

We

therefore

vary

these

two

parameters

linearly

according

to

the

problem

size

Specifically

we

set

and

where

and

are

real

constants

Parallelization

The

global

population

is

partitioned

into

q

subpopulations

where

q

is

the

number

of

PPEs

For

efficiency

we

use

a

synchronous

connected

island

model

-LSB-

-RSB-

-LSB-

-RSB-

in

which

PPEs

communicate

periodically

to

exchange

the

fittest

individual

and

the

communication

is

a

synchronous

voting

such

that

the

fittest

individual

is

broadcast

to

all

the

PPEs

When

the

PPEs

communicate

only

the

best

chromosome

migrates

When

the

fittest

chromosome

is

imported

the

worst

chromosome

in

the

local

population

is

discarded

Then

the

fittest

chromosome

and

the

locally

best

chromosome

are

protected

from

the

rank-based

selection

process

The

period

of

communication

for

the

PPEs

is

set

to

be

T

number

of

generations

which

follows

an

exponentially

decreasing

sequence

initially

then

and

so

on

The

rationale

is

that

at

the

beginning

of

the

search

the

diversity

of

the

global

population

is

high

At

such

early

stages

exploration

is

more

important

than

exploitation

and

therefore

the

PPEs

should

work

on

the

local

sub-population

independently

for

a

longer

period

of

time

When

the

search

reaches

the

later

stages

it

is

likely

that

the

global

population

converges

to

a

number

of

different

fittest

chromosomes

Thus

exploitation

of

morepromising

chromosomes

is

needed

to

avoid

unnecessary

work

on

optimizing

the

locally

best

chromosomes

that

may

have

smaller

fitness

values

than

the

globally

best

chromosomes

With

the

above

design

considerations

the

Parallel

Genetic

Scheduling

-LRB-

PGS

-RRB-

algorithm

is

outlined

below

Parallel

Genetic

Scheduling

-LRB-

PGS

-RRB-

-LRB-

-RRB-

Generate

a

local

population

with

size

equal

to

by

perturbing

a

pre-defined

topological

ordering

of

the

DAG

-LRB-

e.g.

ALAP

ordering

b-level

ordering

etc.

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

repeat

-LRB-

-RRB-

-LRB-

-RRB-

repeat

-LRB-

-RRB-

Using

the

current

crossover

and

mutation

rates

applied

the

operators

to

the

local

population

-LRB-

-RRB-

until

T

-LRB-

-RRB-

Accept

the

best

chromosome

from

a

remote

PPE

and

discard

the

worst

local

chromosome

accordingly

-LRB-

-RRB-

Explicitly

protect

the

best

local

and

remote

chromosome

and

adapt

new

crossover

and

mutation

rates

-LRB-

-RRB-

-LRB-

-RRB-

until

total

number

of

generations

elapsed

equal

to

Performance

Results

To

examine

the

efficacy

of

the

PGS

algorithm

we

have

implemented

it

on

the

Intel

Paragon

using

the

C

language

and

tested

it

using

a

set

of

random

task

graphs

for

which

the

optimal

solutions

are

known

The

suite

of

graphs

consists

of

three

sets

of

randomly

generated

task

graphs

with

different

CCRs

and

Each

set

consists

of

graphs

in

which

the

number

of

nodes

vary

from

to

with

increments

of

The

graphs

within

the

same

set

have

the

same

value

of

CCR

To

obtain

optimal

solutions

for

the

task

graphs

we

applied

a

parallel

A

algorithm

to

the

graphs

-LSB-

-RSB-

Since

generating

optimal

solutions

for

arbitrarily

structured

task

graphs

takes

exponential

time

it

is

not

feasible

to

obtain

optimal

solutions

for

larger

graphs

Since

the

performance

of

a

genetic

algorithm

critically

depends

on

the

population

size

and

number

of

generations

used

we

performed

experiments

to

determine

the

most

suitable

values

for

these

control

parameters

However

due

to

space

limitations

we

do

not

present

those

results

in

this

paper

Based

such

results

in

the

subsequent

experiments

and

were

fixed

as

and

respectively

That

is

and

In

the

experiment

we

aimed

to

investigate

the

effect

of

the

number

of

PPEs

on

the

performance

of

the

algorithm

We

applied

the

PGS

algorithm

to

the

random

task

graphs

on

the

Paragon

using

and

Thepercentage

deviations

from

optimal

solutions

forthe

three

values

of

CCR

were

noted

and

are

shown

in

Table

In

the

table

the

total

number

of

optimal

solutions

generated

and

the

average

percentage

deviations

for

each

CCR

are

also

shown

These

results

indicate

that

the

PGS

algorithm

demonstrated

similar

performance

for

and

PPEs

When

PPEs

were

used

the

performance

degraded

by

a

moderately

larger

margin

One

explanation

for

this

phenomenon

is

that

using

more

PPEs

implies

the

size

of

a

local

population

is

smaller

This

in

turn

leads

to

smaller

diversity

of

the

local

population

Premature

convergence

is

then

more

likely

to

result

The

effect

of

CCR

was

quite

considerable

in

that

the

average

deviations

increase

with

increasing

CCRs

mm

km

f

m

a

x

f

-LRB-

-RRB-

f

m

a

x

f

av

g

-LRB-

-RRB-

km

f

av

g

f

ma

x

Np

Ng

N

p

Ng

N

p

kpv

N

g

k

g

v

kp

kg

v

v

v

N

p

q

i

T

N

g

i

i

i

Ng

k

p

k

g

Np

Ng

To

examine

the

effectiveness

of

parallelization

we

observed

the

execution

times

of

the

PGS

algorithm

using

different

number

of

PPEs

Asa

reference

we

also

ran

the

PGS

algorithm

using

PPE

on

the

Paragon

The

average

execution

times

and

speedups

are

shown

in

Figure

As

can

be

seen

from

the

speedup

plot

the

PGS

algorithm

demonstrated

a

slightly

less

than

linear

speedup

This

is

because

the

migration

of

best

chromosomes

contributed

considerable

communication

overhead

From

the

above

results

we

find

that

the

number

of

generations

used

critically

affects

the

performance

of

the

PGS

algorithm

In

view

of

this

we

ran

the

algorithm

with

larger

number

of

generations

to

see

how

far

it

can

approach

optimal

We

used

PPEs

on

the

Paragon

and

other

parameters

remained

the

same

The

results

are

shown

in

Figure

Note

that

the

results

for

the

smaller

number

of

generations

are

also

included

We

notice

that

when

the

number

of

generations

is

increased

to

the

PGS

algorithm

is

almost

optimal

Conclusions

We

have

presented

a

parallel

genetic

algorithm

called

the

PGS

algorithm

for

multiprocessor

DAG

scheduling

The

major

motivation

of

using

a

genetic

search

approach

is

that

the

recombinative

nature

of

a

genetic

algorithm

can

potentially

determine

an

optimal

scheduling

list

leading

to

an

optimal

schedule

The

PGS

algorithm

judiciously

combines

good

building-blocks

of

scheduling

lists

to

construct

better

lists

Parallelization

of

the

algorithm

is

based

on

a

novel

approach

in

that

the

parallel

processors

communicate

to

exchange

the

best

chromosomes

with

exponentially

decreasing

periods

Using

random

task

graphs

in

the

performance

evaluation

thePGS

algorithm

generates

optimal

solutions

for

a

major

portion

of

the

test

cases

The

PGS

algorithm

also

demonstrates

an

almost

linear

speedup

and

is

therefore

scalable

in

that

by

using

more

parallel

processors

the

algorithm

can

be

used

for

scheduling

large

task

graphs

References

-LSB-

-RSB-

I.

Ahmad

and

M.K.

Dhodhi

Multiprocessor

Scheduling

in

a

Genetic

Paradigm

Parallel

Computing

vol

no.

Mar.

pp.

-LSB-

-RSB-

E.G.

Coffman

Computer

and

Job-Shop

Scheduling

Theory

Wiley

New

York

-LSB-

-RSB-

M.R.

Garey

and

D.S.

Johnson

Computers

and

Intractability

A

Guide

to

the

Theory

of

NP-Completeness

-LSB-

-RSB-

D.E.

Goldberg

Genetic

Algorithms

in

Search

Optimization

and

Machine

Learning

Addison-Wesley

Mass.

-LSB-

-RSB-

E.S.H.

Hou

N.

Ansari

and

H.

Ren

A

Genetic

Algorithm

for

Multiprocessor

Scheduling

IEEE

Trans

Parallel

and

Distributed

Sys.

vol

no.

Feb.

pp.

-LSB-

-RSB-

Y.-K

Kwok

and

I.

Ahmad

Dynamic

Critical-Path

Scheduling

An

Effective

Technique

for

Allocating

Task

Graphs

onto

Multiprocessors

IEEE

Transactions

on

Parallel

and

Distributed

Systems

vol

no.

May

pp.

-LSB-

-RSB-

Y.-K

Kwok

I.

Ahmad

M.

Kafil

and

Imitaz

Ahmad

Parallel

Algorithms

for

Optimal

Scheduling

of

Arbitrary

Task

Graphs

to

Multiprocessors

submitted

for

publication

-LSB-

-RSB-

M.

Rebaudengo

and

M.

Sonza

Reorda

An

Experimental

Analysis

of

the

Effects

of

Migration

in

Parallel

Genetic

Algorithms

Proceedings

of

Euromicro

Workshop

on

Parallel

and

Distributed

Processing

pp.

-LSB-

-RSB-

G.C.

Sih

andE.A

Lee

A

Compile-Time

Scheduling

Heuristic

for

Interconnection-Constrained

Heterogeneous

Processor

Architectures

IEEE

Trans

on

Parallel

and

Distributed

Systems

vol

no.

Feb.

-LSB-

-RSB-

M.

Srinivas

and

L.M.

Patnaik

Adaptive

Probabilities

of

Crossover

and

Mutation

in

Genetic

Algorithms

IEEE

Trans

Sys.

Man

and

Cyb.

vol

no.

Apr.

pp.

-LSB-

-RSB-

Genetic

Algorithms

A

Survey

Computer

Jun.

pp.

-LSB-

-RSB-

R.

Tanese

Parallel

Genetic

Algorithm

for

a

Hypercube

Proc

Int?l

Conf

on

Genetic

Alg

pp.

-LSB-

-RSB-

L.

Wang

H.J.

Siegel

and

V.P.

Roychowdhury

A

GeneticAlgorithm-Based

Approach

for

Task

Matching

and

Scheduling

in

Heterogeneous

Computing

Environments

Proc

Heterogeneous

Computing

Workshop

pp.

-LSB-

-RSB-

T.

Yang

and

A.

Gerasoulis

DSC

Scheduling

Parallel

Tasks

on

an

Unbounded

Number

of

Processors

IEEE

Trans

Parallel

and

Dist

Sys.

vol

no.

Sep.

pp.

Graph

Size

Table

Results

of

the

PGS

algorithm

compared

against

optimal

solutions

-LRB-

deviations

-RRB-

for

the

random

task

graphs

with

three

CCRs

using

and

PPEs

on

the

Intel

Paragon

CCR

No

of

PPEs

No

of

Opt

Avg

Dev

PPEs

PPEs

PPEs

PPEs

Figure

-LRB-

a

-RRB-

The

average

running

times

of

the

PGS

algorithm

for

the

random

task

graphs

with

three

CCRs

using

PPE

on

the

Intel

Paragon

-LRB-

b

-RRB-

The

average

speedups

of

the

PGS

algorithm

for

and

PPEs

Graph

Size

4.124.644.865.025.325.796.036.346.897.127.637.82

Running

Times

-LRB-

secs

-RRB-

CCR

CCR

CCR

Figure

The

average

deviations

from

the

optimal

of

the

solutions

generated

by

the

PGS

algorithm

for

the

random

task

graphs

with

three

CCRs

using

PPEs

on

the

Intel

Paragon

O O O O O O O O O B I O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

genetic algorithms
multiprocessors
parallel algorithms
scheduling
task graph


Handling preferences in Constraint Logic Programming with Relational Optimization Fran?cois Fages1 ; 2 , Julian Fowler1 and Thierry Sola1 1 Thomson-CSF/LCR , 91404 Orsay Cedex , France . 2 LIENS CNRS , Ecole Normale Sup?erieure , 45 rue d'Ulm , 75005 Paris , France . Abstract . In many Constraint Logic Programming -LRB- CLP -RRB- applications one needs to express not only strict requirements but also preferences . Constraint hierarchies are one way of describing preferred criteria in the statement of a problem . In -LSB- 18 -RSB- CLP was extended to integrate constraint hierarchies resulting in Hierarchical Constraint Logic Programming -LRB- HCLP -RRB- . We propose an alternative approach for describing preferred criteria in CLP as a problem of relational optimization -LRB- RO -RRB- . In this approach the programmer defines a preference relation which indicates when a solution is better than another solution . We study several schemes based on pruning for optimizing an objective function , and we show how these schemes can be generalized to handle preference relations defined by CLP programs , while preserving a straightforward logical semantics . Further we show on some examples that the greater flexibility of the relational optimization scheme is not at the cost of efficiency . 1 Introduction Very often when we have a constraint satisfaction problem we are not simply interested in finding any solution , but we have a notion of best solutions to the problem . The difficulty of describing what constitutes the best solutions to a problem depends on the choice of preferred criteria . When we state a problem with constraints we are presented with the problem of how to state these preferences . If we do not indicate the preferences at all we are left with a large number of possible solutions which we must then sort to find the most interesting solutions . Alternatively if we insist that all the preferences we may have for a solution be satisfied then there may be no solution satisfying all our preferences . We see that it is important to use these preferences actively in such a way that all but the least important preferences are satisfied , this scenario is particularly true for decision support systems . One approach consists of specifying all intended constraints as either mandatory or as preferences , with an associated label indicating the strength of the preference , this creates a constraint hierarchy . In -LSB- 18 -RSB- Hierarchical Constraint Logic Programming -LRB- HCLP -RRB- was proposed as a general approach for integrating constraint hierarchies in CLP . The HCLP scheme gives rise to a family of languages each member parameterized both by the domain of constraints , as in the CLP scheme , and by the comparator of solutions . The comparator of solutions defines the solutions to a constraint hierarchy . We propose a different approach to integrating preferences in CLP based on relational optimization . In this approach the programmer defines a preference relation which indicates when a solution is better than another solution . We study several schemes based on pruning for optimizing an objective function , and we show how these schemes can be generalized to handle preference relations defined by CLP programs , while preserving a straightforward logical semantics . Further we show on some examples that the greater flexibility of the relational optimization scheme is not at the cost of efficiency . We have used the current implementation to resolve a real-life preference problem consisting of allocating bands of frequencies from a radio spectre to a set of networks -LSB- 7 -RSB- . In this problem , preferences between solutions depend on several conflictual criteria . In the rest of the paper we review the basic ideas of constraint hierarchies before presenting HCLP languages . We then present relational optimization . We compare the advantages and disadvantages of the two schemes before evaluating the performances of the relational optimization approach . 2 HCLP approach HCLP languages were presented in -LSB- 1 -RSB- -LSB- 17 -RSB- -LSB- 18 -RSB- as an approach to express preferences in CLP -LSB- 8 -RSB- . These languages integrate constraint hierarchies and logic programming . 2.1 Constraint Hierarchies A labelled constraint is a constraint c labelled with a strength s and is written c@s . The strengths range from to n where n is the number of non-required levels . Level corresponds to the required constraints and the other levels to non-required constraints . The higher the level the weaker the constraint is . A constraint hierarchy is a multiset of labelled constraints . Given a constraint hierarchy H , H0 denotes the required constraints in H with their labels removed . The sets H1 ; H2 ; : : : are defined in the same way for levels 1 ; 2 ; : : : respectively . A valuation , ? , for a constraint hierarchy , H , is a mapping of the free variables of the hierarchy to values in the domains of the variables that satisfies all the required constraints , and is noted H ? . Different valuations are compared using a comparator to find those valuations which relax only the least important constraints . A comparator , > , is a relation between valuations of a constraint hierarchy . A solution to a constraint hierarchy is a valuation such that there does not exist a valuation better than it . ? is a solution to a constraint hierarchy H iff :9 oe Hoe > H ? There are many choices for a comparator . It must , however , be a relation that is transitive , anti-reflexive and respects the hierarchy . A comparator is said to respect the hierarchy if when there exists a valuation that satisfies all the constraints upto a level k , then any solution must satisfy all the constraints upto level k . In -LSB- 1 -RSB- comparators are divided into two classes : local and global . Comparators are defined by the choice of an error function , e , for a constraint and in the case of global comparators an error function , g , for the combined errors of the constraints . The error function for a constraint , c , under a substitution ? is a function which returns a non-negative number indicating how nearly the substitution satisfies the constraint . If the substitution satisfies the constraint the function always returns zero . The function g combines the errors of all the constraints at a given level . locally-better -LRB- ? ; oe ; H -RRB- ? 9k > such that 8i ffl 1 ; : : : ; k ? 1 8p ffl Hi e -LRB- p ? -RRB- = e -LRB- poe -RRB- ^ 9q ffl Hk e -LRB- q ? -RRB- < e -LRB- qoe -RRB- ^ 8r ffl Hk e -LRB- r ? -RRB- < = e -LRB- roe -RRB- globally-better -LRB- ? ; oe ; H ; g -RRB- ? 9k > such that 8i ffl 1 ; : : : ; k ? 1 g -LRB- ? ; Hi -RRB- = g -LRB- oe ; Hi -RRB- ^ g -LRB- ? ; Hk -RRB- < g -LRB- oe ; Hk -RRB- We illustrate the \ unsatisfied count better '' comparator -LRB- > ucb -RRB- , which is a global comparator . For this comparator e is defined as e -LRB- c ? -RRB- = iff c ? holds and e -LRB- c ? -RRB- = 1 otherwise , and the combining function is g -LRB- ? ; Hi -RRB- = P cfflHi e -LRB- c ? -RRB- . 2.2 HCLP In HCLP , programs are just like CLP programs where constraints have an additional strength annotation -LRB- no annotation means required constraint -RRB- . In CLP a CSLD derivation returns a set of constraints , in the case of HCLP this set is a constraint hierarchy H. For example the program below builds two constraint hierarchies : fX = 1 , X > 3 @ 1g and fX = 5 , X > 3 @ 1g . p -LRB- X -RRB- : - X > 3 @ 1 , q -LRB- X -RRB- . q -LRB- 1 -RRB- . q -LRB- 5 -RRB- . So the solutions to p -LRB- X -RRB- are X = 1 and X = 5 , and these solutions are not comparable , because the theory presented in -LSB- 1 -RSB- and summarized above does not make comparisons between solutions from different constraint hierarchies . We would like , however , to obtain as an answer only the second , because it satisfies more constraints in its respective hierarchy than the first answer . These sort of problems have led to an extension of the notion of comparators to allow comparisons for solutions arising from different constraint hierarchies . These extended comparators were first presented in -LSB- 17 -RSB- , and are called inter-hierarchy comparators . 2.3 Inter-hierarchy comparators In this extended model we consider not just one but several hierarchies , and the definitions are simply extended to cover this more general case . The tree of CSLD derivations associated for a given goal returns the set of constraint hierarchies ? . A valuation to a set of constraint hierarchies ? is a mapping of the free variables to values in the domains of the variables that satisfies all the required constraints of at least one constraint hierarchy . A valuation ? for a constraint hierarchy H written ? H , is globally-better than a valuation oeJ is defined below , where H ; Jffl ? globally-better -LRB- ? H ; oeJ ; ? ; g -RRB- ? 9k > such that 8i ffl 1 ; : : : ; k ? 1 g -LRB- ? ; Hi -RRB- = g -LRB- oe ; Ji -RRB- ^ g -LRB- ? ; Hk -RRB- < g -LRB- oe ; Jk -RRB- We remark that local comparators have not been extended to this framework , because these comparators consider each constraint in the hierarchy individually . 2.4 Nonprimitive constraints As stated in -LSB- 17 -RSB- conjunction and disjunction of constraints in HCLP , as opposed to CLP , can not be accomplished without explicitly using disjunction and conjunction connectives . -LSB- 17 -RSB- introduces nonprimitive constraints that allow conjunction and disjunction of constraints by the explicit use of connectives . A nonprimitive constraint is a labelled constraint built from primitive constraints and logical connectives . So the previous example may be rewritten using a nonprimitive constraint as shown below : p -LRB- X -RRB- : - X > 3 @ 1 , -LRB- X = 1 \ / X = 5 -RRB- . -RCB- This creates one constraint hierarchy fX = 1_X = 5 , X > 3 @ 1g which has solution X = 5 . This allows us to achieve the effect of inter-hierarchy comparison by allowing the disjunction of primitive constraints as illustrated in the previous example . As indicated in -LSB- 17 -RSB- , it is not always possible to avoid inter-hierarchy comparison in this way . Consider the following example . p -LRB- X -RRB- : - X = 1 , X = < 0 @ 1 . p -LRB- X -RRB- : - X = 2 . For this example , two constraint hierarchies are created : fX = 1 , X = < 0 @ 1g and fX = 2g . A locally-predicate-better comparator will return X = 1 and X = 2 as solutions . A global comparator will return only X = 2 . If we try to apply a disjunction as in a previous example , the only possibility is the following program : p -LRB- X -RRB- : - -LRB- X = 1 \ / X = 2 -RRB- , X = < 0 @ 1 . -RCB- This creates a constraint hierarchy f -LRB- X = 1_X = 2 -RRB- , X = < 0 @ 1g . Unfortunately , we obtain the same solutions X = 1 and X = 2 for a locally-predicate-better comparator . Worse still , certain global comparators -LRB- for example , weighted-sumbetter , see -LSB- 17 -RSB- for more details -RRB- will only return X = 1 , as a solution . 3 Optimization approach We have seen how preferences are handled in HCLP . We now present the approach that we use for handling preferences as a CLP optimization problem . This section relies on the branch and bound like procedures presented in -LSB- 16 -RSB- and -LSB- 12 -RSB- for the optimization of an objective function in CLP , and generalized in -LSB- 5 -RSB- in accordance with a logical semantics based on negation . We review these results in the context of preference constraints , and extend them for the handling of program-defined preference relations . 3.1 Syntax The idea is to express the preference relation among solutions inside the language , that is by a CLP program . For this we introduce an optimization higherorder predicate , rel opt , whose first argument is a goal and whose second argument is a preference relation . Intuitively a higher-order atom of the form rel_opt -LRB- goal -LRB- X -RRB- , better -RRB- is true if X is an optimal solution to goal -LRB- X -RRB- , that is goal -LRB- X -RRB- is true and there does not exist a Y such that goal -LRB- Y -RRB- and better -LRB- Y ; X -RRB- are true : rel opt -LRB- goal -LRB- X -RRB- ; better -RRB- , goal -LRB- X -RRB- ^ :9 Y -LRB- goal -LRB- Y -RRB- ^ better -LRB- Y ; X -RRB- -RRB- An OCLP program is a CLP program that may contain occurrences of the optimization predicate in rule bodies . The preference predicate better is supposed to be defined in the CLP program by a set of rules which state when a solution X to goal -LRB- X -RRB- must be preferred to a solution Y . It is in the better rules that all preference criteria are described . Clearly the relation better should be anti-reflexive for the rel opt goals be satisfiable . We shall assume also transitivity although this is not always necessary in our framework . Note that in -LSB- 2 -RSB- the same question is discussed in the framework of preference logic . Going back to the example of the previous section : p -LRB- X -RRB- : - X > 3 @ 1 , q -LRB- X -RRB- . q -LRB- 1 -RRB- . q -LRB- 5 -RRB- . The meaning of that HCLP program under the extended model with interhierarchy comparisons is given by the set of derivations to the goal p -LRB- X -RRB- where the derivations which satisfy X > 3 subsume the others . This example can be expressed declaratively with an OCLP program : better -LRB- X , Y -RRB- : - X > 3 , Y = < 3 . p -LRB- X -RRB- : - rel_opt -LRB- q -LRB- X -RRB- , better -RRB- . q -LRB- 1 -RRB- . q -LRB- 5 -RRB- . An important particular case is when it is defined by a primitive constraint on a measure of satisfiability of preference constraints . In that case a preference relation expresses an objective function . The underlying algebra is a strict total order -LRB- A ; < -RRB- and the definition of the preference relation is of the form better -LRB- Y , X -RRB- : - f -LRB- Y -RRB- < f -LRB- X -RRB- . for some objective function f that acts as a measure of satisfiability of the preference constraints . The total order < can be the lexicographic or any extension of total orders on preference criteria . In general the predicate better need not be deterministic , it may be recursive . Note also that relational optimization metapredicates allow to express preferences not only at top level but also inside a program . This is crucial for the handling of composite systems with preference constraints defined locally for some components of the system . Recursion through relational optimization predicates is also supported by the syntax and the semantics presented here , but we shall not investigate that case any further in this paper . 3.2 Declarative semantics The simplest and most general way to provide a declarative semantics to CLP programs with relational optimization is to read an atom rel_opt -LRB- goal -LRB- X -RRB- , better -RRB- as an abbreviation for the formula goal -LRB- X -RRB- ^ : -LRB- 9Y goal -LRB- Y -RRB- ^ better -LRB- Y ; X -RRB- -RRB- and then take a suitable semantics for CLP programs with negation as the semantics of the original program with preference constraints . The natural semantics to employ in this context is the semantics of Kunen -LSB- 9 -RSB- for normal logic programs , based on Fitting operator and generalized by Stuckey -LSB- 15 -RSB- to CLP programs . That semantics is defined as the set of three-valued logical consequences -LRB- denoted by j = 3 -RRB- of the Clark 's completion of the program . The usual strong 3-valued interpretations of the connectives and quantifiers are assumed , except for the connective a $ b which is two-valued : t if a and b have the same truth value -LRB- ff ; t ; ug -RRB- , and f otherwise . The Clark 's completion , comp -LRB- P ; A -RRB- , of a CLP program P over a structure A supposed to be presented by a theory th -LRB- A -RRB- , is defined as the conjunction of th -LRB- A -RRB- together with the formulae of the form 8x1 ; : : : ; xn p -LRB- x1 ; : : : ; xn -RRB- $ _ i 9Y i -LRB- x1 = ti1 ^ : : : ^ xn = tin ^ Bi -RRB- obtained for each predicate symbol p -LRB- of arity n -RRB- by collecting the clauses headed by p in P , fp -LRB- ti1 ; : : : ; tin -RRB- Big where the set of local variables is denoted by Y i , or of the form 8x1 ; : : : ; xn :p -LRB- x1 ; : : : ; xn -RRB- if p does not appear in any head in P . Now a constraint c is a correct answer to a goal G if comp -LRB- P ; A -RRB- j = 3 8 -LRB- c ! G -RRB- ^ 9c The answer no is correct if comp -LRB- P ; A -RRB- j = 3 :9 -LRB- G -RRB- : Constructive negation , as introduced by Chan for logic programs , and generalized by Stuckey to CLP programs , provides a correct and complete operational semantics w.r.t. the declarative semantics -LSB- 15 -RSB- . In the following subsections we examine simpler practical operational semantics by distinguishing the different cases where preferences are expressed either by an objective function or a program defined predicate , and where preferences are handled either on the top level goal only , or recursively in the subgoals of the CLP program . 3.3 Operational semantics for the optimization of an objective function Optimization of the top level goal In this section we examine the case studied in -LSB- 12 -RSB- where preferences on the solutions of the top level goal are encoded by the minimization of an objective function . The underlying structure is a strict total order -LRB- A ; < -RRB- and the predicate better -LRB- X , Y -RRB- is a constraint of the form f -LRB- Y -RRB- < f -LRB- X -RRB- for some objective function f . We assume that the language of constraints is closed by minimization of the objective function , that is we can decide whether minc -LRB- X -RRB- f -LRB- X -RRB- has a solution or not for any constraint c of the language -LRB- or at least for those constraints returned by the successful derivations of the top level goal to optimize -RRB- . In this framework , preferences can be used actively to reduce the search space by a simple pruning mechanism . Procedure 1 The computation of the answers to the goal minimize -LRB- G -LRB- X -RRB- ; f -LRB- X -RRB- -RRB- proceeds as follows : 1 . a CSLD derivation tree for G -LRB- X -RRB- is developed , 2 . once a successful derivation is found , say with answer constraint c -LRB- X -RRB- , then the optimal cost v = minc -LRB- X -RRB- f -LRB- X -RRB- is computed . If v does n't exist then return the answer no , otherwise the derivation tree is pruned by adding the constraint f -LRB- X -RRB- < = v to the nodes , the pruned tree is further developed by iterating step 2 , 3 . once the derivation tree gets finite , the constraints on the successful derivations after pruning , if any , represent the optimal solutions to the goal , otherwise the computed answer is no . Proposition1 . -LRB- Correctness and completeness -RRB- The answers computed by procedure 1 are correct . Furthermore , if c -LRB- X -RRB- is a correct answer to the goal G -LRB- X -RRB- ^ :9 Y -LRB- f -LRB- Y -RRB- < f -LRB- X -RRB- ^ G -LRB- Y -RRB- -RRB- then there exist computed answers c1 ; : : : ; cn such that A j = c ! 9Y1c1 _ : : : _ 9Yncn where the Yi 's are the variables in ci not in c. OCLP programs with objective functions When general OCLP programs and goals are considered , preferences need be handled not only at top level but also in recursive subgoals . Procedure 1 can be generalized to this purpose by adding to the standard CSLD resolution rule a special rule for optimization predicates based on pruning -LSB- 5 -RSB- : Procedure 2 The computed answers to a goal G and an OCLP program P are those defined by a CSLD derivation tree for G in which the successors of a node labeled by a goal of the form cjminimize -LRB- G -LRB- X -RRB- ; f -LRB- X -RRB- -RRB- ; A1 ; : : : ; An where the optimization atom is the selected atom are formed by : 1 . developing a CSLD derivation tree for minimize -LRB- cjG -LRB- X -RRB- ; f -LRB- X -RRB- -RRB- with procedure 1 , return no successor in case of failure , otherwise let v be the optimal cost found on a successful derivation , 2 . check that the goal f -LRB- Y -RRB- < vjG -LRB- Y -RRB- finitely fails , otherwise return no successor , 3 . return the successor goals c ^ cijA1 ; : : : ; An for each successful derivation with answer constraint ci obtained in step 1 . The rationale of procedure 2 is that a solution to a constraint c and an atom minimize -LRB- G -LRB- X -RRB- ; f -LRB- X -RRB- -RRB- is a solution to minimize -LRB- cjG -LRB- X -RRB- ; f -LRB- X -RRB- -RRB- such that :9 Y -LRB- f -LRB- Y -RRB- < f -LRB- X -RRB- ^ G -LRB- Y -RRB- -RRB- . Note however that procedure 2 may loop forever in step 1 trying to solve min -LRB- c | G -LRB- X -RRB- , f -LRB- X -RRB- -RRB- , whilst the optimiality condition for the goal c | min -LRB- G -LRB- X -RRB- , f -LRB- X -RRB- -RRB- is unsatisfiable . This prevents a completeness result for no answers . For instance with the program p -LRB- 0 -RRB- . p -LRB- X -RRB- : - X > 1 , p -LRB- X -RRB- . and the goal X > 1 | minimize -LRB- p -LRB- X -RRB- , X -RRB- the sequential pruning procedure loops forever on the goal minimize -LRB- X > 1 | p -LRB- X -RRB- , X -RRB- , whilst comp -LRB- P ; A -RRB- j = 3 :9 X -LRB- X > 1 ^ p -LRB- X -RRB- ^ :9 Y -LRB- Y < X ^ p -LRB- Y -RRB- -RRB- : Completeness on success holds however for 2-level OCLP programs , i.e. for programs such that there is no dependency between atoms through more than one minimization predicate . Completeness holds also under finite evaluation assumptions w.r.t. the goal passed to optimization predicates . This is the case for instance when these goals are defined by hierarchical programs . Proposition2 . The answers computed by procedure 2 are correct . Procedure 2 is complete on success for 2-level programs , and complete both on success and failure for hierarchical programs . Note that a concurrent pruning procedure complete both on success and failures can be derived for OCLP programs from the scheme for constructive negation based on pruning described in -LSB- 6 -RSB- . 3.4 Operational semantics for relational optimization The main difficulty with the previous scheme for handling preference constraints is that all preferences need to be explicitly encoded by an objective function . We show here how this difficulty can be overcomed by expressing the preference among solutions with a CLP program and by generalizing the previous pruning procedures to handle program-defined preference relations . Ground answers In this subsection we assume that the goals passed as arguments of optimization predicates return always ground answers . This is typically the case in CLP -LRB- FD -RRB- applications where the solutions to a combinatorial problem are naturally a valuation of the unknowns , and where enumeration is mixed with constraint propagation in order to palliate the incompleteness of the constraint solvers . However to be efficient the optimization of the preference relation must be performed by a pruning mechanism that cut the branches of the derivation tree before the variables get instanciated . This behavior can be achieved by a simple generalization of the previous procedures . We assume that the program-defined preference relation better -LRB- X , Y -RRB- is anti-reflexive and transitive , and that the complement relation notbetter -LRB- X , Y -RRB- is also defined in the program . If the preference relation is total , notbetter -LRB- X , Y -RRB- is simply the relation Y better or equal to X. First procedure 1 is generalized by replacing the pruning based on cost constraints , by a pruning mechanism based on a better goal : Procedure 3 The answers to the goal rel opt -LRB- G -LRB- X -RRB- ; better -RRB- are computed by : 1 . developing a CSLD derivation tree for G -LRB- X -RRB- , 2 . once a successful derivation is found , say with -LRB- ground -RRB- answer substitution Xi , then the derivation tree is transformed by adding the goal notbetter -LRB- Xi ; X -RRB- to the nodes , the tree is further developed by iterating step 2 , 3 . once the derivation tree gets finite , the constraints on the successful derivations after pruning , if any , represent the optimal solutions to the goal , otherwise the computed answer is no . Proposition3 . Procedure 3 is correct and complete . Procedure 2 can be generalized in the same way for solving recursively a goal of the form cjrel opt -LRB- G -LRB- X -RRB- ; better -RRB- ; A1 ; : : : ; An by checking in step 2 for each successful answer Xi to rel opt -LRB- cjG -LRB- X -RRB- ; better -RRB- , that the goal better -LRB- Y , Xi -RRB- , G -LRB- Y -RRB- finitely fails . The correctness and completeness results generalize in a straightforward way to this scheme . Procedure 3 is the procedure we use in the examples reported in the section on performance evaluation . General case The general case of relational optimization leads to the general problem of constructive negation in CLP languages . The original scheme of -LSB- 15 -RSB- for constructive negation is not practical as it necessitates taking the disjunctive normal form of an entire frontier in the derivation tree of a negated subgoal , at each resolution step with a negative subgoal . In -LSB- 3 -RSB- a new scheme called intensional negation is proposed as a compiled version of constructive negation . In that scheme the normalization process is done once and for all at compile time . The idea is to derive from the definition of a predicate p in comp -LRB- P ; A -RRB- a positive program for :p that contains complex subgoals formed with universally quantified disjunctions . For instance the resulting program on the previous example is : better : -LRB- X , Y -RRB- : - X = < 3 . better : -LRB- X , Y -RRB- : - Y > 3 . q : -LRB- X -RRB- : - X < > 1 , X < > 5 . p -LRB- X -RRB- : - q -LRB- X -RRB- , 8Y -LRB- q : -LRB- Y -RRB- _ better : -LRB- Y , X -RRB- -RRB- . q -LRB- 1 -RRB- . q -LRB- 5 -RRB- . Complex subgoals involve universally quantified disjunctions . The derivation rule for complex subgoals is defined in a way similar to constructive negation and requires generally to compute entire frontiers in a CSLD derivation trees . In the previous example the absence of recursion makes it possible to perform these resolution steps at compile time -LRB- by unfolding -RRB- . The result for f is the clause p -LRB- X -RRB- : - q -LRB- X -RRB- , 8Y -LRB- -LRB- Y < > 1 , Y < > 5 -RRB- _ Y = < 3 _ X > 3 -RRB- . which simplifies to a simple form p -LRB- X -RRB- : - q -LRB- X -RRB- , X > 3 . In general however the process of collecting a complete frontier in the derivation tree of the selected subgoal must be performed at each resolution step with a complex subgoal . Finally note that the scheme for constructive negation based on pruning described in -LSB- 6 -RSB- , eliminates the need to consider complex subgoals with explicit quantifiers , and should be of practical value for handling program defined preferences in a very general setting . 4 Comparison We have presented two different approaches for integrating preferences inside the CLP framework . We now discuss and contrast the interesting aspects and applications of the two approaches . There is a fundamental difference between HCLP and relational optimization . Relational optimization -LRB- RO -RRB- describes preferences on solutions to a goal regardless of the derivations taken to find these solutions . HCLP attaches preference constraints to rules , so the criteria of preference among solutions may be different from one derivation to another . We argue that RO reflects the intended semantics of obtaining the best solutions to a problem independently of the method used to calculate them . This is reflected by the straightforward declarative semantics of the relational optimization schemes . One major inconvenience of previous optimization schemes with objective functions is that in general there is no natural choice for such a function . We have seen that RO allows the expression of the preference relation among solutions by a CLP program providing a greater flexibility . In the next section this is illustrated on a multicriteria frequency allocation problem . Furthermore the ability to put the RO predicate inside rule bodies , allows the handling of different preference subproblems locally in the program . On the other hand HCLP provides a way to express preferences locally inside rules without stating a global preference on solutions when this is still too difficult and unweildy to express easily . For a given hierarchy of constraints there is an encoding of HC in RO and vice versa . For instance the set of solutions to a constraint hierarchy H , defined 1 by : S = f?j ? 2 S0 ^ 8oe 2 S0 : -LRB- G -LRB- -LSB- E -LRB- H1 -LRB- oe -RRB- -RRB- ; : : : ; E -LRB- Hn -LRB- oe -RRB- -RRB- -RSB- -RRB- < g G -LRB- -LSB- E -LRB- H1 -LRB- ? -RRB- -RRB- ; : : : ; E -LRB- Hn -LRB- ? -RRB- -RRB- -RSB- -RRB- -RRB- g where S0 = f?j8c 2 H0 e -LRB- c ? -RRB- = g , is the set of solutions to the required constraints of H , can be defined as well as the set of X satisfying s0 -LRB- X -RRB- ^ 8Y s0 -LRB- Y -RRB- ! : -LRB- G -LRB- -LSB- E -LRB- H1 -LRB- Y -RRB- -RRB- ; : : : ; E -LRB- Hn -LRB- Y -RRB- -RRB- -RSB- -RRB- < g G -LRB- -LSB- E -LRB- H1 -LRB- X -RRB- -RRB- ; : : : ; E -LRB- Hn -LRB- X -RRB- -RRB- -RSB- -RRB- -RRB- 1 In this more general definition from -LSB- 18 -RSB- , E applies e to every element in a set of constraints and G is a generalization of g that is applied to error sequences . where s0 denotes the membership predicate in S0 . So S can be defined by the relational optimization goal rel opt -LRB- s0 -LRB- X -RRB- , better -RRB- with the program better -LRB- X , Y -RRB- : - G -LRB- -LSB- E -LRB- H1 -LRB- X -RRB- -RRB- , ... , E -LRB- Hn -LRB- X -RRB- -RRB- < g G -LRB- -LSB- E -LRB- H1 -LRB- Y -RRB- -RRB- , ... , E -LRB- Hn -LRB- Y -RRB- -RRB- s0 -LRB- X -RRB- : - C -LRB- X -RRB- where C -LRB- X -RRB- is the set of required constraints in H. Implementing the relational optimization schemes can be efficiently done by writing a meta-interpreter on top of of CLP system . RO inherits on one hand from the objective function schemes based on pruning , and on the other hand from the work on negation in logic programming for which increasingly powerful inference rules have been given . This should be contrasted with the ad hoc implementation of the HCLP scheme . We have implemented the RO scheme on top of the CLP system Meta -LRB- F -RRB- -LSB- 10 , 4 -RSB- . In the following section we evaluate the performance of relational optimization to resolve preference problems . 5 Performance evaluation This section is intended to show some performances of the the relational optimization approach . More particularly , we have evaluated the relational optimization on a time tabling problem and on an industrial frequency allocation problem which has multiple preference criteria . The time tabling problem is taken from -LSB- 13 -RSB- . 5.1 A Time-tabling Problem This problem is a typical resource allocation problem . There are the typical required constraints , and there are four hierarchic levels of prefered criteria . The most important prefered criterion -LRB- level 1 -RRB- is that lessons of the same subject should not be on consecutive days . The level 2 prefered criterion is that lessons of the same subject should not be more than two days apart . The level 3 criterion is that any subject with less than two lessons per week should not have any of its lessons on a Monday . The final and weakest preference is that lessons of the same subject should take place at the same hour in the week . We have used the relational optimization scheme to state the same preferences among solutions as those described by the HCLP program presented in -LSB- 14 -RSB- using the > ucb comparator which is defined earlier . The first table presents a loose timetable problem and the second a compact problem , which is more difficult than the first because the number of hours available per day is reduced by one hour . The first column of the tables indicates the level of the preference that we try to satisfy , thus max level three means that we try to maximize the number of preferences respected of level one , two and three , but not four . The cpu time in seconds required for the specific implementation of HCLP -LRB- > ucb , FD -RRB- which has been developed on the Incremental Hierarchical Constraint Solver -LRB- IHCS -RRB- -LSB- 14 -RSB- . These times are given for the prototype implementation written in C using a YAP prolog software platform running on a NeXT Station 68040 . We present the cpu time given in seconds using our current relational optimization implementation on a Sun Sparc Station IPX -LRB- an IPX can be considered 30 % faster than the NeXT for a standard integer performance test -LRB- MIPS -RRB- -RRB- . We also report the number of preferred constraints not respected by the solutions found , indicates that the preference constraints of this level are not being used . Max . Number of IHCS RO Not Respected level constraints Time Time @ 1 @ 2 @ 3 @ 4 356 1.80 s 0.78 s 1 +21 = 377 1.86 s 1.23 s 2 2 +21 = 398 1.98 s 1.38 s 2 1 3 +11 = 409 1.98 s 1.61 s 2 1 1 4 +21 = 430 2.38 s 2.12 s 2 1 1 Table 1 . results for loose time-tables Max . Number of IHCS RO Not Respected level constraints Time Time @ 1 @ 2 @ 3 @ 4 356 1.80 s 0.75 s 1 +21 = 377 1.86 s 1.28 s 2 2 +21 = 398 2.28 s 1.51 s 2 2 3 +11 = 409 4.63 s 1.63 s 2 2 2 4 +21 = 430 2m43 .53 s 2.05 s 2 2 2 Table 2 . results for compact time-tables For both tables and both solvers we see that , as is expected , there is a deterioration in performance with the introduction of supplementary levels of preferred constraints . The deterioration in computation time for the relational optimization approach is less sensitive to the number of levels of preferred constraints to be treated and the number of constraints relaxed than the IHCS solver . These timings show that our current RO implementation competes well with the HCLP implementation of -LSB- 14 -RSB- . 5.2 An application to multiple criteria preference problems The comparative approach introduced by the use of rules to define the relationships between solutions -LRB- better -RRB- , greatly enlarges the techniques that we may use for multiple criteria optimization -LSB- 7 -RSB- . Sequential elimination methods -LSB- 11 -RSB- may be used in this framework . Sequential elimination methods are based on comparing solutions on the basis of the values of their attributes and eliminating inferior solutions . The comparative nature of these methods makes it easier to represent expert knowledge and give a process account of expert reasoning . We have applied these principles to the allocation of frequency bands from a radio spectre to a group of networks . The radio spectre has two to three thousand distinct frequencies . The system allocates frequency bands for several hundred networks , by partitioning them into subsets containing about twenty networks , and allocating frequencies to these subsets . The allocation of frequencies to networks is constrained to respect forbidden frequency constraints , network frequency constraints , and interference constraints . In a typical problem for the current system about a thousand constraints are required to state all the properties an allocation must respect . -LCB- Some of the frequencies of the radio spectre are forbidden to all networks , in general this represents around thirty percent of the spectre . -LCB- The network frequency constraints limit the number of frequencies available per network and their possible distributions . A network is constrained to have between thirty and two hundred and fifty frequencies , which may be split into at most two separate bands of frequencies . -LCB- The interference constraints guarantee that when two networks are close the bands of frequencies that they are allocated will be sufficiently distant to avoid interference . The separation of bands of frequencies for two networks is a function of the degree of proximity and the frequencies allocated . Three degrees of proximity are identified : no interference , low interference and high interference . The higher the frequency allocated the greater the distance that must be respected to avoid interference . The difficulty of the problem lies in the definition of what constitutes a good placement for the bands of frequencies . Here several criteria were exposed as important attributes of a possible frequency allocation : -LCB- the number of frequencies per network should be maximized -LRB- C1 -RRB- ; -LCB- the number of networks with two frequency bands should be maximized -LRB- C2 -RRB- ; -LCB- the separation between frequency bands on the same network should be maximized -LRB- C3 -RRB- ; -LCB- the distribution of frequencies among networks should be equitable -LRB- C4 -RRB- . A good allocation would have all networks with two well separated bands , containing a large number of frequencies , and with all networks having a similar number of frequencies . A first approximation for multi-criteria optimization was to try a strict lexicographic order -LRB- C1 , C2 , C3 , C4 -RRB- among criteria . This was not satisfactory , according to the experts , so we introduced thresholds , to modify the underlying lexicographic order . Furhter we combined the criteria C1 and C4 to form a new criterion C5 and similarly C2 and C3 to form C6 . The optimization relation we retained for the frequency allocation problem is the following : -LCB- -LRB- C6 , C5 -RRB- is the lexicographic order until the two band threshold has been reached for C6 ; -LCB- after the two band threshold has been reached the lexicographic order is -LRB- C5 , C6 -RRB- . The rules we used to implement the allocation preferences in the frequency allocation system are given below . The predicate solution_criteria measures the value of a solution on each of the four criteria defined above , and lexicographic is a strict lexicographic order . better -LRB- Sol1 , Sol2 -RRB- : - solution_info -LRB- Sol1 , Sol2 , C51 , C61 , C52 , C62 , TBT -RRB- , TBT > C62 , lexicographic -LRB- -LSB- C61 , C51 -RSB- , -LSB- C62 , C52 -RSB- -RRB- . better -LRB- Sol1 , Sol2 -RRB- : - solution_info -LRB- Sol1 , Sol2 , C51 , C61 , C52 , C62 , TBT -RRB- , C62 > = TBT , C61 > = TBT , lexicographic -LRB- -LSB- C51 , C61 -RSB- , -LSB- C52 , C62 -RSB- -RRB- . solution_info -LRB- Sol1 , Sol2 , C51 , C61 , C52 , C62 , TBT -RRB- : - two_band_threshold -LRB- TBT -RRB- , solution_criteria -LRB- Sol1 , C11 , C21 , C31 , C41 -RRB- , solution_criteria -LRB- Sol2 , C12 , C22 , C32 , C42 -RRB- , combine12 -LRB- C11 , C21 , C51 -RRB- , combine34 -LRB- C31 , C41 , C61 -RRB- , combine12 -LRB- C11 , C21 , C51 -RRB- , combine34 -LRB- C31 , C41 , C61 -RRB- . lexicographic -LRB- -LSB- H0 | _ -RSB- , -LSB- H1 | _ -RSB- -RRB- : - H0 > H1 , ! . lexicographic -LRB- -LSB- H0 | T0 -RSB- , -LSB- H1 | T1 -RSB- -RRB- : - H0 = H1 , lexicographic -LRB- T0 , T1 -RRB- . In the current system the optimization process does not finish but is stopped when satisfactory solutions have been found . In fact good solutions , already better than those found by experts , are found after one to two minutes . 6 Conclusion Hierarchical constraints and relational optimization are two ways for stating preferences inside a CLP framework . The relational optimization scheme is founded on the semantics of negation in CLP languages , and provides a uniform treatment of preference constraints and multi-criteria optimization . Our first experiments have shown that this greater generality was not at the cost of efficiency and that real-life applications could be tackled with this approach . We are currently exploring the integration of the scheme for constructive negation by pruning of -LSB- 6 -RSB- in our implementation . References 1 . Alan Borning , Michael J. Maher , Amy Martindale , and Molly Wilson . Constraint hierarchies and logic programming . In G. Levi and M. Martelli , editors , Logic Programming : Proceedings of the 6th International Conference -LRB- Lisbon -RRB- , pages 149 -LCB- 164 . MIT Press , June 1989 . 2 . A. Brown Jr et al. . Constraint optimization using preference logics : A new role for modal logic . In PPCP 93 First Workshop on Priniciples and Practice of Constraint Programming , Newport , USA , April 1993 . 3 . P. Bruscoli , F. Levi , G. Levi , and M.C. Meo . Intensional negation in clp . In GULP 93 , Italy , 1993 . 4 . P. Codognet , F. Fages , and T. Sola . A metalevel compiler of clp -LRB- fd -RRB- and its combination with intelligent backtracking . In A. Colmerauer , editor , Constraints logic programming : collected papers . MIT Press , 1993 . 5 . F Fages . On the semantics of optimization predicates in clp languages . In FSTTCS Foundations of software technology and theoretical computer science , Bombay , India , December 1993 . Springer-Verlag . 6 . F Fages . Constructive negation by pruning . In Ecole de Printemps d'Informatique Th?eorique , Chatillon sur Seine , France , May 1994 . Working paper . 7 . Julian Fowler , Henri Dieudonn?e , and Jean Jourdan . How to handle multiple criteria optimization in constraint logic programming . Technical report , Thomson CSF/LCR , November 1993 . 93-3 . 8 . Joxan Jaffar and Jean-Louis Lassez . Constraint logic programming . In Proceedings of the 14th ACM Symposium on Principles of Programming Languages , Munich , Germany , pages 111 -LCB- 119 . ACM , January 1987 . 9 . K. Kunen . Negation in logic programming . Journal of Logic Programming , 4 -LRB- 3 -RRB- :289 -LCB- 308 , 1987 . 10 . R. Lissajoux . Meta -LRB- f -RRB- 3.40 users ' manual . Technical Report LACS 93-2 , ThomsonCSF , June 1993 . 11 . Kenneth R. MacCrimmon . An overview of multiple objective decision making . 12 . M.J. Maher and P.J. Stuckey . Expanding query power in constraint logic programming languages . In E. Lusk and R. Overbeek , editors , NACLP89 , pages 20 -LCB- 36 . MITP , oct 1989 . 13 . F Menezes et al. . An incremental hierachical constraint solver . In PPCP 93 First Workshop on Priniciples and Practice of Constraint Programming , Newport , USA , April 1993 . 14 . F Menezes et al. . An incremental hierachical constraint solver applied to a timetabling problem . In Proceedings of Avignon 93 , May 1993 . 15 . P. Stuckey . Constructive negation for constraint logic programming . In LICS ' 91 , 1991 . 16 . P. Van Hentenryck . Constraint Satisfaction in Logic Programming . Logic Programming Series . MIT Press , Cambridge , MA , 1989 . 17 . M. Wilson and A. Borning . Extending hierarchical constraint logic programming : Nonmonotonicity and inter-hierarchy comparison . In E. Lusk and R. Overbeek , editors , NACLP89 , pages 3 -LCB- 19 . MITP , oct 1989 . 18 . Molly Wilson and Alan Borning . Hierarchical constraint logic programming . Journal of Logic Programming , 16 -LRB- 3 and 4 -RRB- :277 -LCB- 318 , July and August 1993 . This article was processed using the LaTEX macro package with LLNCS style

O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B I I O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

constraint logic programming
optimization
preference