Rule

Chaining

in

Marvel

Dynamic

Binding

of

Parameters

George

T.

Heinemany

Gail

E.

Kaiserz

Naser

S.

Barghoutiy

Israel

Z.

Ben-Shaulx

May

Abstract

Marvel

is

a

rule-based

development

environment

-LRB-

RBDE

-RRB-

that

assists

in

the

development

of

software

projects

Marvel

encapsulates

each

software

development

activity

in

a

rule

that

specifies

the

condition

for

invoking

the

activity

and

its

effects

on

the

components

of

the

project

under

development

These

components

are

abstracted

as

objects

and

stored

in

a

persistent

object

database

Each

rule

applies

to

a

specific

class

of

objects

which

is

specified

as

the

parameter

of

the

rule

Firing

a

rule

entails

binding

its

formal

parameter

to

a

specific

object

If

the

rule

changes

the

object

in

such

a

way

that

the

conditions

of

other

rules

become

satisfied

these

other

rules

are

automatically

fired

A

problem

arises

in

this

forward

chaining

model

when

the

classes

of

the

objects

manipulated

by

the

rules

are

different

Marvel

has

to

determine

which

object

to

bind

to

the

parameter

of

each

rule

in

the

chain

based

on

the

object

manipulated

by

the

original

rule

that

initiated

the

chain

We

describe

a

heuristic

approach

for

solving

this

problem

in

the

current

Marvel

implementation

and

introduce

an

algorithmic

approach

that

does

better

c

Heineman

Kaiser

Barghouti

Ben-Shaul

yBarghouti

and

Heineman

are

supported

in

part

by

the

Center

for

Telecommunications

Research

zKaiser

is

supported

by

National

Science

Foundation

grants

and

by

grants

from

AT&T

BNR

DEC

IBM

SRA

and

Xerox

by

the

New

York

State

Center

for

Advanced

Technology

on

Computer

and

Information

Systems

and

by

the

NSF

Engineering

Research

Center

for

Telecommunications

Research

xBen-Shaul

is

supported

in

part

by

the

Center

for

Advanced

Technology

Introduction

and

Motivation

Software

development

environments

-LRB-

SDEs

-RRB-

assist

developers

of

software

projects

in

organizing

the

project

's

data

and

carrying

out

the

development

process

Every

software

project

assumes

a

specific

organization

for

its

components

and

a

specific

development

process

that

might

be

different

from

other

projects

Thus

it

is

not

appropriate

to

build

a

single

software

development

environment

with

a

hardwired

assistance

model

Instead

the

assistance

should

be

knowledgebased

In

order

to

provide

intelligent

assistance

an

SDE

needs

specifications

of

two

things

the

project

's

data

model

and

the

project

's

development

process

Marvel

is

an

instance

of

a

particular

class

of

SDEs

called

rule-based

development

environments

-LRB-

RBDEs

-RRB-

which

use

a

rule-based

model

of

the

development

process

A

project

administrator

writes

a

specification

of

the

project

's

process

model

and

loads

it

into

Marvel

Marvel

then

tailors

its

functionality

accordingly

and

presents

the

user

with

a

choice

of

commands

that

correspond

to

the

loaded

rules

Marvel

provides

automated

assistance

by

applying

forward

and

backward

chaining

among

the

rules

in

order

to

automatically

invoke

activities

that

are

parts

of

the

development

process

One

distinguishing

feature

of

Marvel

is

its

integration

of

object-oriented

data

modeling

and

rule-based

process

modeling

-LSB-

-RSB-

Each

development

activity

on

the

components

of

the

project

under

development

is

modeled

as

a

rule

that

specifies

the

condition

for

invoking

the

activity

and

the

effect

of

the

activity

on

the

components

The

project

's

components

are

modeled

as

objects

and

stored

in

a

persistent

object

database

The

attributes

of

each

object

and

relationships

to

other

objects

are

defined

by

its

class

The

rules

are

treated

as

methods

of

these

classes

in

particular

each

rule

has

a

formal

parameter

whose

type

is

a

specific

object

When

a

user

requests

a

command

the

corresponding

rule

is

invoked

The

formal

parameter

of

the

rule

is

bound

to

the

object

selected

by

the

user

For

example

the

user

might

wish

to

edit

the

cfile

Marvel

invokes

the

edit

rule

from

figure

and

binds

c

to

If

the

changes

that

the

rule

introduces

to

this

object

cause

the

condition

of

other

rules

to

become

satisfied

Marvel

automatically

fires

each

of

these

rules

and

attempts

to

bind

their

formal

parameters

to

actual

objects

Marvel

must

infer

which

objects

to

bind

to

the

formal

parameters

of

the

rules

in

the

chain

The

selection

of

these

objects

is

a

difficult

problem

when

a

rule

that

is

a

method

of

one

class

chains

to

a

rule

that

is

a

method

of

another

class

and

thus

a

different

object

must

be

bound

to

the

formal

parameter

of

the

second

rule

In

addition

recursive

data

definitions

cause

chaining

between

rules

that

act

on

different

objects

within

the

same

class

We

call

the

problem

of

binding

parameters

of

rules

in

a

rule

chain

the

chaining

problem

In

this

paper

we

describe

the

chaining

problem

and

explain

how

it

is

solved

in

the

current

implementation

of

Marvel

We

describe

Marvel

detailing

only

those

aspects

necessary

to

understand

the

chaining

problem

