Generalized

Local

Propagation

A

Framework

for

Solving

Constraint

Hierarchies

Hiroshi

Hosobe

Satoshi

Matsuoka

Akinori

Yonezawa

Dept.

of

Info

Science

Dept.

of

Info

Engineering

Dept.

of

Info

Science

University

of

Tokyo

Hongo

Bunkyo-ku

Tokyo

Japan

Phone

Fax

detail@is.s.u-tokyo.ac.jp

matsu@ipl.t.u-tokyo.ac.jp

yonezawa@is.s.u-tokyo.ac.jp

Abstract

Constraint

hierarchy

is

a

nonmonotonic

system

that

allows

programmers

to

describe

over-constrained

real-world

problems

by

specifying

constraints

with

hierarchical

preferences

and

has

been

applied

in

various

areas

An

important

aspect

of

constraint

hierarchies

is

that

there

are

efficient

satisfaction

algorithms

local-propagation-based

algorithms

for

example

are

efficient

enough

to

realize

interactive

user

interfaces

However

past

local

propagation

algorithms

have

been

limited

to

multi-way

equality

constraints

In

this

research

we

reformulate

constraint

hierarchies

with

a

more

strict

definition

and

propose

generalized

local

propagation

as

a

theoretical

framework

for

studying

local

propagation

and

constraint

hierarchies

Then

we

show

that

a

property

called

global

semi-monotonicity

in

satisfying

hierarchies

turns

out

to

be

a

practically

useful

property

in

generalized

local

propagation

Finally

we

give

an

overview

of

an

algorithm

for

solving

hierarchies

of

multi-way

equality

and

inequality

constraints

which

has

been

actually

implemented

Introduction

Constraint

hierarchies

allow

programmers

to

describe

over-constrained

real-world

problems

by

specifying

constraints

with

hierarchical

or

preferences

-LSB-

-RSB-

and

have

been

applied

to

various

research

areas

such

as

constraint

logic

programming

-LSB-

-RSB-

constraint

imperative

programming

-LSB-

-RSB-

and

graphical

user

interfaces

-LSB-

-RSB-

Intuitively

in

a

constraint

hierarchy

the

stronger

a

constraint

is

the

more

it

influences

the

solutions

of

the

hierarchy

For

example

the

hierarchy

of

the

constraints

strong

x

and

weak

x

yields

the

solution

x

This

property

enables

programmers

to

specify

preferential

or

default

constraints

that

may

be

used

in

case

the

set

of

required

or

non-default

constraints

are

under-constrained

Moreover

constraint

hierarchies

are

general

enough

to

handle

powerful

constraint

systems

are

different

from

weights

positive

real

numbers

indicating

importance

in

some

numerical

methods

strengths

have

absolute

priority

over

weaker

ones

while

weights

have

relative

priority

over

lighter

ones

The

original

theory

of

constraint

hierarchies

provides

the

explicit

use

of

weights

within

a

single

strength

-LSB-

-RSB-

e.g.

arithmetic

equations

and

inequalities

over

reals

Additionally

they

allow

relaxing

of

constraints

with

the

same

strength

by

applying

e.g.

the

least-squares

method

Theoretically

the

key

property

of

constraint

hierarchies

is

nonmonotonicity

That

is

addition

of

a

new

constraint

to

an

existing

hierarchy

may

change

the

set

of

solutions

completely

while

in

ordinary

monotonic

constraint

systems

it

would

either

preserve

or

reduce

the

solution

set

For

instance

if

we

add

the

constraint

strong

x

to

the

hierarchy

of

weak

x

the

solution

will

change

from

x

into

x

Clearly

this

nonmonotonic

property

gives

us

the

power

to

specify

default

constraints

An

important

aspect

of

constraint

hierarchies

as

a

nonmonotonic

system

is

that

there

are

efficient

satisfaction

algorithms

proposed

We

can

categorize

them

into

the

following

two

approaches

The

refining

method

first

satisfies

the

strongest

level

and

then

weaker

levels

successively

It

is

employed

in

the

DeltaStar

algorithm

-LSB-

-RSB-

and

a

hierarchical

constraint

logic

programming

language

CHAL

-LSB-

-RSB-

Local

propagation

gradually

solves

hierarchies

by

repeatedly

selecting

uniquely

satisfiable

constraints

It

is

mainly

used

in

constraint

solvers

for

graphical

user

interfaces

such

as

DeltaBlue

-LSB-

-RSB-

SkyBlue

-LSB-

-RSB-

and

DETAIL

-LSB-

-RSB-

First

to

illustrate

the

refining

method

suppose

we

have

the

hierarchy

consisting

of

required

x

y

strong

y

z

medium

z

and

weak

z

It

is

solved

as

follows

first

satisfying

the

strongest

constraint

required

x

y

it

reduces

the

set

of

all

variable

to

f

j

-LRB-

x

-RRB-

-LRB-

y

-RRB-

g

second

fulfilling

the

next

strongest

one

strong

y

z

it

obtains

f

j

-LRB-

x

-RRB-

-LRB-

y

-RRB-

-LRB-

y

-RRB-

-LRB-

z

-RRB-

third

evaluating

medium

z

it

yields

f

j

-LRB-

x

-RRB-

-LRB-

y

-RRB-

-LRB-

z

-RRB-

g

now

the

weakest

constraint

weak

z

conflicts

with

the

assignments

that

have

been

generated

from

the

stronger

constraints

and

therefore

remains

unsatisfied

As

shown

in

this

example

the

refining

method

is

a

straightforward

algorithm

for

solving

constraint

hierarchies

Next

to

demonstrate

local

propagation

reconsider

the

hierarchy

in

the

last

example

Local

propagation

handles

it

as

follows

first

since

medium

z

can

be

uniquely

solved

it

acquires

f

j

-LRB-

z

-RRB-

g

next

since

the

instantiated

value

of

z

makes

strong

y

z

uniquely

satisfiable

it

produces

f

j

-LRB-

y

-RRB-

-LRB-

z

-RRB-

g

finally

computing

required

x

y

it

outputs

f

j

-LRB-

x

-RRB-

-LRB-

y

-RRB-

-LRB-

z

-RRB-

g.

Note

it

must

reject

the

weakest

constraint

weak

z

at

the

beginning

otherwise

it

would

yield

an

incorrect

or

empty

solution

As

suggested

with

this

example

localpropagation-based

algorithms

must

plan

in

what

order

they

will

pick

and

solve

constraints

discarding

ones

that

lead

to

incorrect

solutions

Local

propagation

takes

advantage

of

the

potential

locality

of

typical

-LRB-

possibly

non-hierarchical

-RRB-

constraint

networks

in

graphical

user

interfaces

Basically

it

is

efficient

because

it

uniquely

solves

a

single

constraint

in

each

step

In

addition

when

a

variable

value

is

repeatedly

updated

by

an

operation

such

as

dragging

in

graphical

user

interfaces

it

can

easily

re-evaluate

only

the

necessary

constraints

However

local

propagation

is

restricted

to

multi-way

equality

constraints

which

can

only

be

uniquely

solved

for

each

variable

e.g.

linear

equations

over

reals

Also

it

can

not

find

multiple

solutions

for

a

given

constraint

hierarchy

due

to

the

uniqueness

and

Borning

refer

to

the

property

in

a

less

familiar

word

as

disorderly

-LSB-

-RSB-

Instead

they

use

nonmonotonicity

for

another

concept

in

hierarchical

constraint

logic

programming

variable

assignment

is

a

mapping

from

variables

to

their

values

equality

constraints

are

similar

to

functional

constraints

which

were

introduced

in

the

arc-consistency

algorithm

-LSB-

