technical

report

ECRC

-LCB-

-LCB-

Associative

Communication

and

its

Optimization

via

Abstract

Interpretation

Jean-Marc

Andreoli

Remo

Pareschi

EUROPEAN

COMPUTER-INDUSTRY

RESEARCH

CENTRE

ECRC

GMBH

ARABELLASTR

MUNCHEN

GERMANY

TEL

FAX

TLX

c

European

Computer-Industry

Research

Centre

February

Neither

the

authors

of

this

report

nor

the

European

Computer-Industry

Research

Centre

GmbH

Munich

Germany

make

any

warranty

express

or

implied

or

assume

any

legal

liability

for

the

accuracy

completeness

or

usefulness

of

any

information

apparatus

product

or

process

disclosed

or

represent

that

its

use

would

not

in

fringe

privately

owned

rights

Permission

to

copy

in

whole

or

in

part

is

granted

for

non-profit

educational

and

research

purposes

provided

that

all

such

whole

or

partial

copies

include

the

following

a

notice

that

such

copying

is

by

the

permission

of

the

European

Computer-Industry

Research

Centre

GmbH

Munich

Germany

an

acknowledgement

of

the

authors

and

individual

contributors

to

the

work

all

applicable

portions

of

this

copyright

notice

Copying

reproducing

or

republishing

for

any

other

purpose

shall

require

a

license

with

payment

of

fee

to

the

European

Computer-Industry

Research

Centre

GmbH

Munich

Germany

All

rights

reserved

ii

Abstract

This

report

has

been

submitted

for

publication

in

the

Journal

of

Theoretical

Computer

Science

We

characterize

the

notion

of

associative

communication

in

concurrent

computations

in

the

two

flavors

of

competitive

associative

communication

-LRB-

racing

for

common

resources

-RRB-

and

noncompetitive

associative

communication

-LRB-

broadcasting

-RRB-

This

form

of

communication

characterizes

a

wide

variety

of

programming

languages

and

models

and

finds

a

logical

interpretation

based

on

Linear

Logic

in

LO

-LRB-

for

Linear

Objects

-RRB-

a

recently

proposed

declarative

model

for

concurrent

object-oriented

computations

Exploiting

this

insight

we

show

how

computations

based

on

associative

communication

can

be

optimized

by

making

use

of

static

analysis

techniques

widely

developed

in

the

tradition

of

logic

programming

like

abstract

interpretation

and

partial

evaluation

iii

Contents

Introduction

Associative

Communication

Efficiency

Issues

in

Associative

Communication

Structure

of

the

Paper

LO

Syntax

and

Operational

Semantics

Programs

and

Resources

Inference

Figures

Operational

Interpretation

of

the

Inference

Figures

Partially

Specified

Contexts

An

Example

of

Target

Proof

Construction

A

Naive

Execution

Scheme

Specification

of

an

Interpreter

Shortcomings

of

the

Naive

Execution

Scheme

Static

Analysis

of

LO

programs

Abstract

Interpretation

The

Abstraction

Mapping

Abstraction

of

Programs

Contexts

and

Proofs

Properties

of

Sorts

Partial

Evaluation

The

total

evaluation

tree

The

partial

evaluation

graph

The

Generalization

Step

Exploitation

of

the

Results

Multiset

Matching

and

Broadcasting

Concrete

Execution

Multiset

Matching

Broadcasting

An

Example

Other

Optimizations

Discussion

and

Future

Work

Conclusion

A

Proof

of

Theorem

iv

Introduction

Associative

Communication

Let

us

start

by

characterizing

the

notion

of

associative

communication

By

associative

communication

we

mean

exchanging

information

by

generically

uttering

something

-LRB-

like

requests

assertions

etc.

-RRB-

in

front

of

some

kind

of

audience

this

situation

can

be

contrasted

with

the

one

arising

from

exchanging

information

by

sending

messages

to

some

specific

address

We

call

this

form

of

communication

associative

because

agents

having

access

to

the

delivered

information

associate

with

it

in

case

they

possess

the

properties

required

for

its

processing

A

lot

of

the

communication

which

goes

on

in

real

life

is

in

this

sense

associative

take

for

instance

television

broadcasting

electoral

speeches

speech

actions

like

calling

a

taxi

booking

a

flight

through

a

travel

agency

etc.

In

general

all

human

conversations

are

associative

since

although

the

speaker

may

address

one

specific

listener

all

other

listeners

are

also

exposed

to

her/his

speech

to

which

they

can

react

We

can

further

characterize

associative

communication

by

distinguishing

two

cases

where

information

is

accessed

respectively

either

competitively

or

non-competitively

The

competitive

case

is

illustrated

by

the

action

of

booking

a

flight

through

a

travel

agency

here

of

several

different

airlines

that

may

be

able

to

satisfy

the

booking

request

only

one

will

effectively

associate

with

it

in

fact

as

soon

as

one

such

airline

is

found

all

other

airlines

lose

their

opportunity

of

processing

the

delivered

information

which

would

have

enabled

them

to

make

a

profit

by

selling

an

available

seat

On

the

other

hand

an

electoral

speech

illustrates

a

case

of

non-competitive

association

each

listener

gets

her/his

own

private

copy

of

the

delivered

speech

to

which

s/he

can

differently

react

according

to

such

factors

as

political

opinions

personal

appeal

of

the

candidate

etc.

Because

of

the

simplicity

of

its

requirements

associative

communication

provides

an

attractive

framework

for

modeling

different

forms

of

concurrency

Indeed

competitive

associative

communication

is

essentially

covered

by

approaches

relying

formally

on

the

notion

of

rewriting

over

a

multiset

of

computational

resources

which

in

the

past

years

has

emerged

as

a

simple

but

powerful

model

of

concurrency

Abstract

computational

devices

like

the

Chemical

Abstract

Machine

-LSB-

-RSB-

Petri

Nets

-LSB-

-RSB-

and

blackboards

-LSB-

-RSB-

are

based

on

such

a

notion

so

are

parallel

languages

like

Gamma

-LSB-

-RSB-

Linda

-LSB-

-RSB-

Shared

Prolog

-LSB-

-RSB-

Swarm

-LSB-

-RSB-

and

Associons

-LSB-

-RSB-

AI

languages

like

-LSB-

-RSB-

and

the

classifier

systems

used

for

combinatorial

optimization

via

genetic

algorithms

-LSB-

-RSB-

The

crucial

idea

behind

this

view

of

concurrency

is

that

concurrent

processes

interact

by

accessing

a

shared

collection

of

resources

interdependencies

arise

in

terms

of

producer/consumer

relationships

where

one

process

inputs

resources

produced

by

another

as

output

Competitive

associative

communication

is

here

a

consequence

of

the

fact

that

pieces

of

information

are

delivered

in

the

form

of

produced

resources

whose

availability

for

consumption

induces

a

race

among

concurrent

processes

acting

as

potential

consumers

However

the

multiset

model

of

concurrency

can

be

naturally

extended

so

as

to

encompass

non-competitive

associative

communication

as

well

As

a

matter

of

fact

an

extension

of

this

kind

has

recently

been

proposed

within

the

context

of

LO

-LRB-

for

Linear

Objects

-RRB-

an

abstract

model

for

object-oriented

concurrent

programming

-LSB-

-RSB-

In

LO

objects

are

structured

entities

with

multiple

components

-LSB-

-RSB-

formally

they

are

encoded

as

multisets

so

that

concurrent

computations

inside

a

single

object

are

accounted

for

in

terms

of

multiset

rewriting

just

as

above

But

interactions

among

different

objects

are

also

possible

this

happens

via

the

objects

multiset

intersection

that

gets

incrementally

specified

at

run-time

as

a

side-effect

of

the

transitions

performed

inside

each

object

hence

any

new

piece

of

information

appearing

there

is

automatically

broadcast

to

all

the

currently

existing

objects

Thus

interobject

communication

is

itself

associative

but

in

the

non-competitive

sense

sender

objects

send

messages

generically

to

all

other

objects

who

are

then

left

free

to

make

whatever

use

if

any

of

their

own

private

copy

of

the

received

information

LO

's

model

of

concurrent

object-oriented

programming

is

simple

and

elegant

with

a

flexible

form

of

dynamic

inheritance

deriving

from

viewing

objects

as

structured

entities

and

with

powerful

expressive

capabilities

to

account

for

object

inter/intra-actions

Indeed

LO

offers

the

natural

basis

for

amalgamating

dual

AI

concepts

like

blackboards

-LSB-

-RSB-

-LRB-

which

are

modeled

in

terms

of

multiset

rewriting

-RRB-

and

contract

nets

-LSB-

-RSB-

-LRB-

which

rely

on

broadcast

communication

-RRB-

and

has

a

direct

analogy

in

recent

work

concerned

with

introducing

broadcasting

in

CCS-like

process

calculi

-LSB-

-RSB-

Furthermore

LO

's

operational

semantics

can

be

rigorously

accounted

for

in

terms

of

the

proof

theory

of

Linear

Logic

-LSB-

-RSB-

where

the

logical

connectives

can

be

viewed

operationally

as

operators

over

Efficiency

Issues

in

Associative

Communication

Its

merits

from

the

point

of

view

of

simplicity

and

expressiveness

notwithstanding

associative

communication

suffers

from

some

serious

sources

of

inefficiency

on

the

side

of

execution

which

stay

in

direct

relationship

with

its

virtues

on

the

expressive

side

in

fact

two

direct

consequences

of

simplifying

communication

by

dropping

the

requirement

that

information

be

explicitly

addressed

are

Non-determinism

in

the

competitive

form

of

communication

concerning

the

selection

in

multiset

rewriting

of

the

process

which

is

going

to

consume

a

given

resource

Saturation

in

the

non-competitive

form

of

communication

following

from

the

fact

that

with

broadcasting

each

process

must

receive

and

store

all

the

broadcast

messages

even

those

for

which

it

has

no

use

These

problems

can

be

tackled

from

several

angles

The

purpose

of

this

paper

is

of

showing

how

optimization

can

be

achieved

via

the

technique

of

abstract

interpretation

according

to

the

following

methodology

by

deducing

properties

of

abstract

versions

of

programs

characterized

by

associative

communication

it

is

possible

to

know

in

advance

-LRB-

i

-RRB-

that

certain

processes

will

never

be

able

to

match

certain

multisets

and

-LRB-

ii

-RRB-

that

certain

items

in

a

given

multiset

will

never

be

consumed

by

any

process

Thus

our

approach

is

general

in

that

it

can

be

applied

to

both

competitive

and

non-competitive

associative

communication

since

by

-LRB-

i

-RRB-

it

is

possible

to

decrease

the

degree

of

non-determinism

in

multiset

matching

while

by

-LRB-

ii

-RRB-

saturation

generated

by

the

use

of

broadcasting

can

be

reduced

Furthermore

it

can

be

synergetically

combined

with

specialized

algorithms

for

executing

multiset

matching

-LSB-

-RSB-

which

provide

run-time

optimizations

of

the

selection

problem

To

illustrate

our

approach

we

make

use

of

the

LO

model

of

concurrent

computations

Our

optimizing

methodology

exploits

one

crucial

feature

of

this

model

namely

the

fact

that

in

LO

the

computation

is

modularly

distributed

over

several

multisets

Furthermore

LO

allows

us

to

illustrate

the

power

of

the

approach

with

respect

to

both

competitive

and

non-competitive

associative

communication

Finally

the

logical

proof-theoretic

semantics

of

LO

makes

particularly

straightforward

the

application

of

abstract

interpretation

techniques

However

there

are

several

other

frameworks

which

while

being

less

expressive

than

LO

in

that

they

limit

themselves

to

competitive

associative

communication

nevertheless

permit

for

the

purpose

of

information

hiding

the

partitioning

of

multisets

into

collections

of

encapsulated

submultisets

-LRB-

see

in

particular

the

Chemical

Abstract

Machine

model

-LSB-

-RSB-

-RRB-

Our

approach

should

be

easily

adaptable

so

as

to

achieve

optimization

for

such

models

as

well

thus

demonstrating

the

general

desirability

of

this

kind

of

encapsulation

and

modularization

facilities

Structure

of

the

Paper

The

rest

of

this

paper

is

structured

as

follows

In

section

we

give

a

formal

characterization

of

the

operational

semantics

of

LO

programs

In

section

we

explore

in

depth

the

shortcomings

of

a

naive

approach

to

running

such

programs

In

section

we

introduce

static

analysis

techniques

to

cope

with

these

shortcomings

In

section

we

show

how

to

exploit

the

results

of

the

static

analysis

to

optimize

specific

aspects

of

LO

execution

and

we

illustrate

this

with

a

concrete

example

In

section

we

compare

our

work

with

related

research

and

identify

points

where

further

progress

can

be

achieved

Section

concludes

the

paper

one

of

the

main

motivations

for

Linear

Logic

is

of

providing

a

theoretical

framework

for

the

study

of

concurrency

Conversely

LO

has

influenced

some

further

developments

in

the

Linear

Logic

enterprise

see

-LSB-

-RSB-

LO

Syntax

and

Operational

Semantics

Programs

and

Resources

LO

programs

are

built

from

the

following

operators

par

-LRB-

written

-RRB-

with

-LRB-

written

-RRB-

becomes

-LRB-

written

ffi

-RRB-

and

top

-LRB-

written

-RRB-

We

assume

an

initial

-LRB-

possibly

infinite

-RRB-

set

of

atomic

formulae

A

from

which

we

can

recursively

define

two

classes

of

expressions

resource

formulae

R

and

program

formulae

P

R

A

j

R

R

j

R

R

j

P

A

ffi

R

j

A

P

A

program

is

a

-LRB-

possibly

infinite

-RRB-

set

of

program

formulae

and

a

context

is

a

finite

multiset

of

resource

formulae

An

LO

sequent

is

written

as

P

C

where

P

is

a

program

and

C

is

a

context

Inference

Figures

Intuitively

program

formulae

can

be

thought

of

as

composed

of

two

parts

an

input

part

-LRB-

left-hand

side

of

the

symbol

ffi

-RRB-

and

an

output

part

-LRB-

right-hand

side

of

the

symbol

ffi

-RRB-

implementing

respectively

the

consumption

and

the

production

of

resources

However

the

operation

of

producing

new

resources

is

here

more

complex