and

our

solutions

for

a

more

complete

description

of

Marvel

see

-LSB-

-RSB-

We

next

explain

the

chaining

problem

in

detail

with

a

motivating

example

We

describe

a

heuristic

approach

to

solving

this

problem

and

discuss

its

implementation

in

the

current

Marvel

system

We

then

extend

the

example

to

show

the

limitations

of

this

approach

this

paper

we

restrict

rules

to

have

only

one

formal

parameter

We

are

investigating

chaining

between

multi-method

rules

Object

Database

Composite-Object

HierarchyGROUPPROJECTMODULECFILEMODULEHFILEHFILEHFILELIBHFILEEdit

-LSB-

c

CFILE

-RSB-

-LRB-

c.rcs

Reserved

-RRB-

-LCB-

edit

c

-RCB-

-LRB-

c.status

Modified

-RRB-

Rule

Instance

libraries

Figure

Marvel

data

and

process

model

and

present

a

better

algorithmic

solution

We

conclude

with

related

work

on

RBDEs

and

other

kinds

of

rule-based

systems

and

summarize

our

contributions

Marvel

Overview

Marvel

is

an

RBDE

which

allows

a

project

administrator

to

create

and

tailor

an

environment

by

defining

a

data

model

and

a

process

model

in

the

Msl

specification

language

Software

artifacts

-LRB-

i.e.

code

documentation

-RRB-

are

abstracted

as

instances

of

classes

which

are

defined

in

the

data

model

and

stored

in

an

object

database

The

attributes

of

each

object

are

defined

by

its

class

for

example

a

project

object

has

a

set

attribute

libraries

which

contains

objects

from

the

lib

class

For

clarity

the

names

of

other

attributes

are

not

shown

in

figure

The

set

attributes

create

a

composite-object

hierarchy

Figure

depicts

a

sample

composite-object

hierarchy

and

an

object

database

instance

for

this

hierarchy

Each

object

in

this

example

belongs

to

the

class

with

the

same

first

letter

Note

how

the

object

g

is

composed

of

an

instance

of

class

hfile

-LRB-

-RRB-

and

two

instances

of

class

project

-LRB-

and

-RRB-

Essentially

the

composite-object

hierarchy

is

an

is-part

relationship

Marvel

also

provides

for

links

from

one

object

to

another

For

example

in

figure

the

class

cfile

has

a

link

attribute

includes

-LRB-

dashed

line

-RRB-

to

an

hfile

This

link

specifies

that

an

instance

of

the

cfile

is

associated

with

a

particular

hfile

Links

and

composite-objects

enhance

the

power

of

the

Msl

rule

language

by

allowing

queries

in

the

rules

to

traverse

the

database

structure

we

term

such

queries

as

navigational

The

process

model

is

defined

by

rules

that

specify

a

condition

that

must

be

satisfied

for

the

rule

to

fire

and

effects

that

assert

changes

on

the

object

database

The

collection

of

all

the

rules

for

a

certain

project

is

termed

the

rulebase

of

that

project

Since

rules

in

Marvel

are

methods

on

objects

they

have

a

formal

parameter

with

which

the

rule

is

invoked

Rules

also

have

derived

parameters

which

are

the

result

of

queries

made

by

the

rule

on

the

object

database

The

query

language

consists

of

boolean

combinations

of

three

navigational

primitives

member

linkto

and

ancestor

and

standard

relational

operators

-LRB-

i.e.

=-RRB-

which

allow

the

query

to

navigate

through

the

object

database

Member

finds

the

parent/child

of

an

object

ancestor

finds

ancestors/descendents

-LRB-

in

the

composite-object

hierarchy

-RRB-

for

a

given

object

and

linkto

finds

objects

that

are

linked

to

a

given

object

For

example

the

touch

-LSB-

m

module

-RSB-

rule

from

figure

requires

an

object

from

the

module

class

as

the

formal

parameter

and

makes

a

query

on

the

object

database

to

determine

two

derived

parameters

r

is

defined

as

a

module

that

is

a

member

of

the

modules

set

attribute

of

m

and

whose

status

attribute

is

Modified

and

a

cfile

that

is

a

member

of

the

cfiles

attribute

of

m

and

whose

status

attribute

is

Modified

When

quantified

with

forall

-LRB-

-RRB-

the

derived

parameter

is

bound

to

all

the

objects

returned

by

the

query

while

exists

-LRB-

-RRB-

binds

the

parameter

to

the

first

such

object

found

The

condition

of

a

Marvel

rule

determines

the

logical

state

of

the

object

database

necessary

for

a

given

invocation

to

fire

For

example

in

figure

the

intended

cfile

object

must

be

reserved

-LRB-

rcs

attribute

set

to

Reserved

-RRB-

before

editing

The

conditions

are

constructed

from

predicates

based

on

the

rule

's

parameters

-LRB-

formal

and

derived

-RRB-

which

must

be

satisfied

for

the

rule

to

fire

If

a

predicate

in

the

condition

is

false

it

is

said

to

be

unsatisfied

and

backward

chaining

could

be

automatically

initiated

on

this

failed

predicate

in

an

attempt

to

satisfy

it

this

is

similar

to

attempting

to

achieve

a

subgoal

Each

Marvel

rule

has

a

set

of

-LRB-

possibly

-RRB-

multiple

mutually

exclusive

effects

that

are

asserted

on

the

object

database

upon

completion

of

the