-RSB-

However

their

contexts

are

quite

different

because

arc

consistency

targets

binary

constraint-satisfaction

problems

over

finite

domains

Naturally

a

question

arises

whether

we

can

generalize

local

propagation

to

solve

hierarchies

of

more

powerful

constraints

without

losing

its

efficiency

In

this

research

we

first

reformulate

the

constraint

hierarchy

theory

with

a

more

strict

notion

of

of

comparators

and

then

introduce

a

property

of

constraint

systems

called

global

semi-monotonicity

which

is

weaker

than

monotonicity

but

stronger

than

nonmonotonicity

Next

we

propose

generalized

local

propagation

a

theoretical

framework

for

investigating

local

propagation

on

constraint

hierarchies

and

show

that

global

semimonotonicity

exhibits

a

practically

useful

property

in

generalized

local

propagation

Then

to

show

its

usefulness

we

extend

our

previous

DETAIL

algorithm

for

multiway

equality

constraints

so

that

it

can

also

handle

multi-way

inequality

constraints

which

have

not

been

successfully

handled

with

local-propagation-based

algorithms

in

the

past

The

new

constraint

solver

has

been

actually

implemented

here

we

give

an

informal

overview

and

briefly

show

its

performance

Details

of

the

algorithm

will

be

a

subject

of

another

paper

Related

Work

This

section

briefly

overviews

previous

researches

on

nonmonotonic

constraint

systems

from

the

viewpoint

of

local

propagation

Borning

et

al.

the

originators

of

constraint

hierarchies

-LSB-

-RSB-

studied

properties

of

hierarchies

-LSB-

-RSB-

and

also

developed

local-propagation-based

algorithms

called

DeltaBlue

-LSB-

-RSB-

and

SkyBlue

-LSB-

-RSB-

However

their

research

on

theoretical

properties

did

not

cover

local

propagation

on

constraint

hierarchies

but

rather

mainly

focused

on

hierarchical

constraint

logic

programming

-LRB-

HCLP

-RRB-

-LSB-

-RSB-

Jampel

constructed

a

certain

HCLP

instance

that

separates

the

HCLP

scheme

into

compositional

and

non-compositional

parts

-LSB-

-RSB-

The

method

is

expected

to

improve

the

efficiency

of

interpreters

and

compilers

since

the

compositional

part

is

efficiently

implementable

However

it

is

unclear

that

such

a

method

is

applicable

to

local

propagation

Freuder

and

Wallace

proposed

partial

constraint

satisfaction

for

handling

constraint

satisfaction

problems

that

are

impossible

or

impractical

to

solve

-LSB-

-RSB-

Theoretically

it

is

general

enough

to

simulate

constraint

hierarchies

However

the

presented

algorithms

were

ones

searching

for

approximate

solutions

by

weakening

problems

over

finite

domains

Generalized

Local

Propagation

In

this

section

we

first

reformulate

constraint

hierarchies

and

then

introduce

global

semi-monotonicity

of

constraint

hierarchies

Next

we

generalize

local

propagation

on

constraint

hierarchies

and

study

its

properties

for

obtaining

correct

solutions

A

Reformulation

of

Constraint

Hierarchies

Before

generalizing

local

propagation

we

modify

the

original

formulation

of

constraint

hierarchies

in

-LSB-

-RSB-

so

that

it

will

allow

us

to

better

investigate

local

propagation

Intuitively

the

main

changes

are

to

explicitly

parameterize

target

hierarchies

and

to

replace

concrete

embedded

functions/relations

with

abstract

ones

satisfying

reasonable

conditions

First

we

define

basic

terms

and

symbols

Let

X

be

the

set

of

all

variables

D

the

domain

of

the

variables

and

C

the

set

of

all

constraints

Given

a

constraint

c

X

-LRB-

c

-RRB-

denotes

the

set

of

all

the

variables

constrained

by

c

and

given

a

set

C

of

constraints

we

define

X

-LRB-

C

-RRB-

fx

X

j

C

x

X

-LRB-

c

-RRB-

g

A

strength

of

a

constraint

is

an

integer

l

such

that

l

w

where

w

is

some

positive

integer

simply

define

variables

and

constraints

as

elements

in

the

corresponding

sets

and

separately

provide

their

semantics

using

certain

functions

and

relations

Intuitively

the

larger

the

integer

is

the

weaker

the

strength

is

Let

L

be

the

set

of

all

the

strengths

A

constraint

c

with

a

strength

l

is

represented

by

c

l

A

constraint

hierarchy

is

a

finite

set

H

of

constraints

with

strengths

and

H

expresses

the

set

of

all

constraint

hierarchies

For

brevity

we

write

a

variable

as

x

a

constraint

as

c

a

strength

as

l

and

a

constraint

hierarchy

as

H

possibly

with

primes

or

subscripts

To

represent

solutions

to

constraint

hierarchies

we

use

variable

assignments

A

variable

assignment

denoted

as

is

a

mapping

from

X

to

D

and

indicates

the

set

of

all

variable

assignments

Given

a

set

X

of

variables

we

define

-LRB-

X

-RRB-

-LRB-

X

-RRB-

as

X

-LRB-

x

-RRB-

-LRB-

x

-RRB-

To

assign

semantics

to

constraints

we

first

introduce

error

functions

in

the

same

manner

as

the

original

formalization

of

constraint

hierarchies

-LSB-

-RSB-

Definition

-LRB-

error

function

-RRB-

An

error

function

for

l

is

a

mapping

el

C

-LSB-

R

such

that

for

any

c

and

-LRB-

X

-LRB-

c

-RRB-

-RRB-

-LRB-

X

-LRB-

c

-RRB-

-RRB-

-RRB-

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

The

condition

requires

that

errors

of

a

constraint

under

two

variable

assignments

are

equal

if

the

assignments

have

equal

values

for

each

constrained

variable

Next

we

introduce

level

comparators

Definition

-LRB-

level

comparator

-RRB-

A

level

comparator

for

l

is

a

ternary

relation

l

H

such

that

for

any

H

H

and

-LRB-

-RRB-

C

-LRB-

c

l

H

c

l

H

-RRB-

-RRB-

-LRB-

H

l

l

-RRB-

-LRB-

-RRB-

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

-RRB-

-LRB-

H

l

H

l

-RRB-

-LRB-

-RRB-

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

-RRB-

-LRB-

H

l

H

l

-RRB-

-LRB-

-RRB-

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

-RRB-

H

l

-LRB-

-RRB-

H

l

H

l

-RRB-

H

l

-LRB-

-RRB-

H

l

l

-RRB-

H

-LSB-

l

Intuitively

H

l

means

is

better

than

or

similar

to

according

to

l

of

H.

Conditions

-LRB-

-RRB-

-LCB-

-LRB-

-RRB-

say

that

the

scope

of

a

level

comparator

is

restricted

to

be

inside

a

designated

level

Condition

-LRB-

-RRB-

indicates

that

if

errors

of

all

constraints

at

a

level

under

an

assignment

are

smaller

than

or

equal

to

those

under

another

assignment

then

the

former

assignment

is

better

than

or

similar

to

the

latter

according

to

the

level

Condition

-LRB-

-RRB-

is

transitivity

of

a

level

comparator

Condition

-LRB-

-RRB-

means

that

if

in

two

hierarchies

an

assignment

is

better

than

or

similar

to

another

according

to

the

level

then

the

relation

holds

in

the

combination

of

the

hierarchies

For

convenience

we

define

l

-LRB-

worse

than

or

similar

to

-RRB-

l

-LRB-

similar

to

-RRB-

l

-LRB-

better

than

-RRB-

l

-LRB-

worse