than

in

standard

multiset

rewriting

and

may

in

fact

involve

the

creation

of

new

multisets

or

the

termination

of

existing

ones

This

situation

is

accounted

for

via

the

following

operational

semantics

Let

a

proof

be

a

tree

structure

whose

nodes

are

labeled

with

LO

sequents

By

convention

a

proof

tree

is

graphically

represented

with

its

root

at

the

bottom

and

growing

upward

Its

branches

are

obtained

as

instances

of

the

following

inference

figures

ffl

Decomposition

inference

figures

-LSB-

-RSB-

P

C

P

C

-LSB-

-RSB-

P

C

-LSB-

-RSB-

P

C

P

C

P

C

ffl

Progression

inference

figure

-LSB-

ffi

-RSB-

P

C

R

P

C

An

if

-LRB-

An

ffi

R

-RRB-

P

In

these

figures

P

and

C

denote

respectively

a

program

and

a

context

R

denote

resource

formulae

and

the

expression

C

R

denotes

the

context

obtained

as

the

multiset

union

of

C

and

the

singleton

R.

Notice

that

by

definition

the

elements

of

a

multiset

are

not

ordered

Therefore

the

order

of

the

atoms

in

the

left-hand

side

of

a

program

formula

is

not

relevant

Operational

Interpretation

of

the

Inference

Figures

Read

bottom-up

a

proof

with

root

sequent

P

C

gives

us

a

static

representation

-LRB-

a

snapshot

-RRB-

of

the

overall

evolution

of

a

system

of

agents

working

on

the

initial

set

of

resources

C

under

program

P.

Each

branch

of

proof

represents

the

evolution

of

one

agent

the

nodes

are

the

agent

states

while

the

edges

are

the

state

transitions

Given

that

a

node

can

-LRB-

binarily

-RRB-

branch

an

LO

program

can

distribute

the

computation

over

several

different

multisets

at

the

same

time

As

shown

in

-LSB-

-RSB-

this

allows

capturing

concurrent

object-oriented

computations

characterized

by

multiple

concurrently

interacting

agents

whose

internal

activities

can

be

themselves

concurrent

The

inference

figures

in

the

section

above

have

been

grouped

into

two

different

sets

One

set

containing

the

decomposition

inference

figures

is

responsible

for

making

explicit

the

structure

of

contexts

containing

an

occurrence

of

a

complex

-LRB-

i.e.

non-atomic

-RRB-

resource

formula

ffl

Inference

figure

-LSB-

-RSB-

which

has

no

upper

sequents

accounts

for

agent

termination

ffl

Inference

figure

-LSB-

-RSB-

has

two

upper

sequents

which

share

a

part

of

their

context

Thus

the

two

output

states

of

this

transition

can

be

viewed

as

clones

that

is

as

independent

contexts

with

a

similar

structure

In

other

words

the

connective

allows

agent

creation

by

cloning

ffl

Inference

figure

-LSB-

-RSB-

simply

decomposes

complex

resource

formulae

whose

topmost

connective

is

thus

it

acts

analogously

to

the

heating

rule

of

the

Chemical

Abstract

Machine

model

-LSB-

-RSB-

which

heats

complex

components

to

make

their

subparts

react

with

other

components

The

other

set

containing

the

single

progression

inference

figure

effectively

implements

state

change

ffl

Inference

figure

-LSB-

ffi

-RSB-

applies

a

program

formula

to

a

context

which

gets

transformed

by

replacement

of

the

input

part

of

the

formula

with

its

output

part

Thus

the

progression

inference

rule

-LSB-

ffi

-RSB-

gives

us

via

multiset

rewriting

the

competitive

form

of

associative

communication

program

formulae

communicate

within

each

context

by

deleting/adding

elements

from/to

it

as

a

consequence

two

or

more

program

formulae

may

compete

for

the

same

resource

-LRB-

s

-RRB-

By

contrast

non-competitive

associative

communication

is

not

accounted

for

in

terms

of

an

explicit

inference

figure

but

is

instead

achieved

as

a

side

effect

of

how

proof

trees

involving

multiple

contexts

are

constructed

This

is

detailed

in

the

next

section

Partially

Specified

Contexts

A

program

call

is

a

pair

hP

Ri

consisting

of

an

LO

program

P

and

a

resource

formula

R.

Target

proofs

are

then

defined

as

follows

Definition

A

target

proof

for

a

program

call

hP

Ri

is

a

proof

such

that

its

root

is

a

sequent

of

the

form

P

C

R

where

C

is

a

context

In

other

words

target

proofs

are

searched

in

such

a

way

that

the

context

of

their

root

node

may

properly

contain

the

initial

resource

of

the

program

call

Running

an

LO

program

call

consists

of

building

a

target

proof

for

it

The

basic

way

of

building

proofs

of

this

kind

is

by

allowing

application

of

program

formulae

through

the

progression

inference

figure

to

proceed

by

making

assumptions

on

the

still

unspecified

part

of

the

context

We

introduce

therefore

a

pragmatic

tool

which

gives

control

on

such

assumptions

Let

be

a

special

symbol

called

the

broadcast

marker

which

can

be

used

to

prefix

any

atom

in

the

input

part

of

a

program

formula

Consider

then

the

following

program

formula

p

a

ffi

r

This

means

that

to

apply

this

program

formula

the

atom

p

-LRB-

unmarked

-RRB-

must

be

found

in

the

already

specified

part

of

the

context

while

the

atom

a

-LRB-

marked

-RRB-

must

be

assumed

in

the

still

unspecified

part

of

the

context

Of

course

when

the

program

formula

triggers

both

the

marked

and

the

unmarked

atoms

of

the

input

part

-LRB-

here

p

a

-RRB-

are

replaced

by

the

output

part

of

the

formula

-LRB-

here

r

alone

-RRB-

Thus

the

input

part

of

each

program

formula

is

itself

split

into

two

groups

of

atoms

those

-LRB-

unmarked

-RRB-

which

are

asked

from

the

context

-LRB-

i.e.

from

its

already

specified

part

-RRB-

and

those

-LRB-

marked

-RRB-

which

are

told

to

the

context

-LRB-

i.e.

to

its

still

unspecified

part

-RRB-

Clearly

the

unspecified

part

of

the

initial

context

is

shared

among

all

the

different

contexts

labeling

the

nodes

of

the

proof

Hence

any

assumption

made

at

one

node

by

applying

the

progression

inference

figure

is

reflected

at

all

the

other

nodes

which

share

the

unspecified

part

of

the

initial

context

this

leads

to

a

form

of

broadcasting

which

implements

non-competitive

associative

communication

In

fact

while

activities

inside

agents

are

competitive

interactions

among

agents

are

not

as

each

agent

represents

an

alternative

way

of

exploiting

a

common

pool

of

resources

Under

this

perspective

messages

exchanged

through

different

agents

are

just

resources

among

others

indeed

they

are

copies

of

elements

from

a

common

initial

reservoir

which

gets

incrementally

specified

As

shown

in

-LSB-

-RSB-

the

contrast

in

the

behavior

of

inter-actions

versus

intra-actions

finds

through

Linear

Logic

a

deep

logical

explanation

in

terms

of

the

different

nature

of

the

operators

i.e.

respectively

and

governing

the

two

kinds

of

activities

in

fact

if

seen

as

a

Linear

Logic

connective

is

an

additive

operator

while

is

a

multiplicative

one

An

Example

of

Target

Proof

Construction

We

exemplify

here

the

construction

of

a

target

proof

illustrating

competitive

and

non-competitive

associative

communication

Consider

the

following

LO

program

p

a

ffi

q

a

ffi

r

a

ffi

s

a

ffi

The

following

proof

-LRB-

where

the

program

P

is

omitted

from

the

left-hand

side

of

the

sequents

-RRB-

is

a

possible

target

proof

for

the

program

call

hP

-LRB-

p

q

-RRB-

r

si

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

ffi

-RSB-

-LSB-

-RSB-

q

p

q

a

p

q

a

-LSB-

-RSB-

-LSB-

ffi

-RSB-

-LSB-

-RSB-

r

a

-LSB-

ffi

-RSB-

-LSB-

-RSB-

s

a

r

s

a

-LRB-

p

q

-RRB-

r

s

a

Let

us

go

into

the

details

of

the

construction

of

Initially

the

search

tree

is

reduced

to

a

single

node

C

-LRB-

p

q

-RRB-

r

s

where

C

is

the

still

unspecified

context

is

first

expanded

by

decomposing

the

complex

component

-LRB-

p

q

-RRB-

r

s

using

the

decomposition

inference

figures

-LSB-

-RSB-

and

-LSB-

-RSB-

This

yields

the

tree

-LSB-

-RSB-

-LSB-

-RSB-

C

p

q

C

p

q

-LSB-

-RSB-

C

r

C

s

C

r

s

C

-LRB-

p

q

-RRB-

r

s

At

this

point

all

computational

activities

related

to

the

contexts

on

respectively

the

left

and

the

middle

branch

of

the

tree

are

suspended

as

no

inference

figure

can

apply

to

them

however

the

right

branch

of

the

tree

can

evolve

in

terms

of

the

inference

figure

-LSB-

ffi

-RSB-

allowing

in

this

way

the

program

formula

s

a

ffi

to

make

the

assumption

a

on

the

unspecified

context

C

-LRB-

which

thus

becomes

a

-RRB-

such

an

assumption

is

non-competitively

shared

-LRB-

broadcast

-RRB-

among

the

left

and

the

middle

branch

Inference

figure

-LSB-

-RSB-

can

then

terminate

the

agent

corresponding

to

the

right

branch

Tree

encodes

this

state

of

affairs

-LSB-

-RSB-

-LSB-

ffi

-RSB-

p

q

a

p

q

a

-LSB-

-RSB-

r

a

-LSB-

ffi

-RSB-

-LSB-

-RSB-

s

a

r

s

a

-LRB-

p

q

-RRB-

r

s

a

As

a

consequence

of

the

broadcasting

the

activity

on

the

left

and

the

middle

branch

is

resumed

in

fact

the

progression

inference

figure

-LSB-

ffi

-RSB-

can

apply

in

both

cases

However

in

the

case

of

the

left

branch

this

leads

to

a

situation

of

competition

as

both

program

formulae

p

a

ffi

q

a

ffi

are

potentially

enabled

but

both

need

to

make

use

of

the

resource

a

to

trigger

Thus

the

resource

a

while

being

non-competitively

shared

among

all

agents

generates

inside

the

agent

on

the

left

branch

an

internal

race

between

the

program

formulae

which

may

consume

it

Taking

program

formula

p

a

ffi

to

be

the

winner

we

obtain

the

target

proof

given

by

the

tree

-LSB-

-RSB-

-LSB-

ffi

-RSB-

-LSB-

ffi

-RSB-

-LSB-

-RSB-

q

p

q

a

p

q

a

-LSB-

-RSB-

-LSB-

ffi

-RSB-

-LSB-

-RSB-

r

a

-LSB-

ffi

-RSB-

-LSB-

-RSB-

s

a

r

s

a

-LRB-

p

q

-RRB-

r

s

a

This

yields

proof

when

is

empty

A

Naive

Execution

Scheme

We

describe

here

a

naive

execution

scheme

for

the

model

presented

in

the

previous

section

We

shall

then

show

the

weaknesses

of

such

a

scheme

and

shall

devote

the

next

section

to

eliminating

them

However

before

going

into

this

it

is

important

to

point

out

that

even

the

naive

scheme

relies

on

one

fundamental

optimization

which

is

crucial

to

make

the

LO

model

of

practical

interest

This

optimization

hinges

on

the

following

property

Proposition

If

any

of

the

decomposition

inference

figures

-LRB-

-LSB-

-RSB-

-LSB-

-RSB-

or

-LSB-

-RSB-

-RRB-

applies

at

one

node

of

the

proof

then

it

can

deterministically

be

applied

immediately

Application

of

the

progression

inference

figure

-LRB-

-LSB-

ffi

-RSB-

-RRB-

can

be

delayed

until

no

decomposition

inference

figure

can

be

applied

Therefore

as

long

as

a

context

at

a

leaf

of

the

proof

contains

a

non-atomic

resource

formula

the

proof

search

procedure

can

be

made

completely

deterministic

Non

determinism

stems

only

from

the

choice

of

the

program

formula

to

apply

in

the

progression

inference

figure

after

all

the

applicable

decomposition

figures

have

been

triggered

Proposition

above

is

a

special

case

of

a

more

general

result

concerning

full

Linear

Logic

known

as

the

focusing

property

introduced

in

-LSB-

-RSB-

and

which

also

shows

that

the

progression

inference

rule

is

complete

Let

us

start

by

observing

that

the

model

of

execution

of

LO

contains

many

sources

of

concurrency

which

we

would

like

the

implementation

to

preserve

and

possibly

exploit

-LRB-

if

the

appropriate

hardware

is

available

-RRB-

However

for

simplicity

sake

in

the

definition

of

the

naive

execution

scheme

we

restrict

ourselves

to

external

concurrency

which

occurs

among

different

agents

and

do

not

consider

the

possibility

of

multiple

concurrent

transitions

within

one

agent

-LRB-

though

of

course

the

model

makes

possible

also

this

kind

of

internal

concurrency

-RRB-

In

other

words

the

only

form

of

concurrency

we

consider

here

stems

from

the

possibility

of

simultaneously

expanding

several

open

nodes

of

the

proof

tree

On

the

other

hand

to

expand

an

open

node

using

the

progression

inference

figure

program

formulae

are

tried

sequentially

the

first

applicable

one

is

applied

with

no

possibility

of

backtracking

We

adopt

that

is

a

committed

choice

strategy

and

the

symbol

ffi

in

a

program

formula

acts

as

the

commitment

operator

The

only

reason

for

following

this

approach

is

that

it

makes

very

straightforward

the

definition

of

the

naive

execution

scheme

whose

flaws

as

we

shall

see

are

independent

from

the

fact

that

activities

inside

agents

are

sequential

or

concurrent

Specification

of

an

Interpreter

We

use

the

following

terminology

Definition

The

submultiset

of

the

input

part

of

a

program

formula

consisting

of

the

atoms

which

are

not

prefixed

with

the

broadcast

marker

is

called

the

trigger

of

the

formula

A

program

formula

is

said

Procedure