rule

For

example

the

edit

rule

in

figure

asserts

that

the

cfile

object

has

been

modified

-LRB-

status

attribute

is

set

to

Modified

-RRB-

Once

an

effect

is

asserted

on

the

object

database

forward

chaining

could

be

initiated

to

automatically

fire

other

rules

A

forward

chain

from

one

rule

to

another

is

initiated

if

the

effect

of

the

first

rule

makes

an

assertion

which

satisfies

the

condition

of

the

second

We

now

present

the

two

basic

forms

of

chaining

backward

and

forward

as

they

operate

in

Marvel

Backward

Chaining

In

Marvel

when

the

user

invokes

a

rule

r

whose

condition

is

not

satisfied

backward

chaining

is

initiated

on

a

failed

predicate

p

in

the

condition

to

attempt

to

satisfy

it

The

system

collects

together

into

a

set

Sb

those

rules

in

the

rulebase

that

have

an

effect

which

satisfies

p

The

system

then

repeatedly

removes

and

invokes

ri

from

this

set

until

either

p

is

satisfied

or

Sb

is

empty

Since

backward

chaining

is

a

recursive

process

the

system

might

initiate

a

backward

chain

to

satisfy

ri

Because

the

condition

is

a

combination

of

predicates

satisfying

p

might

still

not

satisfy

the

entire

condition

for

r

so

this

backward

chaining

process

is

repeated

until

the

condition

is

satisfied

or

all

known

possibilities

are

exhausted

Note

that

the

chaining

problem

appears

when

invoking

ri

since

it

has

a

formal

parameter

that

the

system

must

automatically

determine

In

the

current

Marvel

implementation

however

we

bypass

this

problem

since

we

restrict

effects

to

make

assertions

only

on

the

formal

parameter

not

derived

ones

Compile

-LSB-

c

CFILE

-RSB-

-LRB-

c.status

Modified

-RRB-

-LCB-

compile

the

file

-RCB-

-LRB-

c.status

Compiled

-RRB-

Link

-LSB-

m

MODULE

-RSB-

-LRB-

forall

CFILE

c

suchthat

-LRB-

member

-LSB-

m.cfiles

c

-RSB-

-RRB-

-RRB-

-LRB-

or

-LRB-

c.status

Compiled

-RRB-

-LRB-

m.status

Modified

-RRB-

-RRB-

-LCB-

Create

a

file

for

these

CFILES

-RCB-

-LRB-

m.status

UpToDate

-RRB-

Touch

-LSB-

m

MODULE

-RSB-

-LRB-

and

-LRB-

exists

MODULE

r

suchthat

-LRB-

member

-LSB-

m.modules

r

-RSB-

-RRB-

-RRB-

-LRB-

exists

CFILE

c

suchthat

-LRB-

member

-LSB-

m.cfiles

c

-RSB-

-RRB-

-RRB-

-RRB-

-LRB-

or

-LRB-

r.status

Modified

-RRB-

-LRB-

c.status

Modified

-RRB-

-RRB-

-LCB-

-RCB-

-LRB-

m.status

Modified

-RRB-

Touch

-LSB-

p

PROJECT

-RSB-

-LRB-

exists

MODULE

m

suchthat

-LRB-

member

-LSB-

p.modules

m

-RSB-

-RRB-

-RRB-

-LRB-

m.status

Modified

-RRB-

-LCB-

-RCB-

-LRB-

p.status

Modified

-RRB-

Figure

Motivating

Example

Forward

Chaining

Forward

chaining

is

initiated

when

a

predicate

p

in

the

effect

of

a

rule

is

asserted

on

the

object

database

Marvel

determines

those

rules

ri

Sf

in

the

system

whose

condition

might

become

satisfied

because

of

this

assertion

This

is

a

tenuous

connection

since

the

condition

of

rule

ri

might

be

composed

of

many

predicates

and

the

system

has

chosen

only

one

of

these

as

a

reason

to

forward

chain

however

this

provides

Marvel

with

an

automatic

way

to

logically

determine

the

flow

of

control

in

the

system

Since

the

condition

of

a

rule

can

involve

derived

parameters

the

chaining

problem

appears

and

can

not

be

bypassed

Specifically

in

rule

ri

the

predicate

p

might

be

based

on

a

derived

parameter

and

the

system

must

determine

the

formal

parameter

with

which

to

invoke

ri

In

this

paper

we

are

only

concerned

with

forward

chaining

since

in

our

current

model

backward

chaining

exhibits

no

problems

The

actual

details

of

the

problems

arising

during

forward

chaining

will

be

elaborated

on

in

the

next

section

Chaining

Problem

In

a

rule-based

system

when

the

system

determines

that

it

must

chain

to

rule

ri

it

must

determine

which

object

to

bind

to

ri

's

formal

parameter

this

is

the

essence

of

the

chaining

problem

The

reader

should

observe

that

if

there

were

no

derived

parameters

this

problem

would

not

exist

for

the

conditions

and

effects

of

a

rule

would

be

based

solely

on

the

formal

parameter

Marvel

like

-LSB-

-RSB-

and

other

systems

allows

for

rules

to

have

derived

parameters

by

using

existential

and

universal

operators

to

bind

quantified

parameters

to

certain

objects

based

on

arbitrary

logical

expressions

Figure

shows

some

rules

in

the

Msl

language

In

this

example

if

the

touch

-LSB-

m

module

-RSB-