than

-RRB-

and

l

-LRB-

incomparable

with

-RRB-

as

follows

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

H

l

The

original

definition

of

level

comparators

is

quite

different

from

Definition

in

the

following

ways

it

presents

a

constructive

method

of

level

comparators

separat

ing

l

into

l

and

l

it

includes

-LRB-

-RRB-

-LCB-

-LRB-

-RRB-

operationally

it

seems

to

implicitly

assume

-LRB-

-RRB-

it

does

not

require

the

transitivity

of

l

unlike

-LRB-

-RRB-

it

presents

no

condition

like

-LRB-

-RRB-

Theoretically

the

greatest

difference

is

the

lack

of

the

transitivity

of

l

which

we

will

discuss

later

in

Subsection

A

useful

example

of

a

level

comparator

is

the

least-squares

level

comparator

de

fined

as

H

l

Pc

el

-LRB-

c

-RRB-

Pc

el

-LRB-

c

-RRB-

Here

two

variable

assignments

are

compared

by

summing

squares

of

errors

of

constraints

at

the

level

It

is

easy

to

prove

that

the

definition

fulfills

the

conditions

for

level

comparators

Used

in

satisfaction

of

constraint

hierarchies

it

works

as

the

least-squares

method

within

level

l.

Next

we

define

constraint-hierarchy

comparators

that

totally

compare

hierarchies

by

combining

level

comparators

Definition

-LRB-

constraint-hierarchy

comparator

-RRB-

A

constraint-hierarchy

com

parator

is

a

ternary

relation

H

such

that

for

any

H

and

H

L

-LRB-

L

l

-RRB-

H

-RRB-

H

l

Intuitively

H

means

is

better

than

according

to

H.

It

is

defined

as

lexicographic

ordering

with

level

comparators

as

its

components

Consequently

the

result

of

a

level

comparator

has

absolute

priority

over

those

of

weaker

ones

For

convenience

we

define

-LRB-

worse

than

-RRB-

-LRB-

similar

to

-RRB-

-LRB-

better

than

or

similar

to

-RRB-

-LRB-

worse

than

or

similar

to

-RRB-

and

-LRB-

incomparable

with

-RRB-

as

follows

H

H

H

L

H

l

H

H

H

H

H

H

H

H

The

following

definition

describes

the

satisfaction

of

constraint

hierarchies

using

a

constraint-hierarchy

comparator

Definition

-LRB-

constraint-hierarchy

satisfier

-RRB-

A

constraint-hierarchy

satisfier

is

a

mapping

S

H

defined

as

S

-LRB-

H

-RRB-

f

j

H

g

As

as

shorthand

we

write

S

-LRB-

H

-RRB-

instead

of

S

-LRB-

H

-RRB-

Intuitively

S

-LRB-

H

-RRB-

is

the

set

of

assignments

obtained

by

nonmonotonically

satisfying

H

in

By

definition

an

assignment

in

S

-LRB-

H

-RRB-

is

an

element

in

such

that

there

is

no

better

assignment

in

when

compared

according

to

H.

Finally

we

define

solutions

of

constraint

hierarchies

Definition

-LRB-

solution

-RRB-

A

solution

to

H

is

a

variable

assignment

in

S

-LRB-

H

-RRB-

In

other

words

a

solution

to

H

is

an

assignment

found

by

nonmonotonically

satisfying

H

in

the

set

of

all

assignments

One

difference

between

the

original

and

our

formulations

in

defining

constrainthierarchy

comparators

is

that

the

original

restricts

top-level

constraints

to

be

required

whereas

ours

allows

conflicting

constraints

at

the

top

level

This

is

because

our

definition

of

hierarchy

satisfiers

excludes

the

special

treatment

of

the

top

level

However

the

resulting

solutions

are

the

same

so

far

as

the

top

level

is

not

over-constrained

Also

even

if

we

add

the

condition

for

the

top

level

to

be

required

we

can

easily

accommodate

it

in

our

following

proofs

Global

Semi-Monotonicity

We

define

a

useful

property

called

global

semi-monotonicity

-LRB-

GSM

-RRB-

in

satisfying

constraint

hierarchies

as

follows

the

original

formulation

provides

the

explicit

use

of

weights

of

constraints

in

the

leastsquares

level

comparator

we

omit

them

for

simplicity

However

even

if

we

incorporate

weights

we

can

obtain

the

similar

results

presented

in

the

paper

Definition

-LRB-

global

semi-monotonicity

-RRB-

S

is

globally

semi-monotonic

iff

for

any

H

and

H

S

-LRB-

H

-RRB-

S

-LRB-

H

-RRB-

S

-LRB-

H

-LSB-

H

-RRB-

GSM

indicates

that

any

common

solution

to

two

constraint

hierarchies

is

also

a

solution

to

their

combination

It

is

not

only

natural

but

also

weak

-LRB-

or

general

-RRB-

in

a

sense

that

the

condition

is

true

for

any

two

hierarchies

sharing

no

solutions

GSM

is

by

definition

not

limited

to

constraint

hierarchies

In

a

similar

style

we

can

express

basic

properties

of

constraint

systems

For

example

we

can

represent

ordinary

monotonicity

as

S

-LRB-

H

-RRB-

S

-LRB-

H

-RRB-

S

-LRB-

H

-LSB-

H

-RRB-

where

the

difference

from

GSM

is

that

it

has

S

-LRB-

H

-RRB-

S

-LRB-

H

-RRB-

S

-LRB-

H

-LSB-

H

-RRB-

Thus

we

can

see

that

GSM

lacks

the

familiar

style

of

the

monotonic

property

S

-LRB-

H

-RRB-

S

-LRB-

H

-LSB-

H

-RRB-

-LRB-

Such

a

universal

style

of

formal

properties

is

helpful

in

comparing

different

nonmonotonic

systems

-RRB-

We

present

a

useful

class

of

GSM

constraint-hierarchy

satisfiers

called

global

constraint-hierarchy

satisfiers

using

global

level

comparators

and

global

constrainthierarchy

comparators

Definition

-LRB-

global

level

comparator

-RRB-

A

level

comparator

l

is

global

iff

for

any

H

H

and

-LRB-

-RRB-

H

l

l

-RRB-

H

-LSB-

l

-LRB-

-RRB-

H

l

-RRB-

H

-LSB-

l

-LRB-

-RRB-

H

l

l

-RRB-

H

-LSB-

l

Definition

-LRB-

global

constraint-hierarchy

comparator

-RRB-

A

constraint-hierarchy

comparator

is

global

iff

each

level

comparator

is

global

Definition

-LRB-

global

constraint-hierarchy

satisfier

-RRB-

A

constraint-hierarchy

satisfier

is

global

iff

its

constraint-hierarchy

comparator

is

global

An

example

of

global

level

comparators

is

the

least-squares

level

comparator

Most

level

comparators

found

in

the

original

formulation

are

also

global

The

following

theorem

proves

that

global

satisfiers

are

GSM

Theorem

S

is

GSM

if

S

is

global

Proof

By

contradiction

assume

that

there

exists

a

that

is

in

S

-LRB-

H

-RRB-

and

S

-LRB-

H

-RRB-

but

not

in

S

-LRB-

H

-LSB-

H

-RRB-

Then

for

some

H

-LSB-

holds

that

is

for

some

l

-LRB-

L

l

-RRB-

H

-LSB-

-RRB-

H

-LSB-

l

By

-LRB-

-RRB-

and

-LRB-

-RRB-

H

-LSB-

implies

-LRB-

H

-RRB-

-LRB-

H

-RRB-

-LRB-

H

-RRB-

and

by

-LRB-

-RRB-

H