try

-LRB-

C

context

-RRB-

Loop

If

there

is

a

program

formula

P

applicable

to

C

Then

Call

apply

-LRB-

P

C

-RRB-

Else

A

get

-LRB-

-RRB-

C

C

A

Procedure

apply

-LRB-

P

program

formula

C

context

-RRB-

Let

P

An

An

Ar

ffi

R

and

C

An

Call

put

-LRB-

fAn

Arg

-RRB-

Foreach

parcomp

-LRB-

R

-RRB-

Spawn

Call

try

-LRB-

-RRB-

Function

parcomp

-LRB-

R

resource

formula

-RRB-

returns

a

set

of

multisets

of

atoms

Switch

Case

Return

R

is

an

atom

A

ffAgg

R

s.t.

parcomp

-LRB-

-RRB-

and

parcomp

-LRB-

-RRB-

g

R

parcomp

-LRB-

-RRB-

-LSB-

parcomp

-LRB-

-RRB-

R

Figure

The

naive

interpreter

to

be

applicable

to

a

context

if

the

context

contains

-LRB-

in

the

sense

of

multiset

inclusion

-RRB-

the

trigger

of

the

formula

In

order

to

implement

the

broadcast

mechanism

we

simply

assume

that

each

agent

is

associated

with

a

private

queue

of

messages

and

that

the

following

two

operations

are

available

ffl

put

-LRB-

A

multiset

of

atoms

-RRB-

broadcasts

all

the

atoms

from

multiset

A

that

is

a

copy

of

each

of

them

is

added

to

the

queue

of

each

agent

in

the

system

except

the

one

performing

the

put

operation

Those

agents

which

were

suspended

as

a

consequence

of

a

blocked

get

-LRB-

-RRB-

operation

-LRB-

see

below

-RRB-

are

reactivated

ffl

get

-LRB-

-RRB-

returns

one

broadcast

message

This

simply

amounts

to

retrieving

one

message

from

the

private

queue

of

an

agent

the

other

agents

are

not

affected

by

this

operation

If

an

agent

tries

to

get

a

message

while

its

queue

is

empty

then

it

becomes

suspended

It

resumes

when

another

agent

broadcasts

a

message

-LRB-

see

above

-RRB-

Notice

that

the

message

queue

of

an

agent

is

hereditary

When

new

agents

are

created

in

a

transition

each

of

them

inherits

the

queue

of

the

creator

more

precisely

each

of

them

inherits

a

copy

of

the

message

queue

at

the

time

of

creation

so

that

the

get

-LRB-

-RRB-

operations

performed

by

the

newly

created

agents

do

not

interfere

The

naive

interpreter

consists

of

two

procedures

and

a

side

function

specified

formally

in

Fig.

using

a

simplified

thread

based

language

Each

agent

is

executed

by

a

separate

thread

ffl

Procedure

try

looks

-LRB-

sequentially

-RRB-

for

a

program

formula

applicable

to

a

context

If

it

succeeds

the

formula

is

applied

otherwise

a

new

message

is

transferred

from

the

message

queue

to

the

context

and

we

loop

back

to

the

initial

point

If

the

queue

is

empty

the

agent

is

suspended

ffl

Procedure

apply

applies

an

-LRB-

applicable

-RRB-

program

formula

to

a

context

it

discards

from

the

context

the

trigger

-LRB-

which

by

definition

of

applicability

is

included

in

the

context

-RRB-

and

broadcasts

the

marked

atoms

it

then

decomposes

the

output

part

-LRB-

a

resource

formula

-RRB-

of

the

applied

program

formula

within

the

remaining

context

ffl

Function

parcomp

recursively

and

maximally

applies

the

decomposition

inference

figures

to

a

resource

formula

-LRB-

strictly

speaking

the

singleton

multiset

containing

this

formula

-RRB-

and

yields

the

set

of

contexts

thus

obtained

Each

such

context

is

called

a

par-component

of

the

initial

resource

formula

and

contains

only

atoms

-LRB-

otherwise

decomposition

could

be

further

applied

-RRB-

Definition

The

par-components

of

a

resource

formula

R

are

the

elements

of

parcomp

-LRB-

R

-RRB-

Each

par-component

is

a

multiset

of

atoms

The

construct

Foreach

Element

Condition

Spawn

used

in

procedure

apply

spawns

a

new

computation

thread

for

each

Element

satisfying

the

Condition

-LRB-

here

for

each

par-component

of

the

output

part

of

the

selected

program

formula

-RRB-

As

explained

above

each

thread

gets

a

separate

copy

of

the

message

queue

at

the

time

of

spawning

If

the

condition

can

not

be

satisfied

the

current

thread

terminates

Otherwise

the

current

thread

can

be

reused

for

one

of

the

elements

for

which

the

condition

holds

Shortcomings

of

the

Naive

Execution

Scheme

The

main

problem

with

the

naive

execution

scheme

presented

in

the

previous

section

comes

from

the

fact

that

it

performs

too

much

recomputation

For

example

an

obvious

improvement

can

be

obtained

in

procedure

try

which

searches

for

applicable

program

formulae

Indeed

when

no

applicable

program

formula

is

found

for

the

context

C

a

new

message

read

from

the

queue

is

added

to

this

context

hence

at

the

next

performance

of

the

loop

it

is

not

necessary

to

test

all

the

program

formulae

again

for

applicability

but

only

those

whose

trigger

contains

the

message

which

has

just

been

added

But

even

with

this

improvement

the

search

for

an

applicable

program

formula

remains

costly

mainly

because

of

the

problems

respectively

of

non-determinism

in

multiset

matching

and

of

saturation

inherent

to

broadcasting

We

have

already

informally

characterized

these

problems

in

section

but

it

is

worth

recalling

them

again

here

ffl

On

the

one

hand

testing

a

program

formula

for

applicability

-LRB-

either

sequentially

or

in

parallel

with

other

formulae

-RRB-

requires

a

multiset

matching

-LRB-

between

the

trigger

of

the

method

and

a

submultiset

of

the

context

-RRB-

which

is

in

general

a

computationally

expensive

operation

This

problem

has

been

thoroughly

investigated

in

the

framework

of

production

systems

languages

like

where

it

also

occurs

naturally

and

optimized

algorithms

have

been

proposed

-LSB-

-RSB-

Our

approach

consists

instead

of

getting

rid

of

as

many

multiset

matching

operations

as

possible

This

does

not

preclude

the

use

of

optimized

algorithms

for

the

residual

cases

where

multiset

matching

can

not

be

eliminated

ffl

On

the

other

hand

broadcasting

is

also

an

expensive

operation

since

each

broadcast

message

must

be

delivered

to

all

the

agents

in

the

system

-LRB-

except

the

sender

and

its

descendants

-RRB-

even

though

some

agents

-LRB-

sometimes

most

of

them

-RRB-

may

never

be

able

to

use

the

message

for

any

transition

The

result

is

an

accumulation

of

garbage

messages

cluttering

up

the

agents

with

the

consequence

of

making

multiset

matching

even

more

expensive

since

the

triggers

of

candidate

program

formulae

have

to

be

matched

against

all

the

messages

Two

possibilities

are

offered

here

to

tackle

this

problem

either

determining

when

a

message

is

sent

which

agents

can

make

use

of

it

so

as

to

reduce

the

number

of

agents

to

which

the

message

is

delivered

-LRB-

broadcasting

is

thus

transformed

into

multicasting

-RRB-

or

determining

whether

a

message

received

by

an

agent

can

immediately

or

at

some

later

stage

be

consumed

by

a

program

formula

so

as

to

discard

right

away

messages

which

will

never

be

involved

in

any

transition

As

a

matter

of

fact

the

two

approaches

can

be

combined

In

the

next

section

we

propose

a

static

analysis

technique

in

order

to

infer

some

useful

properties

of

LO

programs

which

in

turn

can

be

used

to

increase

the

efficiency

of

multiset

matching

and

of

broadcasting

by

implementing

the

improvements

mentioned

above

Static

Analysis

of

LO

programs

The

static

analysis

technique

proposed

here

for

LO

is

based

on

the

principle

of

abstract

interpretation

and

partial

evaluation

We

follow

the

standard

abstract

interpretation

methodology

of

associating

each

program

with

an

abstract

version

this

abstract

program

is

then

executed

in

all

possible

ways

To

be

useful

to

our

purposes

the

design

of

the

abstraction

function

must

obey

the

two

following

requirements

-LRB-

i

-RRB-

the

abstraction

of

a

concrete

execution

of

a

given

program

must

be

an

execution

of

the

abstract

program

-LRB-

ii

-RRB-

the

whole

set

of

possible

executions

of

the

abstract

program

must

be

representable

in

a

finite

structure

-LRB-

called

here

a

partial

evaluation

graph

-RRB-

Abstract

Interpretation

The

Abstraction

Mapping

Atoms

encode

the

computational

resources

manipulated

by

the

agents

during

the

execution

and

form

the

basic

building

block

of

LO

syntax

The

abstraction

mapping

written

o

is

first

defined

on

atoms

and

then

extended

to

all

the

other

objects

of

the

language

-LRB-

programs

contexts

etc.

-RRB-

The

most

important

characteristic

of

o

is

that

it

maps

the

-LRB-

possibly

-RRB-

infinite

set

of

atoms

occurring

in

a

program

into

a

finite

set

In

concrete

LO

programs

atoms

appear

as

tagged

tuples

of

the

form

p

-LRB-

an

-RRB-

where

the

arguments

an

belong

to

a

given

set

of

values

and

the

tag

p

belongs

to

a

given

set

of

predicates

Each

predicate

is

supposed

to

have

a

fixed

arity

This

structure

allows

programs

to

be

written

as

finite

sets

of

program

moulds

which

have

the

same

syntax

as

program

formulae

except

that

atoms

occur

in

the

form

p

-LRB-

xn

-RRB-

where

xn

belong

to

a

given

set

of

variable

names

A

mould

built

from

such

atoms

encodes

the

set

of

program

formulae

obtained

by

consistently

replacing

each

variable

name

in

the

mould

by

a

value

-LRB-

this

operation

is

called

instantiation

-RRB-

Therefore

if

the

set

of

values

is

infinite

the

concrete

program

which

consists

of

all

the

possible

instances

of

the

moulds

from

which

it

is

defined

is

also

infinite

and

the

selection

of

a

program

formula

for

a

transition

consists

in

fact

of

two

parts

selection

of

a

mould

and

selection

of

an

instantiation

for

its

variables

See

-LSB-

-RSB-

for

an

exact

description

of

the

instantiation

mechanism

of

LO

different

from

standard

unification

but

which

is

not

directly

relevant

to

the

purpose

of

this

paper

When

the

program

is

specified

from

a

set

of

moulds

a

natural

choice

for

the

abstraction

function

o

consists

of

mapping

each

atom

into

its

predicate

-LRB-

with

the

associated

arity

-RRB-

we

shall

refer

to

such

a

function

as

a

canonical

abstraction

Given

that

the

set

of

moulds

defining

the

program

is

finite

and

that

instantiating

a

mould

with

values

does

not

modify

the

predicates

which

occur

in

it

the

possibly

infinite

set

of

atoms

occurring

in

the

concrete

program

is

always

mapped

by

a

canonical

abstraction

mapping

into

a

finite

set

of

predicates

Abstraction

of

Programs

Contexts

and

Proofs

We

give

here

a

formal

definition

of

the

notion

of

abstraction

mapping

Definition

An

abstraction

mapping

is

a

function

o

defined

on

the

syntactic

constructs

of

LO

-LRB-

atoms

program

and

resource

formulae

programs

contexts

proofs

etc.

-RRB-

such

that

ffl

The

set

A

of

abstract

atoms

obtained

by

applying

o

to

concrete

atoms

is

finite

can

of

course

think

of

situations

where

tuples

are

untagged

i.e.

are

not

associated

with

any

predicate

name

this

is

for

instance

the

case

in

the

Gamma

model

-LSB-

-RSB-

or

in

Linda

-LSB-

-RSB-

In

this

case

the

canonical

abstraction

function

would

just

map

each

tuple

into

its

arity

but

would

not

be

very

useful

ffl

The

abstraction

o

-LRB-

E

-RRB-

of

a

syntactic

construct

E

is

obtained

by

consistently

replacing

in

E

each

occurrence

of

an

atom

A

by

its

abstraction

o

-LRB-

A

-RRB-

An

immediate

consequence

of

this

definition

is

that

an

abstraction

mapping

preserves

the

syntactic

category

of

the

constructs

to

which

it

applies

This

is

obvious

for

program

and

resource

formulae

programs

and

contexts

it

also

holds

for

proofs

since

the

notion

of

proof

commutes

with

the

notion

of

abstraction

Indeed

the

abstraction

of

a

concrete

proof

based

on

a

program

P

is

an

abstract

proof

based

on

the

abstraction

of

the

program

P

More

formally

Proposition

Let

Pr

-LRB-

P

-RRB-

be

the

set

of

proofs

based

on

a

program

P.

Then

for

all

abstraction

mapping

o

o

-LRB-

Pr

-LRB-

P

-RRB-

-RRB-

Pr

-LRB-

o

-LRB-

P

-RRB-

-RRB-

This

property

derives

from

the

fact

that

each

instance

of

any

inference

figure

of

LO

is

mapped

by

abstraction

into

an

instance

of

the

same

figure

-LRB-

using

the

abstraction

of

the

applied

program

formula

in

the

case

of

the

progression

inference

figure

-RRB-

We

now

assume

that

even

though

the

concrete

program

may

be

infinite

-LRB-

as

in

the

case

of

a

program

generated

by

moulds

described

in

the

previous

section

-RRB-

there

is

a

finite

global

bound

to

the

number

of

occurrences

of

connectives

in

each

program

formula

of

the

program

-LRB-

this

is

obviously

the

case

for

a

program

generated

by

a

finite

set

of

moulds

-RRB-

Consequently

there

is

only

a

finite

number

of

program

formulae

which

can

be

built

from

this

finite

number

of

occurrences

of

connectives

and

the

finite

set

of

abstract

atoms

Hence

Proposition

The

abstraction

of

a

program

is

always

a

finite

set

-LRB-

of

abstract

program

formulae

-RRB-

But

this

does

not

mean

that

the

number

of

proofs

based

on

the