rule

were

invoked

on

object

from

figure

Marvel

would

bind

c

to

either

or

-LRB-

whichever

has

a

status

attribute

value

of

Modified

-RRB-

and

r

would

be

empty

since

there

is

no

child

of

of

the

module

class

The

ability

to

make

queries

gives

the

rules

more

power

-LRB-

since

their

activities

are

not

limited

to

formal

parameters

-RRB-

but

it

complicates

the

chaining

mechanism

Consider

a

forward

chain

to

ri

based

on

a

predicate

with

a

derived

parameter

In

order

for

the

system

to

fire

rule

ri

it

must

determine

the

object

to

bind

to

the

formal

parameter

For

example

if

the

edit

rule

from

figure

is

invoked

on

then

a

forward

chain

is

initiated

to

touch

-LSB-

m

module

-RSB-

but

it

is

not

readily

apparent

to

what

object

m

should

be

bound

as

there

exists

four

module

objects

In

the

next

section

we

explore

several

ways

to

solve

the

chaining

problem

and

describe

the

current

Marvel

implementation

Heuristic

Approach

There

are

several

possible

ways

to

determine

the

objects

to

bind

to

the

formal

parameter

of

a

forward-chained

rule

ffl

Manual

The

system

could

ask

the

user

for

the

specific

object

to

invoke

the

rule

with

The

main

drawback

to

this

policy

is

that

the

user

should

not

need

to

know

the

details

of

rules

and

chaining

In

addition

the

user

might

respond

incorrectly

causing

the

system

to

perform

unnecessary

activities

and

fail

to

enact

the

proper

activities

ffl

Logical

Since

the

derived

parameters

are

logically

determined

it

might

be

possible

to

invert

this

logic

to

determine

the

proper

object

to

use

We

discuss

this

possibility

in

more

detail

in

the

algorithmic

approach

section

ffl

Heuristics

The

system

can

use

heuristics

to

search

for

the

proper

object

If

the

system

assumes

that

rule

chaining

occurs

in

a

localized

area

in

the

object

database

then

the

search

space

can

be

kept

small

As

an

alternative

to

searching

the

system

could

also

use

a

set

of

axioms

-LRB-

as

put

forth

in

grapple

-LSB-

-RSB-

-RRB-

to

determine

legal

choices

for

the

parameter

In

Marvel

we

have

implemented

a

set

of

heuristics

to

search

near

an

object

to

determine

the

proper

objects

to

use

during

chaining

In

doing

so

Marvel

makes

use

of

the

composite-object

hierarchy

since

it

assumes

that

objects

near

each

other

in

the

hierarchy

are

semantically

related

The

search

path

also

include

links

-LRB-

see

section

-RRB-

since

they

also

define

semantic

associations

between

objects

During

a

forward

chain

to

rule

ri

from

a

rule

invoked

with

object

O

we

search

for

the

object

to

bind

to

ri

's

formal

parameter

in

the

following

order

The

object

O

itself

O

's

parent

object

O

's

immediate

children

The

objects

associated

-LRB-

through

links

-RRB-

with

O.

O

's

proper

ancestors

If

we

apply

these

heuristics

to

the

example

from

section

-LRB-

chaining

from

edit

-LSB-

-RSB-

to

touch

-LSB-

-RSB-

-RRB-

we

see

that

step

determines

the

correct

object

To

give

a

more

involved

example

if

touch

-LSB-

-RSB-

is

invoked

both

link

-LSB-

-RSB-

and

touch

-LSB-

-RSB-

should

be

fired

Step

discovers

the

object

for

the

link

rule

while

step

takes

care

of

touch

The

heuristic

obviously

can

not

stop

at

the

first

candidate

found

but

must

collect

all

candidates

together

since

it

is

possible

to

have

multiple

instantiations

of

the

same

rule

with

different

objects

as

well

as

different

rules

with

same

or

different

objects

Implementation

This

section

briefly

describes

the

static

and

dynamic

support

currently

implemented

in

Marvel

to

provide

for

chaining

Since

the

data

and

process

models

are

tailorable

Marvel

reads

in

their

specification

as

written

in

the

Msl

language

by

the

administrator

of

the

environment

The

system

compiles

a

rule

network

an

efficient

data

structure

which

maintains

the

chaining

possibilities

-LRB-

both

backward

and

forward

-RRB-

for

each

predicate

in

each

rule

This

rule

network

is

stored

on

disk

upon

completion

for

later

invocations

of

Marvel

Because

this

is

a

static

process

it

is

executed

only

when

either

model

changes

The

runtime

support

is

provided

by

the

Opportunist

which

is

Marvel

's

chaining

engine

When

the

user

issues

a

command

the

Opportunist

matches

this

to

a

rule

r

in

the

rulebase

The

user

selects

the

argument

from

the

object

database

and

the

system

invokes

r.

First

Marvel

generates

the

derived

parameters

by

sequentially

evaluating

each

of

the

quantified

expressions

in

r

's

condition

Next

Marvel

evaluates

the

predicates

that

must

be

true

for

r

to

fire

If

there

is

a

predicate

p

that

is

not

satisfied

then

Marvel

collects

from

the

rule

network

those

rules

ri

that

have

an

effect

which

satisfy

this

predicate

Marvel

invokes

these

rules

until

the

set

is

exhausted

or

the

predicate

is

satisfied

Marvel

binds

the

failed

object

to

ri

's

formal