-LSB-

l

implies

H

l

l

Hence

it

must

be

either

of

the

following

two

cases

Case

L

l

-LRB-

L

-RRB-

H

-RRB-

H

Then

H

holds

which

is

a

contradiction

to

S

-LRB-

H

-RRB-

Case

L

l

-LRB-

L

-RRB-

H

-RRB-

Then

holds

which

is

a

contradiction

to

S

-LRB-

H

-RRB-

The

converse

that

GSM

satisfiers

are

global

is

not

true

in

fact

we

have

not

found

weaker

conditions

for

level

comparators

that

yield

a

set

equivalent

to

GSM

However

we

believe

that

most

useful

GSM

satisfiers

are

global

we

could

make

the

converse

true

if

we

strengthened

the

formulation

of

constraint

hierarchies

by

allowing

only

modular

hierarchy

comparators

as

follows

let

level

comparators

be

in

a

certain

set

including

the

least-squares

level

comparator

and

also

let

hierarchy

comparators

need

to

be

arbitrarily

composed

of

level

comparators

in

the

set

For

modular

hierarchy

comparators

the

truth

of

the

converse

is

easily

provable

since

we

can

create

a

non-GSM

satisfier

by

combining

any

non-global

and

the

least-squares

level

comparators

Another

set

of

level

comparators

without

the

least-squares

level

comparator

may

exist

but

is

unlikely

to

be

more

useful

The

global

hierarchy

comparators

might

seem

strongly

related

to

the

globallybetter

comparators

in

the

original

formulation

but

in

fact

they

are

different

A

globally-better

comparator

is

a

hierarchy

comparator

composed

of

level

comparators

that

compare

reals

generated

by

combining

errors

of

constraints

One

instance

leastsquares-better

is

composed

of

the

least-squares

level

comparators

and

therefore

is

global

However

worst-case-better

composed

of

the

worst-case

level

comparators

defined

as

H

l

maxc

el

-LRB-

c

-RRB-

maxc

el

-LRB-

c

-RRB-

is

not

global

because

-LRB-

-RRB-

does

not

hold

Generally

for

level

comparators

of

globally-betters

-LRB-

-RRB-

is

true

since

they

compare

reals

i.e.

H

l

However

it

depends

on

actual

instances

of

level

comparators

that

both

-LRB-

-RRB-

and

-LRB-

-RRB-

hold

Generalized

Local

Propagation

Classical

local

propagation

satisfies

a

constraint

network

by

successively

solving

individual

constraints

in

an

order

closely

associated

with

the

network

topology

Here

we

generalize

local

propagation

so

that

it

can

solve

a

set

of

constraints

at

once

and

can

also

introduce

an

arbitrary

order

among

such

constraint

sets

For

this

purpose

we

introduce

ordered

partitions

as

follows

a

partition

of

a

constraint

hierarchy

is

a

set

generated

by

decomposing

the

hierarchy

into

disjoint

subsets

called

blocks

given

a

partition

P

an

ordered

partition

of

P

is

a

pair

hP

<=P

i

where

<=P

is

an

arbitrary

partial

order

among

blocks

in

P

For

brevity

we

write

B

P

instead

of

B

<=P

B

Using

ordered

partitions

into

blocks

we

define

generalized

local

propagation

-LRB-

GLP

-RRB-

in

the

following

way

Definition

-LRB-

generalized

local

propagation

-RRB-

Generalized

local

propagation

with

S

is

a

mapping

ssS

-LRB-

hP

<=P

i

-RRB-

defined

as

follows

ssS

-LRB-

hP

<=P

i

-RRB-

if

jP

j

-LRB-

hP

<=P

i

-RRB-

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

B

-RRB-

otherwise

where

terminals

and

before

are

as

follows

terminals

-LRB-

hP

<=P

i

-RRB-

fB

P

j

P

B

P

before

-LRB-

hP

<=P

i

B

-RRB-

hP

<=P

i

where

ae

P

P

j

P

Bg

<=P

B

P

P

j

<=P

B

Intuitively

terminals

-LRB-

hP

<=P

i

-RRB-

is

the

set

of

all

blocks

at

terminal

positions

and

before

-LRB-

hP

<=P

i

B

-RRB-

is

the

ordered

sub-partition

of

hP

<=P

i

where

all

blocks

are

before

B.

For

example

consider

the

ordered

partition

hP

<=P

i

of

the

blocks

as

illustrated

in

Figure

The

partial

order

<=P

is

defined

as

the

reflexive

transitive

closure

of

all

the

arrows

in

Figure

Then

terminals

-LRB-

hP

<=P

i

-RRB-

is

the

set

Also

before

-LRB-

hP

<=P

i

-RRB-

is

the

pair

consisting

of

the

set

and

the

partial

order

defined

as

the

reflexive

transitive

closure

of

the

black

arrows

Thus

is

satisfied

in

the

set

of

assignments

obtained

by

applying

GLP

to

blocks

before

Accordingly

we

can

view

GLP

as

a

process

that

successively

solves

each

blocks

in

some

order

respecting

<=P

This

is

always

possible

because

<=P

is

a

partial

order

The

next

lemma

shows

that

by

using

a

global

satisfier

GLP

respects

the

similarity

of

variable

assignments

for

ordered

partitions

when

the

conditions

below

are

satisfied

before

-LRB-

hP

<=P

i

-RRB-

terminals

-LRB-

hP

<=P

i

-RRB-

Figure

An

ordered

partition

Lemma

Let

S

be

global

Given

an

arbitrary

H

hP

<=P

i

of

H

and

in

ssS

-LRB-

hP

<=P

i

-RRB-

then

any

is

in

ssS

-LRB-

hP

<=P

i

-RRB-

if

H

and

P

l

B

el

-LRB-

c

-RRB-

-RRB-

P

B

P

B

-RRB-

l

-LRB-

-RRB-

Proof

By

contradiction

assume

that

there

exists

some

which

is

not

in

ssS

-LRB-

hP

<=P

i

-RRB-

Then

it

is

necessary

that

for

some

in

P

is

in

ssS

-LRB-

before

-LRB-

hP

<=P

i

-RRB-

-RRB-

but

not

in

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

-RRB-

-RRB-

-RRB-

Because

H

holds

and

S

is

global

does

not

hold

Therefore

must

hold

that

is

there

exists

some

such

that

-LRB-

L

l

-RRB-

l

-RRB-

This

implies

that

for

some

B

in

P

B

holds

Since

must

be

in

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

B

-RRB-

it

must

be

either

of

the

following

two

cases

Case

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

B

-RRB-

Since

B

holds

there

must

exist

some

such

that

and

B

Case

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

Then

for

some

in

P

such

that

P

B

is

in

ssS

-LRB-

before

-LRB-

hP

<=P

i

-RRB-

-RRB-

but

not

in

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

-RRB-

-RRB-

-RRB-

Since

B

implies

B

-LRB-

c

-RRB-

and

also

since

-LRB-

-RRB-

holds

contains

only

stronger

constraints

than

Therefore

there

exists

some

such

that

and

Beginning

with

both

of

the

two

cases

resulted

in

that

there

exist

some

and

such

that

and

Clearly

it

causes

an

infinite

sequence

such

that

li

li

However

since

each

li

is

a

non-negative

integer

it

is

a

contradiction

Intuitively

Lemma

says

that

if

GLP

using

a

global

satisfier

generates

a

variable

assignment

under

which

constraints

with

errors

have

only

stronger

constraints

be

fore

them

then

it

yields

all

similar

-LRB-

i.e.

H

-RRB-

assignments

Note

that

the

sufficient

condition

-LRB-

-RRB-

allows

constraints

without