abstract

program

is

finite

In

fact

there

might

be

infinitely

many

possible

abstract

proofs

based

on

the

same

finite

abstract

program

which

we

want

to

represent

in

a

finite

way

by

approximation

The

approximation

mechanism

described

in

the

next

section

relies

on

the

structure

of

the

set

of

flat

abstract

contexts

Each

flat

abstract

context

is

a

finite

multiset

of

abstract

atoms

and

hence

multiset

inclusion

induces

a

lattice

structure

on

flat

abstract

contexts

In

order

to

have

a

complete

lattice

with

a

notion

of

limit

and

hence

a

mechanism

for

approximation

we

work

on

sorts

instead

of

finite

multisets

A

sort

is

taken

here

to

be

a

possibly

infinite

multiset

of

abstract

atoms

Formally

let

A

be

the

-LRB-

finite

-RRB-

set

of

abstract

atoms

Let

-LSB-

be

the

set

of

natural

integers

together

with

the

value

infinity

Definition

A

sort

is

a

mapping

A

For

each

abstract

atom

a

A

the

number

-LRB-

a

-RRB-

denotes

the

-LRB-

possibly

infinite

-RRB-

number

of

occurrences

of

a

in

the

sort

Properties

of

Sorts

Let

o

be

the

set

of

sorts

It

is

equipped

with

an

operation

of

addition

and

a

partial

order

relation

derived

in

a

natural

way

from

those

of

for

all

o

A

-LRB-

-RRB-

-LRB-

a

-RRB-

-LRB-

a

-RRB-

-LRB-

a

-RRB-

if

and

only

if

A

-LRB-

a

-RRB-

-LRB-

a

-RRB-

The

addition

-LRB-

which

is

identical

to

multiset

union

in

the

case

of

finite

sorts

-RRB-

defines

a

monoid

over

o

and

the

partial

order

defines

a

complete

lattice

Indeed

Proposition

Any

set

of

sorts

ae

o

has

a

lowest

upper

bound

-LRB-

t

-RRB-

and

a

greatest

lower

bound

-LRB-

u

-RRB-

defined

by

A

ae

-LRB-

t

-RRB-

-LRB-

a

-RRB-

maxf

-LRB-

a

-RRB-

s.t.

g

-LRB-

u

-RRB-

-LRB-

a

-RRB-

minf

-LRB-

a

-RRB-

s.t.

g

The

max

and

min

operations

are

totally

defined

here

since

any

subset

of

has

a

maximum

and

a

minimum

element

Furthermore

we

make

use

later

on

in

an

essential

way

of

the

following

property

of

the

lattice

of

sorts

Theorem

For

any

infinite

sequence

-LRB-

n

-RRB-

of

sorts

there

exists

indices

p

q

such

that

p

q

and

p

q

This

property

is

proved

in

appendix

A.

Notice

the

importance

in

the

proof

of

the

assumption

that

the

set

A

of

abstract

atoms

is

finite

Without

such

an

assumption

the

theorem

does

not

hold

if

for

instance

A

were

then

a

counterexample

would

be

given

by

the

sequence

-LRB-

n

-RRB-

where

n

-LRB-

n

-RRB-

and

n

-LRB-

m

-RRB-

for

m

n.

Partial

Evaluation

Having

specified

in

the

previous

section

the

abstract

interpretation

mapping

o

we

now

wish

to

perform

an

execution

at

the

abstract

level

In

order

to

separate

problems

we

first

assume

that

the

program

formulae

of

the

abstract

program

do

not

make

use

of

the

broadcast

marker

and

that

the

initial

context

is

fully

specified

and

we

show

afterwards

that

the

analysis

obtained

with

this

restriction

can

still

be

useful

in

the

general

case

Our

aim

is

to

represent

in

a

finite

way

all

the

possible

executions

of

a

given

abstract

program

call

In

other

words

given

a

finite

abstract

program

P

-LRB-

with

no

broadcast

marker

-RRB-

and

a

-LRB-

fully

specified

-RRB-

initial

abstract

context

i.e.

a

sort

o

we

want

to

build

a

finite

representation

of

the

set

of

possible

proofs

of

o

with

respect

to

P.

The

total

evaluation

tree

There

may

be

more

than

one

proof

with

o

as

conclusion

corresponding

to

the

selection

of

different

program

formulae

at

each

step

of

the

execution

We

encode

all

these

choices

-LRB-

and

hence

all

the

possible

proofs

-RRB-

into

a

single

structure

called

the

total

evaluation

tree

which

is

a

-LRB-

usually

infinite

-RRB-

and-or

tree

Informally

the

outgoing

edges

from

or-nodes

correspond

to

choices

of

applicable

program

formulae

and

those

of

and-nodes

correspond

to

the

decomposition

of

the

output

part

of

the

selected

program

formula

Formally

the

total

evaluation

tree

ThP

oi

with

respect

to

an

abstract

program

P

and

a

sort

o

is

the

smallest

-LRB-

usually

infinite

-RRB-

tree

verifying

the

following

requirements

ffl

Each

or-node

is

labeled

with

a

sort

Each

and-node

is

labeled

with

a

pair

h

Ri

consisting

of

a

sort

and

a

resource

formula

R.

ffl

The

root

is

an

or-node

labeled

with

o.

ffl

From

each

or-node

and

for

each

program

formula

with

input

part

h

-LRB-

strictly

speaking

h

is

the

multiset

of

atoms

occurring

in

the

input

part

of

the

formula

-RRB-

and

output

part

R

such

that

h

there

is

an

edge

to

an

and-node

h

Ri

ffl

From

each

and-node

h

Ri

and

for

each

par-component

r

of

R

there

is

an

edge

to

an

or-node

r.

Now

an

execution

can

be

modeled

as

an

exploration

of

the

total

evaluation

tree

by

a

set

of

agents

When

an

agent

reaches

an

or-node

it

selects

non-deterministically

one

outgoing

edge

to

proceed

Given

that

we

have

adopted

a

committed

choice

strategy

there

is

no

backtrack

and

we

further

assume

that

there

is

at

least

one

outgoing

edge

from

all

or-nodes

-LRB-

no

failure

-RRB-

At

an

and-node

the

agent

also

selects

an

outgoing

edge

to

proceed

but

spawns

copies

of

itself

which

start

exploring

the

other

outgoing

edges

-LRB-

if

any

-RRB-

If

there

is

no

outgoing

edge

at

all

then

the

agent

simply

terminates

Total

evaluation

trees

are

characterized

by

the

following

two

important

properties

p

ffi

r

q

ffi

r

r

ffi

r

ffi

p

q

A

Prolog-like

program

p

q

r

p

r

r

q

r

r

p

q

r

p

r

q

r

Figure

The

infinite

total-evaluation

tree

-LRB-

left

-RRB-

is

represented

as

a

finite

partial-evaluation

graph

-LRB-

right

-RRB-

Proposition

For

all

abstract

program

P

and

sort

the

total

evaluation

tree

ThP

i

has

a

bounded

branching

factor

This

is

a

direct

consequence

of

the

fact

that

abstract

programs

contain

only

finitely

many

program

formulae

and

the

output

part

of

each

program

formula

has

finitely

many

par-components

Therefore

both

and-nodes

and

or-nodes

in

the

tree

have

a

bounded

number

of

outgoing

edges

As

a

corollary

we

have

Corollary

A

total

evaluation

tree

is

infinite

if

and

only

if

it

has

an

infinite

branch

This

directly

follows

from

the

previous

proposition

by

Konig

's

lemma

stating

that

any

tree

with

a

bounded

branching

factor

is

infinite

only

if

it

has

an

infinite

branch

The

aim

of

the

partial

evaluation

is

to

build

a

finite

representation

of

the

possibly

infinite

total

evaluation

trees

The

basic

idea

is

to

show

that

the

infinite

branches

of

a

total

evaluation

tree

always

contain

some

regularity

patterns

and

can

thus

be

finitely

encoded

using

these

patterns

An

elementary

illustration

of

this

technique

is

given

by

the

case

of

a

program

containing

no

occurrence

of

the

connective

and

where

the

initial

sort

is

reduced

to

a

single

atom

-LRB-

see

Fig.

-RRB-

thus

the

situation

reminds

directly

of

a

query

in

a

Prolog-like

language

In

this

case

it

is

easy

to

see

that

each

or-node

in

the

total

evaluation

tree

is

labeled

with

a

single

atom

As

the

number

of

atoms

is

finite

an

infinite

branch

in

this

tree

contains

necessarily

two

or-nodes

labeled

with

the

same

atom

Now

the

subtree

at

is

identical

to

the

subtree

at

Hence

the

incoming

edge

at

can

be

redirected

to

-LRB-

assuming

is

closer

to

the

root

than

-RRB-

and

the

infinite

branch

disappears

Thus

the

possibly

infinite

total

evaluation

tree

is

mapped

into

a

finite

partial

evaluation

graph

where

infinite

branches

are

replaced

by

cycles

-LRB-

see

Fig.

-RRB-

We

make

the

following

conventions

for

the

graphical

representation

of

the

evaluation

trees

an

or-node

labeled

with

a

sort

is

represented

as

a

round

box

containing

an

and-node

labeled

with

the

pair

h

Ri

is

represented

as

a

square

box

divided

in

two

zones

by

a

vertical

bar

appears

on

the

left-hand

side

while

R

appears

on

the

right-hand

side

of

the

bar

In

the

example

of

Fig.

the

structure

of

the

program

is

such

that

the

left-hand

side

in

an

and-node

is

always

empty

but

obviously

this

does

not

hold

in

general

The

partial

evaluation

graph

When

the

connective

occurs

in

the

program

the

situation

is

more

complex

than

in

the

case

of

Fig.

although

similar

Indeed

as

the

set

of

sorts

is

not

finite

there

might

be

infinite

branches

in

which

all

the

or-nodes

are

labeled

with

pairwise

different

sorts

and

hence

we

can

not

simply

short-cut

such

branches

as

in

Fig.

However

by

considering

the

sequence

of

labels

of

or-nodes

along

infinite

branches

Theorem

informs

us

that

there

exist

necessarily

two

distinct

or-nodes

on

each

infinite

branch

such

that

-LRB-

i

-RRB-

node

is

closer

to

the

root

than

and

-LRB-

ii

-RRB-

the

sorts

labeling

respectively

and

satisfy

the

property

-LRB-

hence

e

for

some

e

-RRB-

This

means

that

the

sub-tree

at

can

be

obtained

from

the

sub-tree

at

by

adding

sort

e

to

all

the

nodes

and

by

possibly

grafting

new

branches

on

to

some

or-nodes

corresponding

to

program

formulae

newly

enabled

by

the

atoms

added

with

e.

Thus

a

new

form

of

regularity

appears

which

we

exploit

to

build

a

finite

representation

of

the

infinite

branch

Definition

A

cycle

node

in

a

total

evaluation

tree

is

an

or-node

labeled

with

a

sort

such

that

there

exists

an

or-node

closer

to

the

root

on

the

same

branch

and

labeled

with

a

sort

such

that

The

node

closest

to

the

root

and

satisfying

this

property

is

then

called

the

basis

of

the

cycle

node

If

the

labels

of

and

are

different

-LRB-

hence

OE

-RRB-

then

the

cycle

node

is

said

to

be

strict

We

build

the

finite

representation

of

the

total

evaluation

tree

in

two

steps

We

first

build

the

partial

evaluation

tree

which

is

identical

to

the

total

evaluation

tree

except

that

the

subtrees

at

the

cycle

nodes

are

pruned

The

algorithm

for

building

the

partial

evaluation

tree

is

given

in

Fig.

It

incrementally

expands

the

nodes

in

the

usual

way

but

checks

whenever

a

new

node

is

installed

whether

it

is

a

cycle

node

in

this

case

the

node

is

not

expanded

For

example

in

the

total

evaluation

tree

of

Fig.

-LRB-

left

-RRB-

the

or-node

q

r

s

is

a

-LRB-

strict

-RRB-

cycle

node

whose

basis

is

the

or-node

q

r.

Hence

in

the

partial

evaluation

tree

the

subtree

at

node

q

r

s

-LRB-

denoted

on

the

figure

with

dashed

lines

-RRB-

is

not

built

The

same

applies

to

the

non-strict

cycle

node

r

u.

The

partial

evaluation

graph

is

then

obtained

from

the

partial

evaluation

tree

by

elimination

of

the

cycle

nodes

-LRB-

which

have

not

been

expanded

-RRB-

Non-strict

cycle

nodes

-LRB-

which

by

definition

have

the

same

label

as

their

basis

-RRB-

are

eliminated

in

the

usual

way

by

redirecting

their

incoming

edge

to

their

basis

In

the

example

of

Fig.

that

would

be

the

case

of

the

cycle

node

r

u

The

treatment

of

strict

cycle

nodes

is

a

bit

more

complex

and

relies

on

the

idea

of

generalization

explained

below

The

Generalization

Step

Let

be

a

strict

cycle

node

-LRB-

labeled

with

-RRB-

and

let

be

its

basis

-LRB-

labeled

with

-RRB-

By

definition

there

is

a

non

empty

sort

e

such

that

e

The

sequence

of

program

formulae

applied

from

to

reach

can

also

be

applied

from

except

that

the

label

at

each

node

in

the

sequence

will

now

be

augmented

by

e

thus

leading

to

another

or-node

labeled

with

e.

By

reiterating

this

operation

we

show

that

there

is

always

an

infinite

branch

stemming

from

any

cycle

node

in

the

total

evaluation

tree

and

containing

a

sequence

-LRB-

n

-RRB-

of

nodes

such

that

each

n

is

labeled

with

n

e

The

subtree

at

n

is

derived

from

the

subtree

at

n

by

adding

e

to

all

the

nodes

and

possibly

grafting

new

branches

enabled

by

these

added

atoms

Clearly

as

the

number

of

edges

stemming

from

an

or-node

p

ffi

q

r

q

ffi

-LRB-

s

t

-RRB-

u

r

s

ffi

r

t

ffi

r

q

r

u

ffi

r

u

t

-RRB-

u

-LRB-

s

t

q

r

s

r

ur

s

t

p

q

r

r

q

r

p

q

r

q

r

r

s

t

s

t

t

-RRB-

u

-LRB-

sr

s

r

s

u

q

r