parameter

since

effects

are

restricted

to

be

based

on

the

formal

parameter

Once

r

's

condition

is

satisfied

Marvel

executes

r

's

activity

with

the

necessary

information

-LRB-

see

-LSB-

-RSB-

for

a

full

description

of

this

process

-RRB-

and

selects

the

proper

effect

to

assert

as

determined

by

the

result

of

this

execution

For

every

predicate

p

in

this

effect

Marvel

asserts

it

on

the

object

database

and

collects

those

rules

from

the

rule

network

that

may

now

be

satisfied

Marvel

enters

the

forward

chaining

cycle

and

automatically

invokes

each

of

these

rules

ri

in

turn

potentially

generating

more

rules

to

invoke

in

a

recursive

manner

To

invoke

these

rules

Marvel

must

determine

the

object

to

bind

to

ri

's

formal

parameter

from

the

predicate

p

If

the

object

oi

in

p

is

of

the

proper

class

then

Marvel

binds

the

formal

parameter

to

oi

otherwise

Marvel

performs

a

search

from

the

object

bound

to

r

's

formal

parameter

based

upon

the

heuristics

described

in

section

If

Marvel

is

unable

to

find

one

then

it

does

not

invoke

the

rule

Touch

-LSB-

l

LIB

-RSB-

-LRB-

and

-LRB-

exists

PROJECT

p

suchthat

-LRB-

member

-LSB-

p.libraries

l

-RSB-

-RRB-

-RRB-

-LRB-

exists

MODULE

m

suchthat

-LRB-

ancestor

-LSB-

p

m

-RSB-

-RRB-

-RRB-

-RRB-

-LRB-

m.status

Modified

-RRB-

-LCB-

-RCB-

-LRB-

l.status

Modified

-RRB-

Formal

ParameterDerived

ParameterChained-To

variable

in

conditionB

is

derived

from

A

AB?m?p?lParameter

Dependencies

Figure

Extending

the

example

from

figure

Algorithmic

Approach

If

we

extend

the

example

from

figure

our

heuristic

approach

fails

to

generate

the

proper

formal

parameter

to

use

for

chaining

we

add

the

touch

-LSB-

l

lib

-RSB-

rule

shown

in

figure

This

rule

queries

the

object

database

for

the

project

object

p

which

contains

this

lib

l

and

then

finds

a

module

object

m

which

is

a

descendent

of

p

that

is

Modified

If

m

is

found

then

l

is

marked

as

Modified

If

touch

-LSB-

-RSB-

is

invoked

and

succeeds

-LRB-

Modified

-RRB-

is

asserted

and

Marvel

initiates

a

forward

chain

to

touch

-LSB-

l

lib

-RSB-

The

heuristic

approach

outlined

in

section

will

fail

to

determine

the

formal

parameter

since

is

a

sibling

of

-LRB-

see

figure

-RRB-

and

falls

outside

the

search

space

for

any

fixed

searching

heuristic

there

will

always

be

cases

which

fail

The

algorithmic

approach

however

will

be

able

to

correctly

invert

the

derived

parameters

to

generate

the

possibilities

for

chaining

The

intuition

behind

the

algorithmic

approach

is

that

each

navigational

query

-LRB-

from

section

-RRB-

is

itself

invertible

For

example

in

figure

-LRB-

exists

PROJECT

p

suchthat

-LRB-

member

-LSB-

p.libraries

l

-RSB-

-RRB-

-RRB-

returns

the

parent

-LRB-

s

-RRB-

of

the

object

-LRB-

s

-RRB-

bound

to

l

This

can

be

inverted

to

bind

to

l

the

children

objects

in

the

libraries

attribute

of

the

object

-LRB-

s

-RRB-

bound

to

p

We

outline

our

algorithm

in

figure

We

assume

that

each

rule

has

a

dependency

graph

which

determines

the

dependencies

between

parameters

in

a

given

rule

In

figure

for

example

m

is

dependent

upon

p

which

is

dependent

upon

l

This

information

is

statically

determined

from

the

derived

parameters

Assume

that

Marvel

initiates

a

forward

chain

from

rule

r

to

rule

ri

because

a

predicate

p

in

r

satisfies

a

predicate

q

in

ri

's

condition

The

object

O

changed

by

p

is

subsequently

bound

to

the

parameter

V

that

q

operates

on

If

V

is

the

formal

parameter

of

ri

then

the

system

invokes

ri

on

O.

Otherwise

V

is

a

derived

parameter

The

algorithm

inverts

each

parameter

in

the

dependency

graph

starting

from

V

until

the

formal

parameter

is

determined

The

Augment

procedure

in

figure

reverse-evaluates

the

expression

of

a

quantified

parameter

to

determine

objects

to

which

other

parameters

can

be

bound

For

example

line

in

Augment

covers

the

example

on

member

mentioned

earlier

this

section

If

the

formal

parameter

remains

undetermined

then

the

system

can

not

chain

to

ri

in

contrast

failure

to

find

an

object

to

bind

to

the

formal

parameter

using

the

heuristic

approach

might

only

mean

that

the

heuristic

is

too

weak

In

figure

we

see

the

results

of

the

forward

chain

after

Marvel

has

invoked

touch

-LSB-

-RSB-

from

figure

When

the

predicate

-LRB-

m.status

Modified

-RRB-

is

asserted

on

the

object

database

the

system

forward

chains

to

the

touch

-LSB-