errors

to

be

placed

after

weaker

ones

In

the

following

theorem

we

prove

that

such

variable

assignments

are

solutions

to

the

constraint

hierarchy

Theorem

Let

S

be

global

Given

an

arbitrary

H

hP

<=P

i

of

H

and

in

ssS

-LRB-

hP

<=P

i

-RRB-

then

is

a

solution

to

H

if

-LRB-

-RRB-

holds

Proof

By

induction

on

the

size

of

P

Induction

base

If

jP

j

the

proposition

holds

Induction

step

Assume

that

if

jP

j

n

the

proposition

holds

Now

let

jP

j

n.

For

any

B

in

terminals

-LRB-

hP

<=P

i

-RRB-

must

be

in

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

B

-RRB-

Therefore

by

the

induction

hypothesis

is

in

S

-LRB-

HB

-RRB-

where

HB

is

the

union

of

blocks

of

before

-LRB-

hP

<=P

i

B

-RRB-

Now

we

assume

-LRB-

for

contradiction

-RRB-

that

there

exists

some

such

that

HB

-LSB-

B

that

is

for

some

l

-LRB-

L

l

-RRB-

HB

-LSB-

B

-RRB-

HB

-LSB-

B

l

It

must

be

either

of

the

following

two

cases

Case

L

l

-LRB-

L

-RRB-

HB

B

-RRB-

HB

Then

HB

holds

Therefore

S

-LRB-

HB

-RRB-

which

is

a

contradiction

Case

L

l

-LRB-

L

-RRB-

HB

B

-RRB-

B

Then

for

some

c

in

B

-LRB-

c

-RRB-

must

hold

By

-LRB-

-RRB-

HB

contains

only

stronger

constraints

than

Therefore

HB

holds

By

Lemma

is

also

in

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

However

since

B

holds

it

implies

S

-LRB-

ssS

-LRB-

before

-LRB-

hP

<=P

i

B

-RRB-

-RRB-

B

-RRB-

which

is

a

contradiction

Both

cases

caused

contradiction

Therefore

there

never

exists

such

i.e.

is

in

S

-LRB-

HB

-LSB-

B

-RRB-

Since

S

is

global

is

also

in

S

-LRB-

H

-RRB-

by

Theorem

The

theorem

presents

a

strategy

to

design

algorithms

for

solving

constraint

hierarchies

As

noted

the

sufficient

condition

permits

constraints

without

errors

to

be

located

after

weaker

ones

In

other

words

we

can

delay

the

satisfaction

of

a

strong

constraint

with

no

error

until

some

appropriate

time

for

example

when

the

constraint

becomes

uniquely

satisfiable

Actually

Theorem

gracefully

explains

why

the

DETAIL

algorithm

obtains

solutions

by

using

local

propagation

In

Section

we

will

relate

the

theorem

to

DETAIL

and

further

extend

it

so

that

it

can

handle

multi-way

inequality

constraints

An

important

instance

of

such

GLP

is

the

refining

method

Since

constraints

have

no

weaker

constraints

before

them

in

the

method

it

can

be

easily

understood

by

Theorem

that

it

generates

only

correct

solutions

i.e.

is

sound

In

addition

using

a

certain

kind

of

global

satisfiers

the

refining

method

yields

all

solutions

i.e.

is

complete

Proposition

Let

S

be

global

such

that

for

any

H

and

For

any

H

and

hP

<=P

i

of

H

ssS

-LRB-

hP

<=P

i

-RRB-

S

-LRB-

H

-RRB-

if

P

fBl

j

l

Lg

and

Bl

<=P

l

where

Bl

is

the

level

l

of

H.

By

this

proposition

refining

methods

using

a

global

hierarchy

comparator

that

is

also

a

globally-better

e.g.

least-squares-better

are

sound

and

complete

because

all

globally-betters

satisfy

Next

we

define

the

local

level

comparator

the

local

constraint-hierarchy

comparator

and

the

local

constraint-hierarchy

satisfier

Definition

-LRB-

local

level

comparator

-RRB-

A

level

comparator

l

is

local

iff

for

any

H

and

-LRB-

-RRB-

H

l

-RRB-

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

Definition

-LRB-

local

constraint-hierarchy

comparator

-RRB-

A

constraint-hierarchy

comparator

is

local

iff

each

level

comparator

is

local

Definition

-LRB-

local

constraint-hierarchy

satisfier

-RRB-

A

constraint-hierarchy

satisfier

is

local

iff

its

constraint-hierarchy

comparator

is

local

By

-LRB-

-RRB-

and

-LRB-

-RRB-

the

local

level

comparator

results

in

H

l

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

which

is

equivalent

to

the

level

comparator

of

the

locally-better

comparator

in

the

original

formalization

With

additional

restrictions

on

multi-way

equality

constraints

we

can

regard

our

formulation

as

a

theoretical

basis

of

efficient

constrainthierarchy

satisfaction

algorithms

such

as

DeltaBlue

and

SkyBlue

The

following

proposition

indicates

a

critical

difference

between

global

hierarchy

comparators

and

globally-betters

is

probably

possible

to

weaken

the

sufficient

conditions

for

level

comparators

since

the

condition

for

ordered

partitions

is

too

strong

in

the

refining

method

Proposition

The

local

constraint-hierarchy

comparator

is

global

Proof

Straightforward

The

original

formulation

presented

locally-better

and

globally-betters

as

separate

concepts

However

we

successfully

integrated

locally-better

and

important

classes

of

globally-betters

into

global

hierarchy

comparators

via

GSM

Using

a

local

satisfier

we

can

obtain

a

theorem

with

a

weaker

sufficient

condition

than

that

of

Theorem

Theorem

Let

S

be

local

Given

an

arbitrary

H

hP

<=P

i

of

H

and

in

ssS

-LRB-

hP

<=P

i

-RRB-

then

is

a

solution

to

H

if

P

l

B

el

-LRB-

c

-RRB-

-RRB-

P

B

P

B

-RRB-

l

-LRB-

-RRB-

Proof

Similar

to

that

of

Theorem

The

difference

between

-LRB-

-RRB-

and

-LRB-

-RRB-

is

the

existence

of

equality

in

l

which

indicates

that

-LRB-

-RRB-

is

weaker

than

-LRB-

-RRB-

Since

it

will

provide

more

freedom

to

organize

ordered

partitions

we

can

expect

to

develop

more

efficient

constraint

solving

algorithms

using

local

satisfiers

For

example

we

can

regard

the

blocked

constraint

lemma

presented

in

the

DeltaBlue

paper

-LSB-

-RSB-

as

a

specialization

of

Theorem

Discussion

In

this

subsection

we

review

the

relationship

among

nonmonotonic

constraint

systems

which

is

roughly

illustrated

in

Figure

nonmonotonic

our

constraint

hierarchies

original

constraint

hierarchies

partial

constraint

satisfaction

RB

GS

GB

WCB

LSB

globally

semi-monotonic

LS

LB

M

GS

global

satisfier

GB

globally-better

LB

locally-better

LS

local

satisfier

RB

regionally-better

LSB

least-squares-better

WCB

worst-case-better

M

monotonic

WSB

WSB

weighted-sum-better

Figure

Relationship

of

nonmonotonic

constraint

systems

Partial

constraint

satisfaction

-LSB-

-RSB-

is

a

considerably

general

theory

Therefore

it

will

include

various

nonmonotonic

systems

which

are

not

necessarily

efficiently

solvable

Our

reformulation

of

constraint

hierarchies

has

become

narrower

than

the

original

one

because

we

necessitated

l

to

be

transitive

by

-LRB-

-RRB-

For

example

we

exclude

regionally-better