s

s

r

q

r

u

r

u

q

s

r

qs

s

u

s

r

u

generalization

link

non-strict

cyclenode

strictcyclenode

Figure

The

infinite

total-evaluation

tree

-LRB-

left

-RRB-

is

represented

as

a

finite

partial-evaluation

graph

-LRB-

right

-RRB-

Function

pevtree

returns

the

partial

evaluation

tree

Let

be

the

tree

reduced

to

a

single

or-node

o

labeled

with

o

Call

expand

-LRB-

o

-RRB-

Return

Procedure

expand

-LRB-

open

or-node

in

-RRB-

Let

be

the

sort

labeling

If

there

exists

an

or-node

closer

to

the

root

on

the

same

branch

as

and

labeled

with

a

sort

b

Then

Mark

as

a

cycle

node

Else

Foreach

program

formula

P

in

the

program

Do

Let

h

be

the

input

part

of

P

and

R

its

output

part

If

h

for

some

sort

Then

Create

an

edge

from

to

a

new

and-node

R

labeled

with

h

Ri

Foreach

par-component

r

of

R

Do

Create

an

edge

from

R

to

a

new

or-node

labeled

with

the

sort

r

Call

expand

-LRB-

-RRB-

Figure

The

algorithm

for

building

the

partial

evaluation

tree

Function

pevgraph

returns

the

partial

evaluation

graph

pevtree

-LRB-

-RRB-

Loop

Redirect

the

incoming

edge

of

each

non-strict

cycle

node

in

to

its

basis

If

does

not

contain

any

strict

cycle

node

Then

Return

Else

Select

one

strict

cycle

node

in

Call

generalize

-LRB-

-RRB-

Procedure

generalize

-LRB-

strict

cycle

node

in

-RRB-

Let

be

the

basis

of

the

cycle

node

Let

be

the

labels

at

respectively

and

By

hypothesis

OE

and

hence

there

exists

a

sort

e

such

that

e

Discard

the

subtree

at

node

Turn

into

a

gen-node

with

the

same

label

Create

an

edge

to

a

new

or-node

e

labeled

with

the

sort

e

Call

expand

-LRB-

e

-RRB-

Figure

The

algorithm

for

building

the

partial

evaluation

graph

is

bounded

by

the

-LRB-

finite

-RRB-

number

of

program

formulae

in

the

program

beyond

a

sufficiently

large

value

of

n

no

grafting

is

needed

so

that

the

subtree

at

n

is

strictly

isomorphic

to

that

at

n

-LRB-

modulo

e

-RRB-

When

n

the

adjunction

of

e

becomes

negligible

so

that

the

subtree

at

n

is

identical

to

the

subtree

at

n

and

this

regularity

can

be

captured

in

the

usual

way

by

redirecting

the

incoming

edge

of

n

to

n

The

infinite

branch

of

the

total

evaluation

tree

can

thus

be

finitely

represented

in

the

partial

evaluation

graph

by

an

asymptotic

cycle

To

formalize

this

idea

we

introduce

the

following

operation

on

sorts

Definition

For

any

sort

we

take

to

be

the

sort

containing

infinitely

many

occurrences

of

each

element

of

Formally

A

-LRB-

a

-RRB-

if

-LRB-

-LRB-

a

-RRB-

-RRB-

then

else

Notice

that

any

sort

satisfies

We

can

now

formulate

the

treatment

of

strict

cycle

nodes

in

the

partial

evaluation

tree

let

be

the

label

of

a

strict

cycle

node

whose

basis

is

labeled

with

-LRB-

hence

e

for

some

e

-RRB-

We

transform

into

a

new

kind

of

node

called

a

gen-node

-LRB-

generalization

node

-RRB-

still

labeled

with

and

represented

graphically

by

an

hexagon

From

we

draw

an

edge

-LRB-

called

a

generalization

link

-RRB-

to

a

new

or-node

e

labeled

with

e

This

link

captures

in

one

step

any

number

of

steps

along

the

infinite

branch

-LRB-

n

-RRB-

The

label

e

is

the

lowest

upper

bound

of

all

the

labels

at

n

-LRB-

i.e.

n

e

-RRB-

G

n

-LRB-

n

e

-RRB-

e

The

node

e

is

then

expanded

in

the

usual

way

The

sequence

of

program

formulae

leading

from

to

will

now

lead

from

e

to

e

but

these

two

sorts

are

identical

Indeed

e

e

e

e

Hence

the

strict

cycle

node

has

been

mapped

in

this

way

into

a

non-strict

one

which

can

be

eliminated

in

the

usual

way

by

introducing

a

cycle

in

the

graph

The

partial

evaluation

graph

is

obtained

by

recursively

applying

this

generalization

procedure

to

all

the

strict

cycle

nodes

of

the

partial

evaluation

tree

The

formal

specification

of

the

algorithm

for

building

the

partial

evaluation

graph

is

given

in

Fig.

Fig.

-LRB-

right

-RRB-

shows

the

result

obtained

with

a

sample

program

The

leaf

q

r

s

in

the

partial

evaluation

tree

is

a

strict

cycle

node

with

basis

q

r

-LRB-

here

e

s

-RRB-

Hence

the

basis

node

q

r

is

transformed

into

a

gen-node

and

linked

to

an

or-node

q

r

s

Now

the

expansion

of

this

latter

node

yields

only

non-strict

cycle

nodes

q

r

s

and

r

s

u

which

result

in

the

two

cycles

of

the

graph

-LRB-

Fig.

right

-RRB-

Theorem

The

algorithms

pevtree

-LRB-

Fig.

-RRB-

and

pevgraph

-LRB-

Fig.

-RRB-

always

terminate

It

is

plain

that

the

algorithm

building

the

partial

evaluation

tree

-LRB-

Fig.

-RRB-

terminates

since

by

theorem

it

must

reach

a

cycle

node

-LRB-

or

a

termination

node

-RRB-

on

all

branches

after

a

finite

number

of

expansions

and

hence

stop

The

algorithm

building

the

partial

evaluation

graph

-LRB-

Fig.

-RRB-

also

terminates

since

its

only

possible

source

of

non

termination

is

the

loop

which

performs

the

generalizations

but

this

loop

must

stop

after

a

finite

number

of

performances

Indeed

the

number

of

possible

generalizations

along

a

branch

is

bounded

by

the

-LRB-

finite

-RRB-

number

of

atoms

once

generalization

has

been

performed

on

all

the

atoms

we

obtain

a

node

labeled

with

the

maximal

sort

A

-LRB-

where

all

atoms

have

infinitely

many

occurrences

-RRB-

and

the

expansion

of

this

node

yields

only

non-strict

cycle

nodes

since

application

of

any

program

formula

on

A

returns

A

itself

Of

course

the

partial

evaluation

graph

obtained

in

this

case

is

not

very

informative

Notice

that

the

algorithm

for

building

the

partial

evaluation

graph

-LRB-

Fig.

-RRB-

could

easily

be

modified

for

improved

efficiency

For

example

in

a

generalization

step

it

would

be

more

efficient

to

try

to

reuse

-LRB-

at

least

in

part

-RRB-

the

already

computed

expansion

of

the

basis

of

the

cycle

node

instead

of

expanding

from

scratch

the

generalization

node

Another

improvement

could

come

from

a

subsumption

test

it

is

of

no

use

to

expand

a

node

if

a

weaker

-LRB-

or

identical

-RRB-

node

has

already

been

expanded

in

another

branch

Finally

the

computation

of

the

partial

evaluation

graph

can

be

made

parallel

in

exactly

the

same

way

as

the

concrete

execution

This

process

can

thus

be

viewed

as

a

parallel

compilation

Exploitation

of

the

Results

In

the

previous

section

we

have

shown

how

given

an

abstraction

mapping

o

for

the

atoms

of

the

program

satisfying

some

criteria

we

can

build

a

finite

representation

of

the

set

of

all

possible

abstract

executions

We

now

apply

this

technique

to

improve

the

naive

execution

model

described

in

section

The

main

information

that

we

retrieve

from

the

partial

evaluation

graph

concerns

the

cardinality

of

the

different

resources

at

the

various

stages

of

the

concrete

execution

This

information

is

mainly

used

to

deal

with

the

two

major

bottlenecks

mentioned

in

section

concerning

respectively

multiset

matching

and

broadcasting

Multiset

Matching

and

Broadcasting

Let

hP

Roi

be

a

concrete

LO

program

call

P

is

a

program

possibly

containing

broadcast

markers

and

Ro

is

a

resource

formula

both

P

and

Ro

are

concrete

We

may

assume

with

no

loss

of

generality

that

Ro

is

an

atom

ao

-LRB-

otherwise

introduce

a

new

atom

ao

and

the

program

formula

ao

ffi

Ro

-RRB-

Concrete

Execution

As

program

formulae

in

P

may

contain

the

broadcast

marker

and

the

initial

context

contains

an

unspecified

part

to

which

we

refer

in

this

section

as

the

forum

filled

in

at

run-time

by

the

broadcast

mechanism

the

static

analysis

technique

developed

in

the

previous

section

which

ignores

the

use

of

the

broadcast

mechanism

can

not

be

applied

directly

However

even

though

the

forum

is

unspecified

we

can

precompute

its

abstraction

or

at

least

approximate

it

Consider

the

set

of

atoms

prefixed

with

the

broadcast

marker

in

the

concrete

program

At

any

time

during

the

execution

the

forum

may

contain

only

atoms

from

that

set

and

hence

the

abstract

forum

contains

only

atoms

from

the

abstraction

of

that

set

which

is

a

precomputable

sort

F

Therefore

F

is

an

upper

bound

of

the

abstraction

of

the

forum

at

any

time

during

the

execution

Thus

we

can

build

the

partial

evaluation

graph

G

of

the

abstraction

of

the

program

P

-LRB-

forgetting

the

broadcast

marker

-RRB-

with

the

initial

sort

o

ao

F

The

agents

evolving

in

the

concrete

execution

are

mapped

by

abstraction

into

corresponding

agents

navigating

through

the

graph

G

The

label

at

each

node

in

G

informs

us

on

the

structure

of

the

state

of

any

agent

traversing

that

node

For

instance

if

the

label

of

a

node

is

p

q

it

means

that

the

state

of

any

agent

traversing

a

context

of

form

p

q

i.e.

it

is

composed

of

a

p

and

an

unknown

number

of

q

's

Notice

that

no

information

about

the

cardinality

of

the

q

's

can

be

inferred

from

the

graph

Indeed

the

generalization

procedure

presented

in

the

previous

section

as

well

as

the

initial

approximation

on

the

forum

consist

of

replacing

an

information

on

the

exact

number

of

occurrences

of

an

atom

by

an

upper

bound

-LRB-

-RRB-

thus

loosing

cardinality

information

Multiset

Matching

In

the

naive

execution

scheme

agent

states

i.e.

contexts

are

represented

as

simple

lists

-LRB-

whatever

their

actual

implementation

be

it

arrays

chains

of

pointers

hashtables

etc.

-RRB-

and

each

atom

of

the

trigger

of

each

program

formula

must

be

matched

against

each

atom

in

the

list

This

requires

costly

exploration

of

a

large

number

of

alternatives

-LRB-

the

non-deterministic

phenomenon

mentioned

in

the

introduction

-RRB-

Now

a

more

efficient

multiset

matching

can

be

achieved

by

exploiting

the

structural

information

provided

by

the

graph

G.

For

example

it

is

useless

to

try

a

program

formula

containing

in

its

trigger

more

that

one

p

or

an

r

different

from

p

and

q

against

a

context

p

q

the

matching

would

necessarily

fail

Furthermore

if

the

trigger

of

the

program

formula

does

contain

a

single

p

it

is

no

use

to

match

it

against

any

of

the

q

's

of

the

context

matching

can

be

done

directly

with

the

unique

p

of

the

context

More

generally

one

can

attach

to

each

sort

occurring

in

G

a

static

data-structure

together

with

optimized

procedures

to

access

its

content

For

example

the

data

structure

for

a

sort

p

q

r

s

could

be

expression

a

p

where

p

is

an

abstract

atom

means

a

concrete

atom

whose

abstraction

is

p

Moreover

the

expression

a

context

is

of

sort

-LRB-

for

short

a

context

is

-RRB-

where

is

a

sort

means

that

for

each

atom

a

if

-LRB-

a

-RRB-

is

a

finite

number

n

then

the

context

contains

exactly

n

occurrences

of

a

's

no

constraint

is

imposed

if

-LRB-

a

-RRB-

is

a

quadruple

of

pointers

to

respectively

the

unique

p

the

unique

q

the

list

of

r

's

and

the

list

of

s

's

The

set

of

abstractly

applicable

program

formulae

can

also

be

precomputed

and

attached

to

so

that

no

program

formula

incompatible

-LRB-

at

the

abstract

level

-RRB-

with

will

be

tested

at

run-time

for

applicability

Finally

the

actual

code

for

matching

the

trigger

of

each

-LRB-

abstractly

applicable

-RRB-

program

formula

with

the

context

presented

in

the

data

structure

can

also

be

precomputed

This

code

makes

use

of

the

optimized

access

functions

to

the

data

structure

Clearly

an

essential

improvement

in

multiset

matching

is

achieved

with

atoms

for

which

a

cardinality

information

is

available

-LRB-

such

as

p

or

q

above

-RRB-

For

the

other

atoms

-LRB-

i.e.

r

and

s

above

-RRB-

full

multiset

matching

is

still

required

possibly

using

optimized

algorithms

such

as

the

Rete

algorithm

-LSB-

-RSB-

-LRB-

such

algorithms

must

therefore

not

be

considered

as

exclusive

with

our

approach

but

rather

as

complementary

-RRB-

Notice

though

that

a

slight

improvement

is

obtained

even

in

the

latter

case

with

respect

to

blind

multiset

matching

as

we

can

separate

the

treatment

of

r-atoms

from

that

of

s-atoms

-LRB-

in

a

Rete

network

they

correspond

to

separate

entry

points

-RRB-

Broadcasting

The

partial

evaluation

graph

can

also

be

used

for

a

message

flow

analysis

aimed

at

improving

the

broadcasting

mechanism

Messages

are

atoms

which

may

appear

in

the

forum

i.e.

which

occur

in

some

program

formula

prefixed

with

the

broadcast