l

LIB

-RSB-

rule

from

figure

To

determine

the

object

to

bind

to

the

formal

parameter

the

system

inverts

the

expression

which

defines

the

parameter

m.

Initially

m

is

bound

to

Figure

outlines

the

progress

of

the

algorithm

giving

key

values

at

the

specified

lines

Note

how

the

algorithm

inverts

the

expressions

for

m

and

p

in

order

as

it

proceeds

to

determine

l

After

the

first

call

to

Augment

-RRB-

is

added

to

the

list

of

objects

bound

to

p

-LRB-

in

line

-RRB-

The

second

iteration

inverts

the

expression

for

p

and

binds

l

to

This

determines

the

formal

parameter

and

touch

is

instantiated

for

It

might

not

be

clear

why

this

logical

inversion

process

is

preferred

to

searching

the

object

database

Since

the

expression

for

a

parameter

can

be

arbitrarily

complicated

any

heuristic

aside

from

searching

the

entire

object

database

will

potentially

fail

to

find

certain

objects

Par.objects

is

the

set

of

objects

that

are

bound

to

Par

T.value

is

the

set

of

parameter

augmentations

generated

by

the

AUGMENT

procedure

for

a

given

expression

F

is

the

formal

parameter

of

the

chained-to

rule

S

is

a

stack

of

parameters

to

be

inverted

ALGORITHM

Invert

-LSB-

V

-RSB-

IF

-LRB-

V

is

the

formal

parameter

F

-RRB-

THEN

Add

-LSB-

F.objects

O

-RSB-

ELSE

S

-LCB-

V

-RCB-

V.objects

-LCB-

O

-RCB-

WHILE

S

not

empty

DO

V

POP

-LRB-

S

-RRB-

IF

-LRB-

V

F

-RRB-

THEN

CONTINUE

-LCB-

Skip

if

this

is

the

formal

parameter

-RCB-

-LCB-

The

expression

for

the

derived

parameter

V

is

a

quantification

of

an

arbitrary

expression

T.

-RCB-

-LCB-

We

represent

T

as

an

AND/OR

tree

of

individual

expression

and

reverse-evaluate

for

V

-RCB-

Augment

-LSB-

T

V

-RSB-

Evaluate

-LSB-

T.value

-RSB-

-LCB-

For

every

-LRB-

derived

-RRB-

parameter

that

has

had

their

set

of

possible

objects

augmented

by

the

-RCB-

-LCB-

previous

function

push

onto

the

stack

S.

-RCB-

FOR

every

parameter

P

in

T.value

DO

PUSH

-LRB-

P

-RRB-

END

Instantiate

the

rule

R

for

each

object

from

the

F.object

list

END

-LCB-

of

ALGORITHM

Invert

-LSB-

V

-RSB-

-RCB-

N

is

an

arbitrary

expression

represented

by

an

AND/OR

tree

V

is

the

parameter

being

quantified

in

this

expression

N.

Par

is

the

other

parameter

in

the

navigational

primitive

expression

-LRB-

primitives

are

binary

-RRB-

PROCEDURE

Augment

-LSB-

N

V

-RSB-

FOR

all

children

C

of

N

DO

Augment

-LSB-

C

V

-RSB-

IF

-LRB-

N

is

an

internal

node

-RRB-

THEN

CASE

N

OF

AND

N.value

Intersection

of

C.value

FORALL

children

C

of

N.

OR

N.value

Union

of

C.value

FORALL

children

C

of

N.

END

ELSE

-LCB-

Note

that

N

is

a

navigational

primitive

V

is

the

-LRB-

known

-RRB-

parameter

in

this

primitive

-RCB-

-LCB-

which

is

being

quantified

Par

is

the

other

-LRB-

unknown

-RRB-

parameter

in

the

primitive

-RCB-

CASE

N

OF

Member

-LSB-

V.attr

Par

-RSB-

-LCB-

V

is

a

parent

of

Par

-RCB-

N.value

Add

-LSB-

Par.objects

objects

in

-LRB-

V.objects

-RRB-

attr

-RSB-

Member

-LSB-

Par.attr

V

-RSB-

-LCB-

V

is

a

child

of

Par

-RCB-

N.value

Add

-LSB-

Par.objects

parent

object

of

-LRB-

V.objects

-RRB-

-RSB-

Linkto

-LSB-

V.attr

Par

-RSB-

-LCB-

V

links

to

Par

-RCB-

N.value

Add

-LSB-

Par.objects

objects

from

-LRB-

V.objects

-RRB-

attr

that

linkto

an

object

of

the

Par

class

-RSB-

Linkto

-LSB-

Par.attr

V

-RSB-

-LCB-

V

is

linked

from

Par

-RCB-

N.value

Add

-LSB-

Par.objects

objects

from

the

Par

class

that

linkto

-LRB-

V.objects

-RRB-

through

the

attr

attribute

-RSB-

Ancestor

-LSB-

V

Par

-RSB-

-LCB-

V

is

an

ancestor

of

Par

-RCB-

N.value

Add

-LSB-

Par.objects

objects

from

the

Par

class

that

are

a

descendant

from

-LRB-

V.objects

-RRB-

-RSB-

Ancestor

-LSB-

Par

V

-RSB-

-LCB-

V

is

a

descendant

of

Par

-RCB-

N.value

Add

-LSB-

Par.objects

objects

from

the

Par

class

that

are

an

ancestor