in

-LSB-

-RSB-

since

its

level

comparator

is

defined

as

H

l

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

l

H

el

-LRB-

c

-RRB-

el

-LRB-

c

-RRB-

and

H

l

H

l

H

l

where

H

l

is

not

transitive

However

excluding

such

level

comparators

contributed

to

theoretical

cleanness

and

development

of

generalized

local

propagation

It

is

important

to

find

an

expressive

and

efficiently

solvable

class

of

nonmonotonic

constraint

systems

Except

regional-better

and

worst-case-better

all

the

hierarchy

speaking

as

noted

earlier

our

theory

allows

conflicting

constraints

at

the

top

level

while

the

original

theory

restricts

top-level

constraints

to

be

required

comparators

presented

in

the

original

formulation

are

global

by

our

formulation

We

believe

that

this

fact

supports

the

expressiveness

of

our

global

satisfiers

with

respect

to

constraint

hierarchies

Also

we

claim

that

Theorem

for

global

satisfiers

and

Theorem

for

local

satisfiers

are

useful

in

designing

efficient

constraint

satisfaction

algorithms

Solving

Multi-Way

Inequality

Constraints

To

show

the

usefulness

of

the

results

in

the

last

section

we

design

a

GLP-based

algorithm

that

solves

constraint

hierarchies

with

inequalities

and

then

implement

and

evaluate

a

constraint

solver

based

on

the

algorithm

Here

we

give

only

an

informal

overview

The

details

of

the

algorithm

will

be

a

subject

of

another

paper

The

DETAIL

Algorithm

To

begin

with

we

relate

our

formulation

with

the

DETAIL

algorithm

which

we

proposed

in

-LSB-

-RSB-

DETAIL

is

an

incremental

algorithm

for

solving

constraint

hierarchies

based

on

local

propagation

It

always

stores

planning

data

such

as

an

ordered

partition

for

solving

the

current

hierarchy

with

local

propagation

and

modifies

the

plan

if

a

constraint

is

added

to

or

removed

from

the

hierarchy

DETAIL

handles

multi-way

equality

constraints

extended

so

that

they

can

be

simultaneously

satisfied

or

properly

relaxed

in

addition

to

solving

them

individually

as

was

with

classical

local

propagation

To

process

such

constraints

DETAIL

maintains

a

set

of

constraint

cells

instead

of

an

ordered

partition

into

blocks

A

constraint

cell

can

be

regarded

as

a

block

including

output

variables

where

the

constraints

in

the

block

are

uniquely

solved

for

the

output

variables

In

addition

constraint

cells

never

share

variables

with

other

cells

For

example

to

solve

the

constraint

strong

x

y

for

variable

x

it

yields

a

cell

of

strong

x

y

and

x.

By

contrast

to

simultaneously

solve

strong

x

y

and

weak

x

y

it

generates

a

cell

of

the

two

constraints

and

the

variables

x

and

y.

Similarly

to

relax

strong

x

and

strong

x

it

produces

a

cell

consisting

of

the

two

constraints

and

x.

DETAIL

solves

such

constraint

cells

with

pluggable

numerical

modules

called

subsolvers

using

e.g.

Gaussian

elimination

By

the

definition

of

constraint

cells

we

can

determine

dependency

among

cells

Additionally

if

we

prohibit

cyclic

dependency

we

can

naturally

identify

the

overall

dependency

among

cells

with

a

partial

order

among

blocks

Then

we

can

perform

GLP

in

a

unique

manner

as

is

with

classical

local

propagation

For

example

consider

the

hierarchy

of

the

constraints

-LSB-

a

-RSB-

required

t

-LSB-

b

-RSB-

weak

t

u

-LSB-

c

-RSB-

weak

v

-LSB-

d

-RSB-

strong

t

v

w

-LSB-

e

-RSB-

weak

w

x

-LSB-

f

-RSB-

required

x

y

-LSB-

g

-RSB-

strong

x

y

z

and

-LSB-

h

-RSB-

medium

z

Figure

illustrates

a

configuration

of

cells

where

the

squares

and

circles

represent

constraints

and

variables

respectively

and

the

boxes

with

round

corners

indicate

cells

Clearly

in

the

order

respecting

the

cell

dependencies

such

as

A

B

H

G

and

E

we

can

uniquely

solve

constraints

in

each

cell

The

other

issue

is

how

to

determine

configurations

of

cells

that

obtain

correct

solutions

To

guarantee

the

sufficient

condition

-LRB-

-RRB-

for

Theorem

we

employed

walkabout

strengths

that

had

been

first

introduced

in

DeltaBlue

-LSB-

-RSB-

DETAIL

associates

walkabout

strengths

with

constraint

cells

as

follows

Definition

-LRB-

walkabout

strength

-RRB-

The

walkabout

strength

of

a

constraint

cell

is

the

weakest

among

the

strengths

of

its

constraints

and

the

walkabout

strengths

of

also

realizes

simultaneous

satisfaction

by

calling

cycle

solvers

but

provides

no

features

for

relaxing

constraints

-LSB-

-RSB-

the

viewpoint

of

GLP

it

is

not

necessary

to

define

partial

orders

based

on

the

dependency

since

it

allows

non-unique

satisfaction

of

constraints

in

blocks

required

required

t

weak

weak

t

u

weak

v

E

strong

weak

t

v

w

weak

w

x

medium

required

x

y

strong

x

y

z

medium

z

mediumG

H

ta

b

c

d

e

f

g

h

Figure

A

configuration

of

constraint

cells

its

preceding

cells

For

example

in

Figure

the

walkabout

strength

of

cell

G

is

medium

the

weakest

among

the

strengths

required

and

strong

of

-LSB-

f

-RSB-

and

-LSB-

g

-RSB-

in

G

and

the

walkabout

strength

medium

of

the

preceding

cell

H

of

G.

By

definition

walkabout

strengths

propagate

the

weakest

strengths

along

the

partial

order

among

cells

In

other

words

the

walkabout

strength

of

a

cell

indicates

that

there

are

only

constraints

with

equal

or

stronger

strengths

before/in

the

cell

For

example

in

Figure

although

the

weak

constraints

-LSB-

c

-RSB-

and

-LSB-

e

-RSB-

in

E

have

positive

errors

the

walkabout

strengths

required

and

medium

of

the

preceding

cells

A

and

G

are

stronger

than

weak

Then

the

result

of

local

propagation

will

be

a

correct

ordered

partition

into

blocks

satisfies

the

sufficient

condition

for

Theorem

Now

we

demonstrate

the

DETAIL

algorithm

by

example

Figure

illustrates

the

initial

configuration

of

cells

and

suppose

that

we

add

a

new

constraint

-LSB-

h

-RSB-

medium

z

to

it

The

current

solution

z

conflicts

with

-LSB-

h

-RSB-

and

the

walkabout

strength

weak

of

G

shows

that

there

is

one

or

more

weak

constraints

in

or

before

G.

Therefore

we

must

change

the

configuration

in

the

following

steps

First

move

along

the

path

from

the

new

cell

to

the

nearest

source

of

the

walkabout

strength

i.e.

from

H

to

E

reversing

the

dependency

between

them

as

shown

in

Figure

Note

the

multi-way

equality

property

of

constraints

always

enables

us

to

perform

the

reversing

operation

Next

merge

cyclic

dependencies

generated

from

the

previous

step

if

any

In

the

example

we

eliminate

the

cycle

of

and

F

as

illustrated

in

Figure

Third

check

whether

the

victimized

cell

E

has

any

preceding

cells

with

the

same

walkabout

strength

weak

Figure

shows

that

D

is

such

a

cell

Since

it

violates

the