marker

When

an

agent

receives

a

message

it

may

be

unable

to

process

it

immediately

by

applying

a

program

formula

whose

trigger

contains

this

message

But

this

does

not

mean

that

the

message

can

be

discarded

since

it

may

happen

that

later

after

a

change

of

state

of

the

agent

the

message

can

be

processed

This

normally

requires

a

memorization

of

all

the

messages

which

rapidly

becomes

unmanageable

-LRB-

the

saturation

phenomenon

mentioned

in

the

introduction

-RRB-

The

message

flow

analysis

consists

of

determining

for

each

node

in

G

and

for

each

abstract

message

whether

there

is

a

transition

from

or

from

some

node

reachable

from

which

involves

the

given

message

A

node

is

reachable

from

a

node

if

there

is

a

-LRB-

directed

-RRB-

path

from

to

in

G

More

precisely

we

propose

to

compute

here

for

each

node

in

G

the

set

M

-LRB-

-RRB-

of

-LRB-

abstract

-RRB-

messages

which

can

be

consumed

by

an

agent

at

node

or

at

any

node

reachable

from

A

message

m

is

consumed

at

an

or-node

if

there

is

a

program

formula

applicable

at

that

node

and

containing

the

message

m

in

its

trigger

A

strictly

similar

procedure

could

be

devised

to

compute

the

messages

which

are

produced

at

a

node

or

at

some

node

reachable

from

The

algorithm

for

computing

the

set

M

-LRB-

-RRB-

is

a

simple

fix-point

procedure

computable

by

propagation

in

the

graph

Procedure

message-flow

Foreach

or-node

Do

M

-LRB-

-RRB-

the

set

of

-LRB-

abstract

-RRB-

messages

consumed

at

node

Foreach

and-node

and

gen-node

Do

M

-LRB-

-RRB-

Loop

If

there

is

an

edge

from

a

node

to

a

node

in

G

such

that

M

-LRB-

-RRB-

M

-LRB-

-RRB-

Then

M

-LRB-

-RRB-

M

-LRB-

-RRB-

-LSB-

M

-LRB-

-RRB-

Else

Return

Theorem

The

algorithm

message-flow

always

terminates

This

follows

from

the

fact

that

at

each

performance

of

the

Loop

part

one

set

M

-LRB-

-RRB-

is

strictly

increased

while

the

others

remain

unchanged

whereas

all

the

sets

M

-LRB-

-RRB-

are

limited

in

size

by

the

finite

set

of

-LRB-

abstract

-RRB-

messages

Several

optimizations

can

be

achieved

from

this

analysis

For

example

when

a

node

never

makes

use

of

a

message

m

i.e.

m

M

-LRB-

-RRB-

then

it

is

no

use

to

deliver

m

's

to

any

agent

at

node

Possibly

if

this

exception

is

costly

to

implement

then

the

agent

may

still

receive

m

's

and

discard

them

immediately

upon

reception

Furthermore

it

is

easy

to

determine

from

the

graph

if

a

node

in

G

can

be

visited

by

several

agents

at

the

same

time

-LRB-

such

nodes

are

called

multi-instance

as

opposed

to

single-instance

nodes

-RRB-

a

node

is

multi-instance

if

there

is

an

and-node

such

that

there

are

two

paths

from

to

starting

with

two

different

outgoing

edges

from

indeed

the

two

edges

of

the

and-node

correspond

to

a

duplication

of

the

agent

and

the

two

clones

might

then

reach

at

the

same

time

This

analysis

helps

determine

for

each

abstract

message

whether

it

has

a

single

or

multiple

emission

or

reception

point

-LRB-

s

-RRB-

In

some

cases

adequate

specialized

point-to-point

message

channels

can

then

be

installed

in

place

of

the

general

broadcast

mechanism

An

Example

The

program

parse

of

Fig.

is

a

concurrent

implementation

of

the

optimized

parsing

methodology

for

context-free

grammars

known

as

the

Earley

algorithm

This

program

has

already

been

presented

in

detail

in

-LSB-

-RSB-

and

its

principle

will

only

be

outlined

here

It

is

but

an

example

from

the

large

domain

of

optimal

algorithms

based

on

the

operations

research

technique

of

dynamic

programming

which

find

in

LO

an

elegant

framework

for

concurrent

object-oriented

implementations

see

also

-LSB-

-RSB-

for

other

examples

Notice

that

in

the

program

formulae

of

Fig.

the

LO

operators

and

ffi

are

replaced

with

the

keyboard

typable

symbols

t

and

used

in

the

actual

implementations

of

we

also

use

the

standard

infix

notation

for

representing

lists

Our

purpose

here

is

to

illustrate

on

this

example

of

reasonable

size

the

mechanisms

of

abstract

interpretation

presented

in

the

previous

sections

The

initial

program

call

considered

here

is

composed

of

the

program

parse

and

the

single

goal

main

Furthermore

it

is

assumed

that

some

other

agents

corresponding

to

actual

users

not

described

in

the

program

have

the

following

behavior

ffl

One

user

can

broadcast

a

message

of

the

form

start

parser

-LRB-

G

D

-RRB-

specifying

a

grammar

G

-LRB-

list

of

rules

-RRB-

and

a

dictionary

D

-LRB-

list

of

entries

-RRB-

This

initiates

the

server

capable

of

processing

parse

requests

Such

an

initialization

message

could

be

for

example

-LRB-

-LSB-

s

-LSB-

np

vp

-RSB-

np

-LSB-

pn

-RSB-

np

-LSB-

det

n

-RSB-

np

-LSB-

np

pp

-RSB-

pp

-LSB-

prep

np

-RSB-

vp

-LSB-

tv

np

-RSB-

vp

-LSB-

iv

-RSB-

vp

-LSB-

vp

pp

-RSB-

-RSB-

-LSB-

det-the

det-a

pn-terry

pn-shrdlu

n-program

n-robot

n-telescope

prep-with

iv-halts

tv-writes

tv-saw

tv-is

-RSB-

-RRB-

ffl

Users

can

then

broadcast

parse

requests

of

the

form

parse

-LRB-

Q

S

C

-RRB-

where

Q

is

a

-LRB-

unique

-RRB-

identifier

of

the

request

and

S

is

the

sentence

to

be

parsed

according

to

category

C.

For

example

a

request

could

be

parse

-LRB-

-LSB-

terry

saw

a

robot

with

a

telescope

-RSB-

s

-RRB-

ffl

The

server

reacts

to

such

requests

by

broadcasting

answers

of

the

form

answer

-LRB-

Q

T

-RRB-

where

Q

is

the

identifier

of

the

request

and

T

is

the

structure

of

the

sentence

specified

in

the

request

There

may

be

zero

one

or

several

answer

-LRB-

s

-RRB-

to

the

same

request

For

the

sample

request

above

there

are

two

answers

one

of

which

is

date

there

are

two

such

implementations

one

is

based

on

the

Prolog

environment

Sepia

and

the

other

on

the

environment

In

both

cases

LO

is

used

to

extend

the

functionalities

of

preexisting

programming

environments

according

to

an

implementation

strategy

along

the

line

of

the

so

called

coordination

languages

-LSB-

-RSB-

global

Initialization

of

the

server

main

-LRB-

G

D

-RRB-

M

grammar

-LRB-

G

-RRB-

dictionary

-LRB-

D

-RRB-

scanner

The

scanner

scanner

parse

-LRB-

Q

S

C

-RRB-

seek

-LRB-

M

C

-RRB-

scan

-LRB-

S

M

-RRB-

target

-LRB-

Q

M

C

-RRB-

scanner

scan

-LRB-

-LSB-

W

S

-RSB-

M

-RRB-

pos

-LRB-

M

-RRB-

word

-LRB-

W

M

N

-RRB-

scan

-LRB-

S

N

-RRB-

scan

-LRB-

-LSB-

-RSB-

N

-RRB-

target

-LRB-

Q

M

C

-RRB-

wait

-LRB-

Q

M

N

C

-RRB-

wait

-LRB-

Q

M

N

C

-RRB-

ctree

-LRB-

M

N

C

T

-RRB-

answer

-LRB-

Q

T

-RRB-

wait

-LRB-

Q

M

N

C

-RRB-

The

dictionary

dictionary

-LRB-

-LSB-

C-W

D

-RSB-

-RRB-

entry

-LRB-

C

W

-RRB-

dictionary

-LRB-

D

-RRB-

dictionary

-LRB-

-LSB-

-RSB-

-RRB-

lexicon

lexicon

entry

-LRB-

C

W

-RRB-

word

-LRB-

W

M

N

-RRB-

ctree

-LRB-

M,N,C,C-W

-RRB-

lexicon

entry

-LRB-

C

W

-RRB-

The

grammar

grammar

-LRB-

-LSB-

-LRB-

C-Cs

-RRB-

G

-RSB-

-RRB-

rule

-LRB-

C

-RRB-

tail

-LRB-

Cs

-RRB-

grammar

-LRB-

G

-RRB-

grammar

-LRB-

-LSB-

-RSB-

-RRB-

t.

rule

-LRB-

C

-RRB-

seek

-LRB-

N

C

-RRB-

pos

-LRB-

N

-RRB-

rule

-LRB-

C

-RRB-

new

-LRB-

N

C

-RRB-

wait

-LRB-

N

C

-RRB-

Creation

and

evolution

of

incomplete

trees

new

-LRB-

N

T

-RRB-

tail

-LRB-

-LSB-

C

Cs

-RSB-

-RRB-

seek

-LRB-

N

C

-RRB-

itree

-LRB-

N

C

T

-RRB-

tail

-LRB-

Cs

-RRB-

new

-LRB-

N

T

-RRB-

tail

-LRB-

-LSB-

-RSB-

-RRB-

wait

-LRB-

M

C

-RRB-

ctree

-LRB-

M

N

C

T

-RRB-

t.

itree

-LRB-

M

C

T

-RRB-

ctree

-LRB-

M

N

C

-RRB-

itree

-LRB-

M

C

T

-RRB-

new

-LRB-

-RRB-

Figure

A

sample

program

an

Earley

parser

for

context-free

grammars

answer

-LRB-

s

-LRB-

np

-LRB-

pn

terry

-RRB-

-RRB-

-LRB-

vp

-LRB-

vp

-LRB-

tv

saw

-RRB-

-LRB-

np

-LRB-

det

a

-RRB-

-LRB-

n

robot

-RRB-

-RRB-

-RRB-

-LRB-

pp

-LRB-

prep

with

-RRB-

-LRB-

np

-LRB-

det

a

-RRB-

-LRB-

n

telescope

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

All

the

information

about

these

three

kinds

of

messages

needed

by

the

abstract

interpretation

procedure

is

contained

in

the

declaration

at

the

beginning

of

the

program

global

This

declares

that

messages

tagged

with

these

three

predicates

are

produced

or/and

consumed

outside

the

program

and

can

occur

asynchronously

in

the

forum

Other

messages

produced

and

consumed

internally

inside

the

program

can

also

occur

in

the

forum

in

the

case

of

program

parse

the

only

internal

messages

determined

by

listing

the

atoms

prefixed

with

the

broadcast

marker

in

the

program

formulae

are

of

the

following

kinds

pos

-LRB-

N

-RRB-

asserts

that

the

constant

N

represents

a

position

in

the

sentence

to

parse

word

-LRB-

M

N

W

-RRB-

asserts

that

the

word

W

lies

between

positions

M

and

N

in

the

sentence

ctree

-LRB-

M

N

C

T

-RRB-

asserts

that

an

item

of

category

C

lies

between

positions

M

and

N

and

its

structure

-LRB-

syntactic

tree

-RRB-

is

given

by

T

seek

-LRB-

N

C

-RRB-

requests

a

search

for

all

items

of

category

C

starting

at

position

N

Consequently

the

abstract

forum

is

approximated

by

F

where

F

is

the

list

of

abstract

internal

as

well

as

external

messages

that

is

here

The

static

analysis

is

therefore

executed

with

the

abstract

program

call

consisting

of

the

abstraction

of

program

parse

-LRB-

where

all

the

broadcast

markers

are

removed

-RRB-

and

the

sort

F

main

The

partial

evaluation

graph

derived

by

this

procedure

is

shown

in

Fig.

For

readability

the

abstract

forum

F

which

is

present

at

all

the

nodes

has

been

omitted

in

the

figure

Moreover

each

and-node

is

simply

labeled

with

the

name

of

the

program

formula

used

to

obtain

it

from

the

previous

or-node

The

names

refer

to

those

given

-LRB-

in

comments

-RRB-

in

Fig.

The

partial

evaluation

graph

itself

gives

a

good

representation

of

how

the

program

works

and

of

the

agents

involved

ffl

The

scanner

on

the

right

branch

recursively

pops

the

words

of

the

sentence

to

parse

and

for

each

word

W

between

positions

M

and

N

broadcasts

the

messages

pos

-LRB-

M

-RRB-

and

word

-LRB-

W

M

N

-RRB-

Notice

that

the

positions

are

arbitrary

constants

generated

at

run-time

-LRB-

see

-LSB-

-RSB-

for

the

mechanism

which

allows

such

generation

in

LO

-RRB-

ffl

The

dictionary

on

the

middle

branch

creates

a

multiset

of

entries

which

convert

each

message

word

-LRB-

W

M

N

-RRB-

into

a

message

ctree

-LRB-

M,N,C,C-W

-RRB-

where

C

is

the

syntactic

category

of

the

word

W

according

to

the

entries

-LRB-

it

is

assumed

here

for

simplicity

sake

that

each

word

has

only

one

syntactic

category

the

program

could

easily

be

extended

to

handle

ambiguous

words

-RRB-

ffl

The

grammar

on

the

left

branch

spawns

an

agent

for

each

grammar

rule

Upon

a

seek

-LRB-

M

C

-RRB-

request

each

grammar

rule

with

head

C

will

in

turn

spawn

an

incomplete

tree

agent

seeking

to

apply

the

grammar

rule

at

position

M

i.e.

trying

to

find

the

tail

of

the

grammar

rule

at

that

position

and

then

broadcasting

the

resulting

complete

tree

-LRB-

s

-RRB-

thus

found

-LRB-

if

any

-RRB-

Grammar

rule

agents

are

those

living

at

the

node

rule

tail

in

the

graph

while

incomplete