of

-LRB-

V.objects

-RRB-

-RSB-

END

END

-LCB-

of

PROCEDURE

Augment

-LSB-

N

V

-RSB-

-RCB-

Figure

Inverting

Derived

Parameters

Algorithm

Augment

-LSB-

m

-RSB-

No

children

Leaf

node

N.value

Add

-LSB-

p.objects

-RSB-

-LRB-

ancestor

-LSB-

p

m

-RSB-

-RRB-

Augment

-LSB-

p

-RSB-

No

children

Leaf

node

N.value

Add

-LSB-

l.objects

-RSB-

-LRB-

member

-LSB-

p.libraries

l

-RSB-

-RRB-

Invert

-LSB-

-RSB-

V

m

S

-LCB-

m

-RCB-

m.objects

-LCB-

-RCB-

V

m

S

-LCB-

-RCB-

m

l

Augment

-LSB-

m

-RSB-

Evaluate

-LSB-

-RSB-

p.objects

-LCB-

-RCB-

Push

-LRB-

p

-RRB-

S

-LCB-

p

-RCB-

V

p

S

-LCB-

-RCB-

p

l

Augment

-LSB-

p

-RSB-

Evaluate

-LSB-

-RSB-

l.objects

-LCB-

-RCB-

Push

-LRB-

l

-RRB-

S

-LCB-

l

-RCB-

V

l

S

-LCB-

-RCB-

l

l

S

is

empty

Instantiate

Touch

-LSB-

-RSB-

m

-LRB-

ancestor

-LSB-

p

m

-RSB-

-RRB-

Add

-LSB-

p.objects

-RSB-

-LRB-

member

-LSB-

p.libraries

l

-RSB-

-RRB-

Add

-LSB-

l.objects

-RSB-

Figure

Solving

the

chain

for

figure

which

could

be

bound

to

the

formal

parameter

In

Marvel

and

RBDEs

in

general

the

object

database

might

contain

several

thousand

and

possibly

more

objects

It

would

be

extremely

inefficient

to

perform

a

search

on

the

entire

object

database

We

are

currently

investigating

the

implementation

of

the

logic-based

inversion

method

Related

Work

There

are

many

other

systems

that

support

intelligent

assistance

we

focus

on

those

systems

that

execute

some

form

of

chaining

to

perform

this

assistance

EPOS

-LSB-

-RSB-

and

TPLAN

-LSB-

-RSB-

attempt

to

achieve

subgoals

-LRB-

backward

chaining

-RRB-

when

the

condition

for

an

invoked

rule

is

not

satisfied

Darwin

-LSB-

-RSB-

carries

out

inferencing

to

determine

whether

or

not

an

activity

is

allowed

These

kind

of

systems

perform

strictly

backward

chaining

and

are

usually

Prolog-based

The

unification

scheme

in

Prolog

successfully

determines

parameters

to

match

because

the

body

of

Prolog

clauses

have

no

quantified

expressions

like

those

in

Msl

If

Marvel

allowed

effects

to

be

asserted

on

derived

parameters

then

backward

chaining

would

also

be

affected

by

the

chaining

problem

As

it

stands

however

Marvel

's

backward

chaining

cycle

like

Prolog

unification

is

straightforward

Oikos

-LSB-

-RSB-

extends

a

Darwin-like

system

to

more

complicated

control

structures

among

rules

but

uses

a

blackboard

scheme

that

passes

all

necessary

information

from

one

blackboard

to

another

directly

thus

bypassing

the

chaining

problem

The

merlin

-LSB-

-RSB-

system

has

both

backward

and

forward

chaining

capabilities

but

it

avoids

the

chaining

problem

backward

chaining

is

resolved

through

Prolog-style

unification

while

forward

chaining

explicitly

lists

the

parameters

-LRB-

much

like

a

blackboard

scheme

-RRB-

that

are

passed

from

one

rule

to

the

next

alf

-LSB-

-RSB-

has

forward

chaining

capabilities

but

the

paper

does

not

state

how

it

determines

parameters

grapple

-LSB-

-RSB-

is

exceptional

in

that

it

explicitly

addresses

the

parameter

issue

that

arises

in

chaining

between

rules

Odin

-LSB-

-RSB-

-LSB-

-RSB-

and

systems

have

rules

that

are

triggers

activated

when

the

state

of

the

object

database

changes

The

chaining

problem

does

not

appear

under

this

data-driven

approach

since

there

is

no

specified

flow

of

control

Rule-based

database

systems

like

postgres

-LSB-

-RSB-

work

in

a

similar

fashion

The

composite-object

hierarchy

allows

Marvel

to

make

efficient

navigational

queries

to

the

object

database

in

addition

the

algorithmic

approach

outlined

in

section

is

dependent

on

this

structure

since

this

makes

an

efficient

inversion

process

The

probe

DBMS

-LSB-

-RSB-

provides

for

queries

on

object

databases

and

outlines

some

methods

for

optimization

If

a

system

has

relations

instead

of

structure

that

determine

the

interconnections

between

the

object

entities

-LRB-

like

in

EPOS

-RRB-

then

these

navigational

queries

can

also

be

implemented

but

will

only

be

as

efficient

as

the

system

's

query

optimizer

Contributions

In

the

current

implementation

of

Marvel

we

address

the

chaining

problem

by

using

a

fixed

set

of

heuristics

to

search

for

the

proper

parameter

Our

heuristics