sufficient

condition

for

generating

solutions

merge

all

the

transitively

adjacent

cells

with

the

same

walkabout

strength

i.e.

D

and

C

-LRB-

but

not

B

-RRB-

Then

we

obtain

the

final

configuration

in

Figure

In

step

we

merged

all

the

transitively

adjacent

cells

with

the

same

walkabout

strength

to

ensure

the

sufficient

condition

-LRB-

-RRB-

for

global

constraint-hierarchy

satisfiers

However

if

we

use

a

local

satisfier

we

only

need

guarantee

the

weaker

condition

-LRB-

-RRB-

and

therefore

we

can

omit

step

-LRB-

the

final

configuration

would

have

been

Figure

-RRB-

DETAIL

also

provides

the

support

for

local

satisfiers

which

usually

results

in

smaller

constraint

cells

that

can

be

solved

more

efficiently

Extension

to

Multi-Way

Inequality

Constraints

We

extend

the

DETAIL

algorithm

so

that

it

can

handle

multi-way

inequality

constraints

We

consider

only

local

satisfiers

to

simplify

the

algorithm

and

also

to

algorithm

for

reversing

dependencies

is

in

-LSB-

-RSB-

The

key

is

to

use

the

maximum-matching

algorithm

for

bipartite

graphs

to

appropriately

decompose

large

cells

with

multiple

constraints

and

variables

a.

required

required

t

weak

weak

t

u

weak

v

strong

weak

t

v

w

weak

w

x

weak

required

x

y

strong

x

y

z

medium

z

weak

F

H

ta

b

c

d

e

f

g

h

weak

D

E

weak

G

b.

required

required

t

weak

weak

t

u

weak

v

strong

weak

t

v

w

weak

w

x

required

x

y

strong

x

y

z

x

y

medium

z

z

F

ta

b

c

d

e

f

g

h

weak

D

weak

c.

required

required

t

weak

weak

t

u

weak

v

strong

weak

t

v

w

weak

w

x

required

x

y

strong

x

y

z

medium

z

ta

b

c

d

e

f

g

h

weak

D

medium

mediumw

eak

d.

required

required

t

weak

weak

t

u

weak

v

strong

weakt

v

w

weak

w

x

medium

required

x

y

strong

x

y

z

medium

z

mediumG

ta

b

c

d

e

f

g

h

Figure

Adding

a

constraint

to

a

hierarchy

of

equalities

improve

its

efficiency

First

we

define

multi-way

inequality

constraints

by

removing

the

uniqueness

requirement

from

multi-way

equality

constraints

as

follows

a

multiway

inequality

constraint

can

be

solved

for

each

variable

For

example

x

y

z

is

a

multi-way

inequality

because

we

can

assign

some

value

to

a

given

variable

for

any

values

of

the

other

two

variables

Having

adopted

multi-way

inequality

constraints

we

can

not

correspond

dependencies

among

cells

-LRB-

in

DETAIL

-RRB-

to

partial

orders

among

blocks

-LRB-

in

GLP

-RRB-

as

successfully

as

before

So

we

introduce

the

following

principle

into

the

extended

algorithm

in

the

final

configurations

of

cells

we

put

each

multi-way

inequality

constraint

individually

in

a

terminal

cell

Also

we

incorporate

the

following

strategies

into

the

algorithm

In

some

initial

or

intermediate

configuration

an

inequality

might

become

unsatisfied

Then

we

perform

either

of

the

following

operations

-LRB-

a

-RRB-

If

there

are

one

or

more

equality

constraints

before

it

that

is

weaker

than

the

added

constraint

and

the

inequality

we

temporally

try

to

enforce

the

inequality

by

reversing

the

dependency

between

it

and

one

of

the

weakest

constraints

before

it

-LRB-

if

it

fails

use

the

next

weakest

one

-RRB-

If

another

inequality

becomes

to

be

placed

after

the

inequality

by

the

reversing

operation

we

also

check

its

satisfiability

by

merging

cells

between

them

-LRB-

b

-RRB-

If

there

are

no

such

equalities

but

the

inequality

is

weaker

than

the

initially

added

constraint

or

the

temporally

enforced

inequality

constraints

we

leave

the

inequality

unsatisfied

-LRB-

c

-RRB-

Otherwise

we

backtrack

When

variable

values

become

undetermined

due

to

enforcing

one

or

more

inequalities

we

perform

in

strength

order

satisfiability

tests

of

unsolved

equality

constraints

after

the

inequalities

Basically

each

test

reverses

the

dependency

between

the

unsolved

equation

and

some

inequality

and

checks

whether

related

stronger

inequalities

are

satisfied

The

process

is

theoretically

to

make

the

corresponding

ordered

partition

have

such

unsolved

constraints

placed

in

strength

order

Now

we

first

demonstrate

a

simple

example

Consider

a

hierarchy

of

-LSB-

a

-RSB-

medium

w

-LSB-

b

-RSB-

required

w

x

-LSB-

c

-RSB-

weak

x

-LSB-

d

-RSB-

required

x

y

-LSB-

e

-RSB-

weak

y

and

-LSB-

f

-RSB-

required

y

z.

Figure

illustrates

the

proper

configuration

of

cells

for

the

hierarchy

where

we

put

the

satisfied

inequality

constraint

-LSB-

d

-RSB-

in

a

terminal

cell

D

based

on

our

principle

Assume

that

we

add

an

equality

constraint

-LSB-

g

-RSB-

strong

z

to

the

hierarchy

as

in

Figure

Then

we

can

successfully

satisfy

it

as

illustrated

in

Figure

where

the

inequality

-LSB-

d

-RSB-

remains

satisfied

By

contrast

assume

that

we

add

-LSB-

g

-RSB-

strong

z

instead

of

-LSB-

g

-RSB-

In

this

case

we

employ

the

strategies

introduced

above

in

the

following

way

By

enforcing

-LSB-

g

-RSB-

we

obtain

the

configuration

in

Figure

However

the

inequality

-LSB-

d

-RSB-

stronger

than

-LSB-

g

-RSB-

becomes

unsatisfied

although

there

is

a

weaker

constraint

-LSB-

a

-RSB-

before

-LSB-

d

-RSB-

Then

based

on

the

first

strategy

we

reverse

the

dependency

from

-LSB-

a

-RSB-

to

-LSB-

d

-RSB-

as

shown

in

Figure

By

the

operation

the

variables

w

and

x

become

undetermined

because

we

can

not

uniquely

solve

the

inequality

-LSB-

d

-RSB-

Based

on

the

second

strategy

we

perform

in

strength

order

satisfiability

tests

of

unsolved

constraints

after

-LSB-

d

-RSB-

Omitting

the

test

for

clearly

unsatisfiable

-LSB-

a

-RSB-

we

succeed

in

satisfying

-LSB-

c

-RSB-

by

reversing

the

dependency

from

-LSB-

d

-RSB-

to

-LSB-

c

-RSB-

as

shown

in

Figure

a.

medium

medium

w

A

required

w

x

wa

b

eak

x

c

required

x

y

d

y

weak

required

weak

y

z

f

B

C

D

E

Fmediumw

eak

weakw

eak

b.

medium

medium

w

A

required

w

x

wa

b

eak

x

c

required

x

y

d

y

weak

required

weak

y

z

f

B

C

D

E

Fmediumw

eak

weakw

eak

z

strong

G

c.

medium

medium

w

A

required

w

x

wa

b

eak

x

c

required

x

y

d

y

weak

required

strongy

z

f

z

strong

B

C

D

F

mediumw

eak

strongmedium

weak

d.

medium

medium

w

A

required

w

x

wa

b

eak

x

c

required