trees

live

at

the

nodes

itree

tail

wait

and

new

tail

wait

-LRB-

they

alternate

between

these

two

states

-RRB-

grammar

dictionary

new

tail

wait

itree

tail

wait

wait

scanner

rule

tail

scan

target

dictionary

entry

lexicon

entry

mainM

The

abstract

forum

fstart

parser

parse

answer

seek

ctree

pos

wordg

appears

at

all

the

nodes

in

the

graph

and

is

omitted

above

Figure

The

partial

evaluation

graph

Various

optimizations

can

be

obtained

from

the

graph

ffl

First

notice

that

each

or-node

in

the

graph

has

no

more

than

one

or

two

outgoing

edges

Therefore

no

more

than

two

program

moulds

are

applicable

at

each

stage

of

the

computation

This

considerably

reduces

the

amount

of

non-determinism

in

multiset

matching

However

one

has

to

remember

that

competition

and

hence

non

determinism

occurs

between

instances

of

program

moulds

not

the

moulds

themselves

But

non-determinism

in

instantiation

is

also

considerably

reduced

by

trying

to

instantiate

first

the

atoms

of

the

trigger

for

which

cardinality

information

is

available

For

example

the

partial

evaluation

graph

shows

that

whenever

the

program

mould

is

applicable

that

is

only

at

node

itree

tail

wait

then

only

one

occurrence

of

the

atom

is

present

in

the

current

context

therefore

this

atom

immediately

-LRB-

and

deterministically

-RRB-

provides

instantiation

for

the

variables

contained

in

the

corresponding

atom

of

the

trigger

of

the

mould

ffl

Second

the

message-flow

analysis

provides

useful

informations

concerning

the

way

messages

are

propagated

For

example

by

applying

the

algorithm

of

section

it

appears

that

the

scanner

produces

but

never

consumes

messages

while

each

grammar

rule

does

the

opposite

The

dictionary

and

the

incomplete

trees

are

not

involved

at

all

with

this

kind

of

messages

Hence

broadcast

operations

of

the

message

can

be

reduced

to

multicast

operations

from

the

scanner

agents

to

the

grammar

rules

agents

Also

when

a

grammar

rule

agent

spawns

an

incomplete

tree

agent

although

its

whole

message

queue

should

theoretically

be

duplicated

copying

the

messages

in

the

queue

can

be

saved

as

these

messages

will

not

be

used

anyway

by

the

incomplete

tree

These

optimizations

which

can

directly

be

derived

from

the

partial

evaluation

graph

have

a

strong

practical

interest

by

themselves

however

they

can

be

pushed

much

further

as

outlined

below

Other

Optimizations

The

canonical

abstraction

function

preserves

in

each

atom

of

a

program

formula

its

predicate

-LRB-

with

arity

-RRB-

but

loses

all

kind

of

information

at

the

argument

level

and

in

particular

the

sharing

of

some

arguments

among

different

atoms

However

this

information

is

important

and

once

the

partial

evaluation

graph

has

been

built

using

the

canonical

abstraction

function

some

useful

extra-information

can

be

derived

by

inferring

properties

at

the

argument

level

Indeed

it

is

easy

to

track

the

evolution

of

a

given

argument

along

the

branches

of

the

graph

Of

particular

interest

are

the

arguments

of

atoms

of

cardinality

at

a

given

node

which

are

stable

i.e.

which

are

not

modified

when

an

agent

traverses

that

node

more

than

once

Such

arguments

act

as

secondary

keys

which

can

then

be

used

in

the

same

way

as

predicate

names

-LRB-

primary

keys

-RRB-

to

further

reduce

non-determinism

induced

by

multiset

matching

and

saturation

induced

by

broadcasting

Only

secondary

keys

require

a

more

dynamic

treatment

than

primary

ones

Consider

for

instance

the

node

rule

tail

of

the

partial

evaluation

graph

in

Fig.

characterizing

grammar

rule

agents

It

can

easily

be

inferred

by

tracking

the

evolution

of

the

arguments

in

the

partial

evaluation

graph

that

the

-LRB-

single

-RRB-

argument

of

both

atoms

never

changes

-LRB-

this

is

quite

reasonable

a

grammar

rule

has

no

reason

to

change

dynamically

either

its

head

or

its

tail

-RRB-

Now

notice

that

whenever

a

message

seek

-LRB-

N

C

-RRB-

is

consumed

at

this

node

as

a

consequence

of

the

application

of

the

program

mould

then

its

second

argument

must

be

identical

to

the

secondary

key

C

held

by

the

atom

rule

-LRB-

C

-RRB-

Consequently

since

this

argument

is

stable

when

the

grammar

rule

agent

characterized

by

rule

-LRB-

C

-RRB-

receives

a

message

seek

-LRB-

N

C

-RRB-

where

C

is

different

from

C

this

message

can

immediately

be

discarded

thus

avoiding

saturation

Discussion

and

Future

Work

The

abstract

interpretation

technique

used

in

this

paper

relies

on

an

approximation

mechanism

based

on

lattice

theoretic

operations

to

encode

in

a

finite

structure

at

the

abstract

level

the

set

of

all

the

possible

executions

of

a

program

call

This

methodology

has

been

systematically

studied

in

-LSB-

-RSB-

using

an

algebraic

representation

of

executions

It

is

especially

suited

to

the

static

analysis

of

programs

written

in

logic-based

languages

such

as

Prolog

-LSB-

-RSB-

or

Constraint

Logic

Programming

-LSB-

-RSB-

Indeed

the

fact

that

logic

is

intrinsically

capable

of

meta-linguistic

explanations

makes

it

especially

suited

for

inferring

abstract

properties

of

such

programs

However

static

analysis

in

traditional

Logic

Programming

often

follows

a

model-theoretic

approach

in

which

the

inferred

properties

are

exploited

to

provide

improved

execution

schemes

which

preserve

a

specific

model

-LRB-

e.g.

the

Herbrand

model

in

Prolog

-RRB-

By

contrast

our

approach

while

still

fully

exploiting

the

logical

foundation

of

our

framework

is

more

based

on

proof

theory

in

that

the

result

of

the

static

analysis

in

LO

are

exploited

to

infer

properties

of

the

admissible

proofs

-LRB-

the

target

proofs

-RRB-

which

encode

the

actual

evolution

of

the

agents

The

method

presented

in

this

paper

is

open

to

various

extensions

along

several

lines

ffl

First

the

approximation

mechanism

used

in

the

generalization

step

of

the

analysis

-LRB-

section

-RRB-

can

be

refined

so

that

even

when

no

finite

cardinality

information

can

be

inferred

cardinality

constraints

such

as

there

are

as

many

p

's

as

q

's

can

still

be

encoded

in

the

sorts

ffl

Also

the

mechanism

for

tracking

the

evolution

of

arguments

used

as

secondary

keys

-LRB-

section

-RRB-

can

be

refined

by

considering

not

only

the

sharing

of

arguments

among

atoms

inside

program

moulds

but

more

general

constraints

relating

these

arguments

e.g.

numerical

constraints

such

that

X

Y

To

be

useful

such

an

extension

would

require

specific

knowledge

about

how

to

deal

with

these

constraints

but

it

would

in

turn

enable

partial

execution

of

the

matching

phase

of

program

moulds

-LRB-

similar

to

the

partial

execution

of

guards

proposed

in

-LSB-

-RSB-

-RRB-

ffl

Finally

the

construction

of

the

partial

evaluation

graph

could

itself

integrate

some

argument

level

analysis

by

contrast

currently

argument

tracking

is

performed

in

a

second

phase

after

the

construction

of

the

graph

This

would

require

dealing

with

non-compositional

abstract

interpretation

mappings

where

the

abstraction

of

say

a

resource

formula

is

obtained

not

only

from

the

abstraction

of

each

of

the

subformulae

but

also

contains

some

coupling

-LRB-

argument

sharing

or

constraints

-RRB-

These

extensions

may

require

some

level

of

interaction

with

the

programmer

to

be

implementable

Conclusion

We

have

presented

a

general

methodology

based

on

techniques

from

abstract

interpretation

and

partial

evaluation

for

optimizing

concurrent

computations

based

on

the

notion

of

associative

communication

Such

a

methodology

has

been

presented

with

respect

to

the

LO

model

of

concurrent

computation

which

encompasses

associative

communication

both

of

the

competitive

and

the

non-competitive

kind

-LRB-

respectively

multiset

rewriting

and

broadcasting

-RRB-

Indeed

LO

allows

for

the

possibility

of

multiple

multisets

communicating

via

broadcasting

it

is

thus

richer

than

models

and

languages

where

the

computation

is

restricted

to

rewriting

inside

a

single

multiset

such

as

Gamma

-LSB-

-RSB-

Linda

-LSB-

-RSB-

-LSB-

-RSB-

Petri

Nets

-LSB-

-RSB-

etc.

Furthermore

this

higher

degree

of

expressiveness

turns

out

to

be

useful

from

the

point

of

view

of

optimization

as

it

allows

a

corresponding

modularization

of

the

computation

according

to

our

optimizing

methodology

LO

is

characterized

by

a

rigorous

logical

-LRB-

proof-theoretic

-RRB-

operational

semantics

where

operations

over

multisets

can

be

formalized

as

deductions

in

Linear

Logic

-LSB-

-RSB-

The

possibility

of

applying

static

analysis

techniques

to

the

domain

of

associative

communication

stems

directly

from

the

availability

of

such

a

formal

background

since

it

allows

us

to

synthesize

partial

evaluation

graphs

from

the

and-or

trees

encoding

all

the

proof

trees

corresponding

to

different

alternative

evolutions

of

the

computation

with

respect

to

given

programs

As

a

matter

of

fact

we

believe

that

one

very

practical

role

that

Linear

Logic

may

play

in

the

future

will

be

in

making

possible

the

application

of

methodologies

for

abstract

interpretation

and

partial

evaluation

as

they

have

evolved

in

programming

languages

built

around

the

notion

of

logical

deduction

-LRB-

i.e.

logic

programming

languages

-RRB-

to

the

many

models

of

concurrent

computation

which

assume

multiset

transformation

as

their

basic

engine

This

paper

provides

a

first

contribution

in

this

direction

as

in

physics

the

combination

of

two

systems

may

introduce

a

coupling

component

in

the

expression

of

the

energy

of

the

total

system

Appendix

A

Proof

of

Theorem

We

give

here

a

proof

of

theorem

on

which

the

convergence

of

our

method

relies

As

A

is

finite

we

may

assume

without

loss

of

generality

that

A

kg

for

some

integer

k

So

we

have

to

show

for

all

integer

k

the

property

P

-LRB-

k

-RRB-

For

all

infinite

sequence

-LRB-

xn

-RRB-

of

elements

of

@k

there

exists

indices

p

q

such

that

p

q

and

xp

xq

Proof

This

property

is

shown

by

induction

ffl

P

-LRB-

-RRB-

is

obvious

indeed

in

this

case

each

xn

is

an

integer

-LRB-

or

-RRB-

and

p

can

be

chosen

as

the

index

of

the

smallest

xn

-LRB-

which

always

exists

since

any

set

in

has

a

smallest

element

-RRB-

then

we

can

take

q

p

ffl

Now

let

us

assume

that

P

-LRB-

k

-RRB-

holds

and

let

's

prove

P

-LRB-

k

-RRB-

Let

-LRB-

xn

-RRB-

be

an

infinite

sequence

of

elements

of

@k

and

let

's

consider

the

sequence

-LRB-

zn

-RRB-

of

elements

of

defined

by

zn

xn

-LSB-

k

-RSB-

Any

sequence

in

has

a

non

decreasing

subsequence

therefore

there

exists

a

monotonic

function

oe

such

that

for

all

m

n

if

m

n

then

oe

-LRB-

m

-RRB-

oe

-LRB-

n

-RRB-

and

zoe

-LRB-

m

-RRB-

zoe

-LRB-

n

-RRB-

Let

's

now

consider

the

sequence

-LRB-

yn

-RRB-

of

elements

of

@k

defined

by

kg

yn

-LSB-

j

-RSB-

xoe

-LRB-

n

-RRB-

-LSB-

j

-RSB-

By

the

induction

hypothesis

P

-LRB-

k

-RRB-

there

exists

indices

p

q

such

that

p

q

and

yp

yq

Hence

-LCB-

For

all

j

k

we

have

since

yp

yq

xoe

-LRB-

p

-RRB-

-LSB-

j

-RSB-

yp

-LSB-

j

-RSB-

yq

-LSB-

j

-RSB-

xoe

-LRB-

q

-RRB-

-LSB-

j

-RSB-

-LCB-

For

j

k

we

have

since

p

q

and

oe

-LRB-

p

-RRB-

oe

-LRB-

q

-RRB-

xoe

-LRB-

p

-RRB-

-LSB-

k

-RSB-

zoe

-LRB-

p

-RRB-

zoe

-LRB-

q

-RRB-

yoe

-LRB-

q

-RRB-

-LSB-

k

-RSB-

Let

oe

-LRB-

p

-RRB-

and

oe

-LRB-

q

-RRB-

We

have

and

k

-LSB-

j

-RSB-

-LSB-

j

-RSB-

Hence

Therefore

P

-LRB-

k

-RRB-

holds

By

induction

P

-LRB-

k

-RRB-

holds

for

all

k.

ut

Bibliography

-LSB-

-RSB-

J-M

Andreoli

Logic

programming

with

focusing

proofs

in

linear

logic

Journal

of

Logic

and

Computation

-LRB-

-RRB-

-LSB-

-RSB-

J-M

Andreoli

and

R.

Pareschi

LO

and

behold

concurrent

structured

processes

In

Proc

of

OOPSLA/ECOOP

Ottawa

Canada

-LSB-

-RSB-

J-M

Andreoli

and

R.

Pareschi

Communication

as

fair

distribution

of

knowledge

In

Proc

of

OOPSLA

Phoenix

Az

U.S.A.

-LSB-

-RSB-

J-M

Andreoli

and

R.

Pareschi

Linear

objects

Logical

processes

with

built-in

inheritance

New

Generation

Computing

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

J-M

Andreoli

R.

Pareschi

and

M.

Bourgois

Dynamic

programming

as

multi-agent

programming

In

Proc

of

the

OOPSLA

workshop

on

Object-based