seemed

satisfactory

for

many

cases

However

as

we

enhanced

the

Msl

rule

language

and

began

experimenting

with

more

intricate

rules

chaining

cases

arose

that

escaped

our

heuristics

One

possibility

would

be

to

increase

the

breadth

of

the

searching

heuristics

these

cases

can

be

more

efficiently

solved

by

logically

inverting

the

derived

parameters

We

have

given

an

algorithm

that

performs

this

inversion

process

for

an

arbitrarily

complex

Msl

rule

References

-LSB-

-RSB-

V.

Ambriola

P.

Ciancarini

and

Montanegro

C.

Software

Process

Enactment

in

Oikos

In

Fourth

ACM

SIGSOFT

Symposium

on

Software

Development

Environments

pages

-LCB-

Irvine

CA

December

-LSB-

-RSB-

Naser

S.

Barghouti

and

Gail

E.

Kaiser

Modeling

Concurrency

in

Rule-Based

Development

Environments

IEEE

Expert

-LRB-

-RRB-

-LCB-

December

-LSB-

-RSB-

G.

M.

Clemm

The

Workshop

System

-LCB-

A

Practical

Knowledge-Based

Software

Environment

In

ACM

SIGSOFT/SIGPLAN

Software

Engineering

Symposium

on

Practical

Software

Development

Environments

pages

-LCB-

Boston

November

ACM

Press

Special

issue

of

SIGPLAN

Notices

-LRB-

-RRB-

February

-LSB-

-RSB-

D.

Cohen

Compiling

complex

database

transition

triggers

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Portland

OR

June

Special

issue

of

SIGMOD

Record

-LRB-

-RRB-

June

-LSB-

-RSB-

Umeshwar

Dayal

et

al.

Simplifying

complex

objects

The

probe

approach

to

modeling

and

querying

them

In

Stanley

B.

Zdonik

and

David

Maier

editors

Readings

in

Object-Oriented

Database

Systems

pages

-LCB-

Morgan

Kaufmann

Inc.

-LSB-

-RSB-

Deborah

Frincke

Myla

Archer

and

Karl

Levitt

A

Planning

System

for

the

Intelligent

Testing

of

Secure

Software

In

Knowledge-Based

Software

Assistant

pages

-LCB-

Liverpool

NY

September

-LSB-

-RSB-

Mark

Gisi

and

Gail

E.

Kaiser

Extending

A

Tool

Integration

Language

-LRB-

Experience

Report

-RRB-

Technical

Report

Columbia

University

Department

of

Computer

Science

April

Submitted

for

publication

-LSB-

-RSB-

C.

Godart

F.

Charoy

and

J.C.

Derniame

Computer

Assisted

Software

Engineering

Characterisation

and

Modeling

ICCI

Toronto

-LSB-

-RSB-

H.

H?unnekens

and

G.

Junkermann

and

B.

Peuschel

and

W.

Sch?afer

J.

Vagts

A

Step

Towards

Knowledge-based

Software

Process

Modeling

In

Conference

on

System

Development

Environments

and

Factories

-LRB-

SDE&F

-RRB-

Pitman

Publishing

London

-LSB-

-RSB-

K.

E.

Huff

and

V.

R.

Lesser

A

Plan-based

Intelligent

Assistant

that

Supports

the

Software

Development

Process

In

ACM

SIGSOFT/SIGPLAN

Software

Engineering

Symposium

on

Practical

Software

Development

Environments

pages

-LCB-

Boston

MA

November

Special

issue

of

SIGPLAN

Notices

-LRB-

-RRB-

February

-LSB-

-RSB-

Gail

E.

Kaiser

Naser

S.

Barghouti

Peter

H.

Feiler

and

Robert

W.

Schwanke

Database

Support

for

Knowledge-Based

Engineering

Environments

IEEE

Expert

-LRB-

-RRB-

-LCB-

Summer

-LSB-

-RSB-

Gail

E.

Kaiser

Naser

S.

Barghouti

and

Michael

H.

Sokolsky

Experience

with

Process

Modeling

in

the

Marvel

Software

Development

Environment

Kernel

In

Bruce

Shriver

editor

Annual

Hawaii

International

Conference

on

System

Sciences

volume

II

pages

-LCB-

Kona

HI

January

-LSB-

-RSB-

Gail

E.

Kaiser

Peter

H.

Feiler

and

Steven

S.

Popovich

Intelligent

Assistance

for

Software

Development

and

Maintenance

IEEE

Software

-LRB-

-RRB-

-LCB-

May

-LSB-

-RSB-

Chunnian

Liu

Software

Process

Planning

and

Execution

Coupling

vs.

Integration

Technical

report

Norwegian

Institute

of

Technology

-LRB-

NTH

-RRB-

November

-LSB-

-RSB-

N.

H.

Minsky

and

D.

Rozenshtein

A

Software

Development

Environment

for

Law-Governed

Systems

In

ACM

SIGSOFT/SIGPLAN

Software

Engineering

Symposium

on

Practical

Software

Development

Environments

pages

-LCB-

Boston

MA

November

-LSB-

-RSB-

Michael

Stonebraker

and

Lawrence

A.

Rowe

The

Design

of

postgres

In

Carlo

Zaniolo

editor

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Washington

DC

May

Special

issue

of

SIGMOD

Record

-LRB-

-RRB-

June

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

lifecycle support
programming-in-the-large
reasoning techniques