x

y

d

y

weak

required

strongy

z

f

z

g

strong

B

C

D

F

mediumw

eak

strongmedium

weak

e.

medium

medium

w

required

w

x

wa

b

x?w

eak

x

c

required

x

y

d

y

weak

required

strongy

z

f

z

g

strong

C

F

strong

weak

strongstrong

weak

f.

weak

medium

w

required

w

x

wa

b

x

eak

x

c

required

x

y

d

y

weak

required

strongy

z

f

z

g

strong

F

weak

weak

strongw

eak

weak

Figure

Adding

a

constraint

to

a

hierarchy

with

an

inequality

The

advantage

of

placing

inequalities

in

terminal

cells

is

that

as

long

as

they

remain

satisfied

they

only

work

as

inexpensive

tests

Such

a

situation

is

likely

in

case

the

value

of

a

variable

is

gradually

updated

For

example

suppose

that

a

user

is

dragging

an

object

in

a

graphical

user

interface

Then

the

inequalities

restricting

the

range

of

its

position

only

perform

tests

while

the

object

is

in

the

permitted

region

Implementation

and

Performance

Evaluation

Based

on

the

extended

algorithm

we

implemented

a

constraint

solver

in

C++

As

multi-way

constraints

we

adopted

linear

equations

and

inequalities

and

incorporated

Gaussian

elimination

to

solve

constraint

cells

of

linear

equations

and

the

simplex

method

to

solve

cells

with

linear

inequalities

To

examine

how

much

influence

inequalities

will

have

on

the

performance

we

executed

the

following

three

kinds

of

chain

benchmarks

on

the

SGI

Indy

workstation

-LRB-

MHz

-RRB-

-LRB-

a

-RRB-

add

the

constraint

strong

xn

to

the

hierarchy

of

a

chain

of

the

n

constraints

weak

and

required

xi

xi

-LRB-

i

n

-RRB-

-LRB-

b

-RRB-

include

additional

required

in

the

initial

hierarchy

-LRB-

c

-RRB-

further

replace

the

constraint

to

be

added

with

strong

xn

Benchmark

-LRB-

a

-RRB-

is

one

of

the

worst

cases

that

the

solver

must

modify

all

cells

In

-LRB-

b

-RRB-

required

is

satisfied

both

before

and

after

the

addition

and

therefore

we

expect

that

the

execution

time

of

-LRB-

b

-RRB-

are

similar

to

those

of

-LRB-

a

-RRB-

because

of

the

advantage

of

placing

inequalities

in

terminal

cells

By

contrast

-LRB-

c

-RRB-

needs

a

temporal

large

cell

with

the

two

inequalities

to

check

the

satisfiability

Executing

the

benchmarks

we

obtained

the

following

result

n

2000 4000 6000 8000

Benchmark

-LRB-

a

-RRB-

-LRB-

ms

-RRB-

250 500 900 1150

Benchmark

-LRB-

b

-RRB-

-LRB-

ms

-RRB-

233 500 900 1150

Benchmark

-LRB-

c

-RRB-

-LRB-

ms

-RRB-

500 1150 1716 2350

The

advantage

is

verified

since

the

result

of

-LRB-

b

-RRB-

is

similar

to

-LRB-

a

-RRB-

By

contrast

the

result

of

-LRB-

c

-RRB-

shows

that

checking

the

satisfiability

of

cells

with

inequalities

is

somewhat

expensive

occupying

about

half

of

the

overall

execution

time

Conclusions

and

Future

Work

We

reformulated

the

original

definition

of

constraint

hierarchies

and

proposed

generalized

local

propagation

to

theoretically

study

local

propagation

therein

We

showed

that

globally

semi-monotonic

satisfaction

of

hierarchies

exhibits

a

practically

useful

property

for

generalized

local

propagation

By

applying

the

results

we

developed

an

algorithm

for

solving

hierarchies

of

multi-way

equality

and

inequality

constraints

and

actually

implemented

and

evaluated

a

constraint

solver

based

on

the

algorithm

Currently

we

are

trying

to

improve

the

efficiency

of

the

constraint

solver

first

we

will

modify

the

implementation

of

constraint

cells

and

backtracking

next

we

will

adopt

interval

propagation

to

improve

the

efficiency

of

satisfiability

tests

of

cells

with

inequalities

References

-LSB-

-RSB-

Borning

A.

R.

Duisberg

B.

Freeman-Benson

A.

Kramer

and

M.

Woolf

Constraint

Hierarchies

in

ACM

OOPSLA

Oct.

pp

-LCB-

-LSB-

-RSB-

Borning

A.

B.

Freeman-Benson

and

M.

Wilson

Constraint

Hierarchies

Lisp

and

Symbolic

Computation

vol

pp

-LCB-

-LSB-

-RSB-

Freeman-Benson

B.

N.

and

A.

Borning

Integrating

Constraints

with

an

Object-Oriented

Language

in

ECOOP

no.

in

LNCS

pp.

-LCB-

Springer-Verlag

June/July

-LSB-

-RSB-

Freeman-Benson

B.

N.

J.

Maloney

and

A.

Borning

An

Incremental

Constraint

Solver

Comm

ACM

vol

no.

Jan.

pp.

-LCB-

-LSB-

-RSB-

Freuder

E.

C.

and

R.

J.

Wallace

Partial

Constraint

Satisfaction

Artificial

Intelligence

vol

pp.

-LCB-

-LSB-

-RSB-

Hentenryck

P.

V.

Y.

Deville

and

C.-M

Teng

A

Generic

Arc-Consistency

Algorithm

and

its

Specializations

Artificial

Intelligence

vol

pp.

-LCB-

-LSB-

-RSB-

Hosobe

H.

K.

Miyashita

S.

Takahashi

S.

Matsuoka

and

A.

Yonezawa

Locally

Simultaneous

Constraint

Satisfaction

in

PPCP

no.

in

LNCS

pp.

-LCB-

Springer-Verlag

Oct.

-LSB-

-RSB-

Jampel

M.

A

Compositional

Theory

of

Constraint

Hierarchies

-LRB-

Operational

Semantics

-RRB-

in

Proc

Workshop

on

Over-Constrained

Systems

at

CP

Sept.

-LSB-

-RSB-

Maloney

J.

H.

A.

Borning

and

B.

N.

Freeman-Benson

Constraint

Technology

for

UserInterface

Construction

in

ThingLab

II

in

ACM

OOPSLA

Oct.

-LSB-

-RSB-

Sannella

M.

SkyBlue

A

Multi-Way

Local

Propagation

Constraint

Solver

for

User

Interface

Construction

in

ACM

UIST

Nov.

pp.

-LCB-

-LSB-

-RSB-

Satoh

K.

and

A.

Aiba

Computing

Soft

Constraints

by

Hierarchical

Constraint

Logic

Programming

Tech

Rep.

ICOT

Japan

Jan.

-LSB-

-RSB-

Wilson

M.

Hierarchical

Constraint

Logic

Programming

-LRB-

Ph.D.

Dissertation

-RRB-

Tech

Rep.

Dept.

of

Computer

Science

and

Engineering

University

of

Washington

May

-LSB-

-RSB-

Wilson

M.

and

A.

Borning

Extending

Hierarchical

Constraint

Logic

Programming

Nonmonotonicity

and

Inter-Hierarchy

Comparison

in

Proc

North

American

Conference

on

Logic

Programming

-LSB-

-RSB-

Wilson

M.

and

A.

Borning

Hierarchical

Constraint

Logic

Programming

J.

Logic

Programming

vol

no.

July/Aug

pp.

-LCB-

constraint hierarchies
inequalities
local propagation
nonmonotonicity