concurrent

computing

Lecture

Notes

in

Computer

Science

-LRB-

-RRB-

Gen?eve

Switzerland

Springer

Verlag

-LSB-

-RSB-

J-P

Ban

atre

A.

Coutant

and

D.

Le

Metayer

A

parallel

machine

for

multiset

transformation

and

its

programming

style

Future

Generation

Computer

Systems

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

G.

Berry

and

G.

Boudol

The

chemical

abstract

machine

In

Proc

of

the

ACM

Symposium

on

Principles

of

Programming

Languages

San

Francisco

Ca

U.S.A.

-LSB-

-RSB-

A.

Brogi

and

P.

Ciancarini

The

concurrent

language

shared

prolog

ACM

Transactions

on

Programming

Languages

and

Systems

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

L.

Brownston

R.

Farrell

E.

Kant

and

N.

Martin

Programming

Expert

Systems

in

AddisonWesley

Reading

Massachussetts

-LSB-

-RSB-

M.

Bruynooghe

A

practical

framework

for

abstract

interpretation

of

logic

programs

Technical

report

Katolieke

Universiteit

Leuven

Hervelee

Belgium

-LSB-

-RSB-

N.

Carriero

and

D.

Gelernter

How

to

Write

Parallel

Programs

MIT

Press

Cambridge

Massachussetts

-LSB-

-RSB-

T.

Castagnetti

and

P.

Ciancarini

Static

analysis

of

a

parallel

logic

language

based

on

the

blackboard

model

Journal

of

Parallel

and

Distributed

Computing

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

P.

Codognet

and

G.

Fil?e

Computations

abstractions

and

constraints

in

logic

programs

Technical

report

Universit?a

degli

Studi

di

Padova

Italy

-LSB-

-RSB-

P.

Cousot

and

R.

Cousot

Abstract

interpretation

a

unified

lattice

model

for

static

analysis

of

programs

by

construction

or

approximation

of

fixpoint

In

Proc

of

the

ACM

symposium

on

Principles

Of

Programming

Languages

-LSB-

-RSB-

P.

Cousot

and

R.

Cousot

Systematic

design

of

program

analysis

frameworks

In

Proc

of

the

ACM

symposium

on

Principles

Of

Programming

Languages

-LSB-

-RSB-

H.C.

Cunningham

and

G.-C

Roman

A

shared

dataspace

model

of

concurrency

In

Proc

of

the

International

Conference

on

Distributed

Computing

Systems

-LSB-

-RSB-

C.L.

Forgy

Rete

a

fast

algorithm

for

the

many

pattern/many

object

pattern

match

problem

Artificial

Intelligence

-LRB-

-RRB-

-LSB-

-RSB-

J-Y

Girard

Linear

logic

Theoretical

Computer

Science

-LCB-

-LSB-

-RSB-

J-Y

Girard

A

new

constructive

logic

Classical

logic

Mathematical

Structures

in

Computer

Science

-LRB-

-RRB-

-LSB-

-RSB-

J-Y

Girard

On

the

unity

of

logic

Preprint

Universit?e

de

Paris

-LSB-

-RSB-

D.

Goldeberg

Genetic

Algorithms

in

Search

Optimization

and

Machine

Learning

Addison-Wesley

Reading

Massachussetts

-LSB-

-RSB-

K.

Marriot

and

H.

Sondergaard

Semantic

based

dataflow

analysis

of

logic

programs

In

Proc

of

the

IFIP

World

Computer

Congress

San

Francisco

Ca

U.S.A

-LSB-

-RSB-

C.

Mellish

Abstract

interpretation

of

prolog

programs

In

S.

Abramsky

and

C.

Hankin

editors

Abstract

Interpretation

of

Declarative

Languages

pages

-LCB-

Ellis

Horwood

Chichester

U.K.

-LSB-

-RSB-

H.

Penny

Nii

Blackboard

systems

In

A.

Barr

Cohen

P.

and

Feigenbaum

E.

editors

The

Handbook

of

Artificial

Intelligence

vol

pages

-LCB-

Addison-Wesley

-LSB-

-RSB-

K.V.S.

Prasad

A

calculus

of

broadcasting

systems

In

Proc

of

the

Colloquium

on

Trees

in

Algebra

and

Programming

-LSB-

-RSB-

W.

Reisig

Petri

Nets

Springer

Verlag

Berlin

-LSB-

-RSB-

M.

Rem

Associons

A

program

notation

with

tuples

instead

of

variables

ACM

Transactions

on

Programming

Languages

and

Systems

-LSB-

-RSB-

R.G.

Smith

The

contract

net

protocol

High

level

communication

and

control

in

a

distributed

problem

solver

IEEE

Trans

Comput.

-LRB-

-RRB-

-LCB-

Other

Reports

Available

from

ECRC

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Mireille

Ducasse

and

Anna-Maria

Emde

Opium

User

Manual

A

High-level

Debugging

Environment

for

Prolog

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

E.

Yardeni

T.

Fruhwirth

and

E.

Shapiro

Polymorphically

Typed

Logic

Programs

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

U.

Baron

S.

Bescos

and

S.

Delgado

The

ElipSys

Logic

Programming

Language

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Sergio

Delgado

Michel

Dorochevsky

and

Kees

Schuerman

A

Shared

Environment

Parallel

Logic

Programming

System

On

Distributed

Memory

Architectures

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Andre

Veron

Jiyang

Xu

and

Kees

Schuerman

Virtual

Memory

Support

for

OR

Parallel

Logic

Programming

Systems

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Michel

Dorochevsky

Garbage

Collection

in

the

OR-Parallel

Logic

Programming

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Alan

Sexton

KCM

Kernel

Implementation

Report

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Michel

Dorochevsky

Key

Features

of

a

Prolog

Module

System

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Michel

Dorochevsky

Kees

Schuerman

and

Andre

Veron

ElipSys

An

Integrated

Platform

for

Building

Large

Decision

Support

Systems

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Jiyang

Xu

and

Andre

Veron

Types

and

Constraints

in

the

Parallel

Logic

Programming

System

ElipSys

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Olivier

Thibault

Design

and

Evaluation

of

a

Symbolic

Processor

-LSB-

ECRC

-LCB-

TR

-LCB-

-RSB-

Michel

Dorochevsky

Jacques

Noy?e

and

Olivier

Thibault

Has

Dedicated

Hardware

for

Prolog

a

Future

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Norbert

Eisinger

and

Hans

Jurgen

Ohlbach

Deduction

Systems

Based

on

Resolution

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michel

Kuntz

The

Gist

of

GIUKU

Graphical

Interactive

Intelligent

Utilities

for

Knowledgeable

Users

of

Data

Base

Systems

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michel

Kuntz

An

Introduction

to

GIUKU

Graphical

Interactive

Intelligent

Utilities

for

Knowledgeable

Users

of

Data

Base

Systems

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michel

Kuntz

Enhanced

Graphical

Browsing

Techniques

for

Collections

of

Structured

Data

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michel

Kuntz

A

Graphical

Syntax

Facility

for

Knowledge

Base

Languages

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michel

Kuntz

A

Versatile

Browser-Editor

for

Relations

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Norbert

Eisinger

Nabiel

Elshiewy

and

Remo

Pareschi

Distributed

Artificial

Intelligence

An

Overview

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Norbert

Eisinger

An

Approach

to

Multi-Agent

Problem-Solving

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Klaus

H.

Ahlers

Michael

Fendt

Marc

Herrmann

Isabelle

Hounieu

and

Philippe

Marchal

TUBE

Implementor

's

Manual

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Klaus

H.

Ahlers

Michael

Fendt

Marc

Herrmann

Isabelle

Hounieu

and

Philippe

Marchal

TUBE

Programmer

's

Manual

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michael

Dahmen

A

Debugger

for

Constraints

in

Prolog

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Jean-Marc

Andreoli

and

Remo

Pareschi

Communication

as

Fair

Distribution

of

Knowledge

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Jean-Marc

Andreoli

Remo

Pareschi

and

Marc

Bourgois

Dynamic

Programming

as

Multiagent

Programming

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Volker

Kuchenhoff

On

the

Efficient

Computation

of

the

Difference

Between

Consecutive

Database

States

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Sylvie

Bescos

and

Michael

Ratcliffe

Secondary

Structure

Prediction

of

rRNA

Molecules

Using

ElipSys

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Michael

Dahmen

Abstract

Debugging

of

Coroutines

and

Constraints

in

Prolog

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Thierry

Le

Provost

and

Mark

Wallace

Constraint

Satisfaction

Over

the

CLP

Scheme

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

G?erard

Comyn

M.

Jarke

and

Suryanarayana

M.

Sripada

Proceedings

of

the

Compulog

Net

meeting

on

Knowledge

Bases

-LRB-

CNKBS

-RRB-

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Jesper

Larsson

Traeff

and

Steven

David

Prestwich

Meta-programming

for

reordering

Literals

in

Deductive

Databases

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Beat

Wuthrich

Update

Realizations

Drawn

from

Knowledge

Base

Schemas

and

Executed

by

Dialog

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Lone

Leth

A

New

Direction

in

Functions

as

Processes

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Steven

David

Prestwich

The

PADDY

Partial

Deduction

System

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Andrei

Voronkov

Extracting

Higher

Order

Functions

from

First

Order

Proofs

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Andrei

Voronkov

On

Computability

by

Logic

Programs

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Beat

Wuthrich

Towards

Probabilistic

Knowledge

Bases

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Petra

Bayer

Update

Propagation

for

Integrity

Checking

Materialized

View

Maintenance

and

Production

Rule

Triggering

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Mireille

Ducass?e

Abstract

views

of

Prolog

executions

in

Opium

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Alexandre

Lefebvre

Towards

an

Efficient

Evaluation

of

Recursive

Aggregates

in

Deductive

Databases

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Udo

W.

Lipeck

and

Rainer

Manthey

-LRB-

Hrsg

-RRB-

Kurzfassungen

des

GI-Workshops

Grundlagen

von

Datenbanken

Barsinghausen

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Lone

Leth

and

Bent

Thomsen

Some

Facile

Chemistry

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Jacques

Noy?e

-LRB-

Ed

-RRB-

Proceedings

of

the

International

KCM

User

Group

Meeting

Munich

and

October

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Frederick

Knabe

A

Distributed

Protocol

for

Channel-Based

Communication

with

Choice

-LSB-

ECRC

-LCB-

-RSB-

Benoit

Baurens

Petra

Bayer

Luis

Hermosilla

and

Andrea

Sikeler

Publication

Management

A

Requirements

Analysis

-LSB-

ECRC

-LCB-

-RSB-

Thom

Fruhwirth

Constraint

Simplification

Rules

-LSB-

ECRC

-LCB-

-RSB-

Mark

Wallace

Compiling

Integrity

Checking

into

Update

Procedures

-LSB-

ECRC

-LCB-

-RSB-

Petra

Bayer

Data

and

Knowledge

for

Medical

Applications

A

Case

Study

-LSB-

ECRC

-LCB-

-RSB-

Michel

Dorochevsky

and

Andr?e

V?eron

Binding

Techniques

and

Garbage

Collection

for

OR-Parallel

CLP

Systems

-LSB-

ECRC

-LCB-

-RSB-

Shan-Wen

Yan

Efficiently

Estimating

Relative

Grain

Size

for

Logic

Programs

on

Basis

of

Abstract

Interpretation

-LSB-

ECRC

-LCB-

-RSB-

Jean-Marc

Andreoli

Paolo

Ciancarini

and

Remo

Pareschi

Interaction

Abstract

Machines

-LSB-

ECRC

-LCB-

-RSB-

Jean-Marc

Andreoli

and

Remo

Pareschi

Associative

Communication

and

its

Optimization

via

Abstract

Interpretation

-LSB-

ECRC

-LCB-

-RSB-

Jean-Marc

Andreoli

Lone

Leth

Remo

Pareschi

and

Bent

Thomsen

On

the

Chemistry

of

Broadcasting

-LSB-

ECRC

-LCB-

-RSB-

Marc

Bourgois

Jean-Marc

Andreoli

and

Remo

Pareschi

Extending

Objects

with

Rules

Composition

and

Concurrency

the

LO

Experience

-LSB-

ECRC

-LCB-

-RSB-

Benoit

Dageville

and

Kam-Fai

Wong

SIM

A

C-based

SIMulation

Package

-LSB-

ECRC

-LCB-

-RSB-

Beat

Wuthrich

On

the

Efficient

Distribution-free

Learning

of

Rule

Uncertainties

and

their

Integration

into

Probabilistic

Knowledge

Bases

-LSB-

ECRC

-LCB-

-RSB-

Andrei

Voronkov

Logic

Programming

with

Bounded

Quantifiers

-LSB-

ECRC

-LCB-

-RSB-

Eric

Monfroy

Grobner

Bases

Strategies

and

Applications

-LSB-

ECRC

-LCB-

-RSB-

Eric

Monfroy

Specification

of

Geometrical

Constraints

-LSB-

ECRC

-LCB-

-RSB-

Bent

Thomsen

Lone

Leth

and

Alessandro

Giacalone

Some

Issues

in

the

Semantics

of

Facile

Distributed

Programming

-LSB-

ECRC

-LCB-

-RSB-

Mireille

Ducass?e

An

Extendable

Trace

Analyser

to

Support

Automated

Debugging

-LSB-

ECRC

-LCB-

-RSB-

Jorge

Bocca

and

Luis

Hermosilla

A

Preliminary

Study

of

the

Performance

of

MegaLog

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Benoit

Dageville

and

Kam-Fai

Wong

Supporting

Thousands

of

Threads

Using

a

Hybrid

Stack

Sharing

Scheme

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Steven

Prestwich

ElipSys

Programming

Tutorial

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Beat

Wuthrich

Learning

Probabilistic

Rules

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Eric

Monfroy

A

Survey

of

Non-Linear

Solvers

-LSB-

ECRC

-LCB-

-LCB-

-RSB-

Thom

Fruhwirth

Alexander

Herold

Volker

Kuchenhoff

Thierry

Le

Provost

Pierre

Lim

Eric

Monfroy

and

Mark

Wallace

Constraint

Logic

Programming

An

Informal

Introduction

abstract interpretation
broadcasting
linear logic
multiset rewriting
partial evaluation
production systems
static analysis