revised

version

will

appear

in

ECOOP

proceedings

Design

and

Partial

Evaluation

of

Meta-objects

for

a

Concurrent

Reflective

Language

Hidehiko

MASUHARA

masuhara@graco.c.u-tokyo.ac.jp

Akinori

YONEZAWAy

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

Abstract

In

concurrent

object-oriented

languages

customizable

meta-objects

are

powerful

abstraction

for

extending

and

optimizing

crucial

implementation

mechanisms

such

as

method

dispatch

and

mutual

exclusion

However

interpretive

execution

of

meta-objects

causes

severe

performance

penalty

Our

previous

study

shows

that

applying

partial

evaluation

to

meta-interpreters

is

useful

for

alleviating

the

problem

but

partial

evaluation

of

existing

meta-objects

virtually

fails

because

they

are

concurrent

objects

and

designed

as

state-transition

machines

This

paper

proposes

a

new

meta-object

design

for

our

reflective

language

which

can

be

effectively

optimized

using

partial

evaulation

The

crux

of

the

meta-object

design

is

separation

of

state-related

operations

which

is

realized

by

using

the

reader/writer

methods

in

our

concurrent

object-oriented

language

Schematic

Our

benchmarks

showed

that

a

non-trivial

program

with

partially

evaluated

meta-objects

runs

-LRB-

-RRB-

times

faster

than

the

one

with

merely

compiled

meta-objects

and

-LRB-

-RRB-

only

times

slower

than

the

directly

compiled

program

without

meta-objects

which

is

supposed

to

have

the

best

performance

In

addition

a

program

that

uses

a

customized

meta-object

for

guarded

method

invocation

runs

as

efficient

as

a

directly

compiled

program

that

implements

the

same

functionality

with

application-level

methods

Introduction

Reflection

in

Parallel/Distributed

Programs

Concurrent

objects

in

practical

parallel

and

distributed

applications

tend

to

have

complicated

structures

for

achieving

efficiency

reliability

portability

and

re-usability

To

alleviate

the

complexity

number

of

language

mechanisms

inheritance

transaction

object

migration

etc.

are

proposed

For

example

guarded

method

invocation

which

conditionally

accepts

invocation

requests

is

useful

to

describe

objects

like

bounded

buffers

However

such

mechanisms

are

not

always

implemented

in

many

languages

because

-LRB-

-RRB-

some

mechanisms

are

incompatible

each

other

-LRB-

-RRB-

supporting

a

new

mechanism

could

slow

down

the

language

even

when

the

mechanism

is

not

used

in

a

program

and

-LRB-

-RRB-

implementation

of

a

new

mechanism

in

the

language

requires

a

tremendous

amount

of

effort

of

language

implementors

A

different

possibly

better

approach

is

language

extension

via

meta-objects

By

installing

a

customized

meta-object

the

application

programmer

can

use

a

new

language

mechanism

as

if

it

is

built-in

Advanced

programmers

may

even

develop

their

own

meta-objects

to

meet

their

requirements

This

approach

is

also

beneficial

to

the

language

implementors

they

Department

of

Graphics

and

Computer

Science

Graduate

School

of

Arts

and

Sciences

University

of

Tokyo

yDepartment

of

Information

Science

University

of

Tokyo

can

devote

themselves

to

implementation

of

simple

core

languages

by

separating

hard-to-beimplemented

mechanisms

as

extensions

Based

on

those

observations

we

are

developing

a

reflective

object-oriented

concurrent

language

in

which

we

provide

such

extensibility

via

computational

reflection

-LSB-

-RSB-

In

meta-objects

provide

abstraction

with

which

the

user

can

extend

or

modify

crucial

mechanisms

of

objects

including

method

invocation

request

method

dispatch

state

management

and

mutual

exclusion

In

addition

meta-interpreters

provide

abstraction

to

customize

syntax

and

semantics

of

bodies

of

methods

and

functions

Reflective

annotations

can

be

defined

as

programming

directives

in

base-level

programs

whose

interpretations

can

also

be

modified

The

details

of

the

language

features

of

have

been

presented

elsewhere

-LSB-

-RSB-

In

this

paper

we

discuss

the

meta-object

design

of

especially

from

the

viewpoint

of

efficient

implementation

Implementation

Techniques

of

Meta-objects

Despite

its

extensibility

customizable

meta-objects

have

a

problem

of

efficiency

Assume

that

a

meta-object

implements

a

customized

method

dispatch

algorithm

In

a

naive

implementation

the

method

dispatch

for

the

respective

base-level

object

is

achieved

by

a

number

of

method

invocations

at

the

meta-level

i.e.

interpretive

execution

Moreover

the

customization

makes

the

application

of

important

optimization

techniques

such

as

inlining

-LSB-

-RSB-

because

it

could

change

the

dispatching

rules

on

which

the

optimizers

rely

As

a

result

existence

of

meta-objects

easily

slow

down

the

language

more

than

times

There

have

been

several

studies

on

this

problem

mostly

as

implementation

techniques

of

reflective

languages

ffl

Some

parts

of

the

meta-system

are

not

subject

to

meta-level

modification

via

reification

For

example

in

the

reflective

language

Open

C++

version

-LSB-

-RSB-

only

message

passing

object

creation

and

instance

variable

accesses

can

be

reified

This

not

only

restricts

user

programmability

but

also

makes

the

language

model

unclear

in

that

much

of

the

meta-level

functionalities

are

hidden

inside

black-boxes

and

the

programmer

may

not

obtain

a

clear

view

of

how

his

meta-level

programming

and

the

black

boxes

will

interact

Another

example

would

be

JDK

which

offers

reflection

API

-LSB-

-RSB-

It

supports

only

introspective

operations

they

can

be

efficiently

implemented

but

give

few

extensibility

at

the

same

time

ffl

The

system

embodies

a

set

of

ad-hoc

optimizations

transparent

to

the

user

For

example

our

previous

work

-LSB-

-RSB-

assumes

that

most

objects

will

not

be

customized

and

thus

could

be

mostly

compiled

and

switched

to

general

interpreted

execution

upon

user

customization

Its

effectiveness

is

limited

to

however

cases

where

optimization

is

possible

and

interpretation

overhead

heavily

affects

the

overall

performance

otherwise

ffl

The

compiler

inspects

behavior

of

a

meta-level

program

with

respect

to

a

base-level

program

and

removes

interpretation

using

techniques

like

partial

evaluation

-LSB-

-RSB-

This

approach

is

more

systematic

than

the

above

two

approaches

but

requires

intensive

analysis

of

the

meta-level

program

that

may

include

user

customization

We

will

further

discuss

this

approach

below

Optimization

Using

Partial

Evaluation

The

execution

of

meta-objects

is

interpretive

in

that

they

manipulate

a

base-level

program

and

its

run-time

data

and

the

computation

specified

in

the

base-level

program

is

embodied

as

an

indirect

result

of

meta-level

computation

However

once

the

base-level

program

is

given

most

computation

that

depends

only

on

the

base-level

program

can

be

performed

in

advance

to

the

program

execution

by

generating

a

specialized

program

which

contains

computation

that

depends

on

run-time

data

extracted

from

the

meta-level

computation

This

process

is

often

referred

as

partial

evaluation

-LSB-

-RSB-

of

the

meta-level

program

with

respect

to

the

baselevel

program

or

the

Futamura

Projections

-LSB-

-RSB-

Our

previous

studies

successfully

apply

partial

evaluation

to

the

meta-interpreters

in

reflective

languages

-LSB-

-RSB-

In

theory

meta-objects

could

also

be

optimized

by

partial

evaluation

However

it

virtually

fails

because

-LRB-

-RRB-

the

design

of

meta-objects

in

existing

reflective

languages

is

not

suitable

for

partial

evaluation

and

-LRB-

-RRB-

there

are

few

partial

evaluators

that

can

deal

with

concurrent

objects

We

therefore

re-design

meta-objects

with

consideration

to

application

of

partial

evaluation

and

will

show

an

optimization

framework

for

the

resulting

meta-objects

We

therefore

tackle

optimization

of

meta-objects

from

their

design

The

rest

of

the

paper

is

organized

as

follows

In

Section

we

discuss

why

reasoning

about

the

meta-objects

is

difficult

by

reviewing

an

existing

meta-object

design

In

Section

our

proposed

meta-object

design

is

presented

and

its

optimization

technique

using

partial

evaluation

in

Section

Section

gives

performance

measurement

of

the

optimized

objects

Section

discusses

other

efficient

implementation

techniques

for

meta-objects

Section

concludes

the

paper

Problems

of

Existing

Meta-object

Design

Many

concurrent

object-oriented

languages

have

mutual

exclusion

mechanisms

to

assure

consistency

A

conservative

commonly

found

approach

is

to

mutually

exclude

all

method

executions

per-object

basis

where

the

programmers

can

write

accesses

to

instance

variables

in

a

method

with

less

concern

about

access

conflicts

On

designing

a

meta-object

the

mutual

exclusion

mechanism

plays

a

key

role

-LRB-

-RRB-

The

mutual

exclusion

mechanism

of

base-level

objects

should

be

implemented

in

extensible

ways

at

the

meta-level

-LRB-

-RRB-

The

implementation

written

as

methods

of

meta-objects

is

executed

under

some

mutual

exclusion

mechanism

which

is

usually

the

same

as

the

one

in

the

default

base-level

In

previous

reflective

languages

a

meta-object

is

defined

as

a

state

transition

machine

to

meet

the

above

requirements

For

example

Figure

is

a

simplified

of

the

default

meta-object

in

the

language

ABCL/R

-LSB-

-RSB-

which

is

defined

as

a

state

transition

machine

as

illustrated

in

Figure

A

method

invocation

on

a

base-level

object

is

represented

by

an

invocation

of

the

method

receive

on

its

meta-object

In

receive

the

message

-LRB-

an

object

that

contains

the

method

name

and

arguments

-RRB-

is

immediately

put

into

the

message

queue

-LRB-

queue

-RRB-

so

that

it

will

be

eventually

processed

If

the

object

is

not

processing

any

methods

-LRB-

i.e.

mode

is

dormant

-RRB-

it

changes

mode

to

active

and

calls

the

method

accept

The

method

accept

gets

one

message

from

queue

and

lets

the

evaluator

execute

the

matching

method

to

the

message

The

evaluator

recursively

interprets

expressions

of

the

method

When

the

evaluator

reaches

the

end

of

the

base-level

method

it

invokes

the

method

finish

of

the

meta-object

The

method

finish

examines

queue

for

any

pending

messages

which

are

received

during

the

evaluation

If

queue

is

empty

it

changes

mode

to

dormant

Otherwise

it

invokes

accept

again

for

further

execution

When

we

apply

partial

evaluation

to

this

meta-object

definition

with

respect

to

a

certain

base-level

object

the

result

is

far

from

satisfactory

The

reasons

are

follows

ffl

Since

the

meta-object

is

defined

as

a

state

transition

machine

its

behavior

can

not

be

determined

without

static

information

on

some

key

instance

variables

such

as

mode

definition

here

is

given

in

the

Schematic

's

syntax

-LSB-

-RSB-

which

is

different

from

the

original

version

for

the

sake

of

uniformity

exclamation

mark

in

the

method

name

conventionally

indicates

that

the

method

may

change

the

object

's

state

Class

definition

-LRB-

define-class

metaobj

-LRB-

-RRB-

mode

queue

state

methods

evaluator

-RRB-

instance

variables

Method

definition

for

class

metaobj

-LRB-

define-method

metaobj

-LRB-

receive

self

message

-RRB-

Here

self

is

bound

to

the

metaobject

itself

-LRB-

put

queue

message

-RRB-

-LRB-

if

-LRB-

eq

mode

dormant

-RRB-

If

it

is

dormant

the

received

-LRB-

begin

-LRB-

set

mode

active

-RRB-

message

is

immediately

accepted

-LRB-

future

-LRB-

accept

self

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

method

dispatch

-LRB-

define-method

metaobj

-LRB-

accept

self

-RRB-

-LRB-

let

-LRB-

-LRB-

mes

-LRB-

get

queue

-RRB-

-RRB-

Get

a

message

from

the

queue

-LRB-

m

-LRB-

find

methods

mes

-RRB-

-RRB-

method

lookup

-LRB-

env

-LRB-

extend

state

-LRB-

args

mes

-RRB-

-RRB-

-RRB-

-RRB-

creation

of

an

evaluation

env

-LRB-

future

-LRB-

eval

evaluator

-LRB-

exps

m

-RRB-

env

self

-RRB-

-RRB-

-RRB-

-RRB-

evaluation

end

of

method

execution

-LRB-

define-method

metaobj

-LRB-

finish

self

-RRB-

-LRB-

if

-LRB-

empty

queue

-RRB-

Check

the

queue

for

pending

messages

-LRB-

set

mode

dormant

-RRB-

If

turn

into

the

dormant

mode

-LRB-

future

-LRB-

accept

self

-RRB-

-RRB-

-RRB-

-RRB-

Otherwise

accept

one

of

them

meta-interpreter

-LRB-

define-method

metaobj

-LRB-

eval

self

exp

env

owner

-RRB-

It

evaluates

exp

under

env

When

finished

it

invokes

finish

of

owner

-RRB-

The

expression

-LRB-

future

-LRB-

m

r

en

-RRB-

-RRB-

asynchronously

invokes

method

m

of

object

r

with

parameters

en

It

is

asynchronous

in

that

the

sender

continues

subsequent

computation

without

waiting

for

the

return

value

On

the

other

hand

expression

-LRB-

m

r

en

-RRB-

is

synchronous

invocation

the

sender

waits

for

the

return

value

Figure

Definition

of

ABCL/R

meta-object

state

statemessagecondition

action

activedormanttrue

accept

true

queue

queue

queue

accept

receive

finish!receive

finish

Figure

State

Transition

Diagram

of

ABCL/R

Meta-object

and

queue

For

example

if

the

return

value

of

-LRB-

get

queue

-RRB-

in

the

method

accept

were

unknown

-LRB-

dynamic

-RRB-

at

the

specialization

time

specialization

of

method

dispatch

-LRB-

-LRB-

find

methods

m

-RRB-

-RRB-

and

interpretation

of

the

method

body

-LRB-

-LRB-

eval

evaluator

exp

env

self

-RRB-

-RRB-

would

be

left

unspecialized

This

means

that

most

interpretive

computation

can

not

be

eliminated

by

partial

evaluation

ffl

Information

that

should

be

known

-LRB-

static

-RRB-

to

the

partial

evaluator

is

transferred

via

instance

variables

between

consecutive

method

invocations

Such

information

can

not

be

available

at

the

receiver

's

side

without

extensive

analysis

on

data

structures

For

example

the

value

of

-LRB-

get

queue

-RRB-

in

accept

which

would

be

that

of

message

in

receive

is

crucial

for

specialization

but

it

requires

analysis

of

queue

This

requirement

sometimes

become

overwhelming

because

queue

might

be

an

user-defined

object

ffl

The

key

instance

variables

are

mutable

i.e.

their

values

are

changed

during

execution

The

execution

model

of

the

meta-objects

ABCM

-LSB-

-RSB-

in

this

case

however

specifies

that

method

invocations

on

an

object

will

be

processed

in

the

FIFO

order

We

thus

have

to

anticipate

that

the

execution

two

consecutive

methods

may

be

interleaved

i.e.

it

is

safe

to

assume

that

those

variables

may

be

changed

in

between

method

invocations

For

example

we

should

not

assume

that

the

variable

queue

at

the

beginning

of

the

method

accept

followed

by

receive

remain

unchanged

since

the

method

is

invoked

in

receive

Though

there

are

partial

evaluators

that

can

deal

with

mutable

variables

they

regard

a

mutable

variable

as

dynamic

-LRB-

unknown

-RRB-

unless

they

could

statically

determine

all

update

operations

to

the

variable

-LSB-

-RSB-

Due

to

the

above

reasons

a

partial

evaluator

conservatively

regards

most

variables

as

dynamic

Without

much

of

known

information

to

effectively

specialize

the

meta-level

computation

almost

all

the

computation

in

the

meta-object

still

remains

in

the

result

of

the

partial

evaluation

A

New

Meta-object

Design

We

propose

a

new

meta-object

design

for

a

reflective

concurrent

object-oriented

language

-LSB-

-RSB-

which

can

be

effectively

optimized

by

partial

evaluation

The

key

idea

is

to

separate

state-related

operations

from

the

other

operations

using

reader

and

writer

methods

of

Schematic

In

this

section

we

first

explain

the

reader/writer

methods

and

then

show

the

proposed

meta-object

design

Reader/Writer

Methods

Schematic

-LSB-

-RSB-

is

a

concurrent

object-oriented

language

based

on

Scheme

It

has

concurrency

primitives

such

as

future

and

touch

and

class-based

objects

Here

we

mainly

describe

the

reader/writer

methods

in

Schematic

which

play

a

key

role

in

our

meta-object

design

The

construct

define-method

defines

a

writer

method

which

can

modify

values

of

instance

variables

in

an

object

When

a

form

-LRB-

become

rexp

-RRB-

in

a

writer

method

is

evaluated

expressions

ei

are

first

evaluated

Then

the

values

of

variables

vi

are

changed

to

the

respective

evaluated

values

all

at

once

Finally

the

result

expression

-LRB-

rexp

-RRB-

is

evaluated

Invocations

of

writer

methods

on

an

object

are

mutually

excluded

-LRB-

Precisely

result

expressions

in

become

forms

are

out

of

the

mutual

exclusion

-RRB-

The

construct

define-method

defines

a

reader

method

which

can

not

modify

instance

variables

The

reader

methods

are

not

governed

by

the

mutual

exclusion

mechanism

it

can

be

executed

concurrently

even

with

a

writer

method

on

the

same

object

During

execution

of

a

reader

method

the

instance

variables

are

bound

to

the

values

extracted

from

the

object

's

status

at

the

beginning

of

the

method

Even

when

a

writer

method

executes

become

to

Class

definition

-LRB-

define-class

metaobj

-LRB-

-RRB-

lock

state-variables

state-values

methods

evaluator

-RRB-

Reception

of

a

message

-LRB-

define-method

metaobj

-LRB-

receive

self

message

-RRB-

-LRB-

if

-LRB-

writer

-LRB-

selector

message

-RRB-

-RRB-

check

the

type

of

message

-LRB-

accept-W

self

message

-RRB-

for

a

writer

method

-LRB-

accept

self

message

dummy

-RRB-

-RRB-

-RRB-

for

a

reader

method

Processing

for

a

writer

method

-LRB-

define-method

metaobj

-LRB-

accept-W

self

message

-RRB-

-LRB-

let

-LRB-

-LRB-

c

-LRB-

make-channel

-RRB-

-RRB-

-RRB-

channel

for

receiving

updated

state

-LRB-

acquire

lock

-RRB-

mutual

exclusion

begins

-LRB-

let

-LRB-

-LRB-

result

-LRB-

accept

self

messages

c

-RRB-

-RRB-

-RRB-

-LRB-

cell-set

state-values

-LRB-

touch

c

-RRB-

-RRB-

update

instance

variables

-LRB-

release

lock

-RRB-

end

of

mutual

exclusion

result

-RRB-

-RRB-

-RRB-

Method

lookup

and

invocation

-LRB-

define-method

metaobj

-LRB-

accept

self

message

update-channel

-RRB-

-LRB-

let

-LRB-

-LRB-

m

-LRB-

find

methods

message

-RRB-

-RRB-

method

lookup

-LRB-

env

-LRB-

make-env

self

-LRB-

method-formals

m

-RRB-

message

-RRB-

-RRB-

-RRB-

-LRB-

future

-LRB-

eval

evaluator

-LRB-

method-body

m

-RRB-

env

update-channel

-RRB-

-RRB-

-RRB-

-RRB-

Meta-interpreter

-LRB-

define-method

evaluator

-LRB-

eval

self

exp

env

update-channel

-RRB-

It

evaluates

exp

under

env

When

a

become

form

is

evaluated

it

creates

a

vector

of

new

updated

instance

variables

and

sends

it

to

update-channel

-RRB-

The

primitive

make-channel

creates

an

empty

channel

which

is

a

communication

medium

among

concurrently

running

threads

A

thread

sends

a

value

to

a

channel

c

by

executing

-LRB-

reply

value

c

-RRB-

and

receives

from

c

by

-LRB-

touch

c

-RRB-

Figure

Our

New

Meta-object

Design

modify

some

of

the

instance

variables

reader

methods

that

have

started

their

execution

before

the

become

operation

do

not

observe

the

effect

of

modification

Proposed

Meta-object

Design

We

propose

a

new

meta-object

design

aiming

to

solve

the

problems

discussed

in

Section

The

outline

of

the

design

is

shown

in

Figure

in

which

we

exploit

the

reader/writer

methods

of

Schematic

Compared

to

the

previous

meta-object

design

-LRB-

Figure

-RRB-

our

design

has

the

characteristics

as

follows

ffl

Behavior

of

the

meta-object

is

principally

defined

in

the

reader

methods

Operations

that

deal

with

mutable

data

are

separately

defined

as

writer

methods

to

external

objects

For

example

values

of

instance

variables

are

mutable

are

packed

in

the

mutable

vector

object

state-values

and

accesses

to

state-values

are

realized

through

the

writer

methods

cell-set

and

cell-ref

ffl

The

meta-object

straightforwardly

processes

each

method

invocation

request

and

realizes

mutual

exclusion

by

blocking

operations

-LRB-

e.g.

acquire

and

release

-RRB-

As

a

result

the

meta-object

is

no

longer

a

state-transition

machine

The

ability

of

multiple

method

invocations

on

the

same

object

makes

such

a

definition

style

possible

Without

reader

methods

blocking

operations

would

easily

lead

to

deadlock

ffl

For

mutual

exclusion

the

instance

variable

lock

is

defined

in

place

of

mode

and

queue

By

default

lock

is

a

simple

semaphore

that

has

the

operations

acquire

and

release

The

user

can

replace

lock

with

an

arbitrary

object

such

as

a

FIFO

queue

and

a

priority

queue

via

the

meta-level

programming

These

characteristics

solve

the

problems

of

application

of

partial

evaluation

in

Section

-LRB-

-RRB-

Under

the

execution

model

of

Schematic

-LSB-

-RSB-

it

is

safe

to

assume

that

consecutive

reader

method

invocations

are

not

interrupted

by

other

activities

we

therefore

can

use

most

of

partial

evaluation

techniques

for

sequential

languages

by

regarding

the

reader

methods

as

functions

-LRB-

-RRB-

Since

the

known

-LRB-

static

-RRB-

information

is

propagated

through

the

arguments

of

the

method

invocations

the

partial

evaluators

easily

use

such

information

for

specialization

-LRB-

-RRB-

The

mutual

exclusion

mechanism

which

is

implemented

by

the

blocking

operations

gets

rid

of

dynamic

branches

-LRB-

conditionals

with

dynamic

predicates

-RRB-

which

cause

a

termination

detection

problem

during

specialization

In

practice

we

have

successfully

partially

evaluated

the

meta-object

as

we

will

present

in

Figure

in

Section

How

the

methods

in

Figure

handle

messages

sent

to

the

base-level

object

is

explained

as

follows

receive

The

method

receive

simply

proceeds

to

invoke

methods

accept-W

or

accept

depending

on

the

type

of

the

base-level

method

that

is

to

be

invoked

accept-W

The

method

accept-W

wraps

the

method

accept

in

the

code

for

mutual

exclusion

and

update

of

base-level

instance

variables

It

first

locks

the

object

and

then

calls

accept

method

with

a

channel

c

It

then

waits

for

a

vector

of

updated

instance

variables

which

is

sent

by

the

become

form

in

the

base-level

method

on

c

by

the

touch

form

and

updates

state-values

with

the

received

value

Finally

it

unlocks

the

object

and

returns

the

result

of

the

method

Note

that

accept-W

does

not

modify

instance

variables

itself

accept

The

method

accept

merely

looks

up

a

method

for

a

given

message

and

lets

the

evaluator

execute

it

Make-env

is

an

auxiliary

method

to

create

an

evaluation

environment

It

first

extracts

a

vector

of

instance

variable

values

by

executing

-LRB-

cell-ref

state-values

-RRB-

and

then

creates

an

association

list

that

maps

each

of

the

instance

variable

names

to

the

extracted

value

and

each

formal

parameter

name

of

the

method

to

the

parameter

value

in

the

message

eval

The

method

eval

of

class

evaluator

and

its

auxiliary

methods

embody

a

metacircular

interpreter

which

is

similar

to

the

traditional

Lisp

meta-circular

interpreter

When

it

encounters

a

become

form

it

creates

a

vector

of

the

updated

instance

variables

and

then

sends

the

vector

to

update-channel

Optimization

using

Partial

Evaluation

In

our

proposed

meta-objects

most

operations

are

defined

in

the

reader

methods

and

a

few

invocations

to

external

objects

are

used

for

mutual

exclusion

and

state

modification

As

we

stated

earlier

the

meta-objects

can

be

regarded

mostly

as

a

functional

program

with

I/O

type

side-effects

from

the

viewpoint

of

partial

evaluation

In

this

section

we

show

an

optimization

framework

of

our

meta-objects

using

partial

evaluation

The

foremost

problem

to

apply

partial

evaluation

is

that

there

are

no

appropriate

partial

evaluators

for

our

purpose

because

the

meta-object

is

written

in

a

concurrent

object-oriented

language

Though

there

are

studies

on

partial

evaluators

for

concurrent

languages

-LSB-

-RSB-

they

focus

on

concurrency

and

pay

little

effort

to

support

crucial

features

of

sequential

languages

such

as

function

closures

and

data

structures

classes

constructors

P.E.resultexpressions

specializationpoint

functions

records

functions

meta-level

base-level

functionsmethods

functions

methodsclasses

functions

methodsclasses

pre-processingpartialevaluationpost-processing

-LRB-

d

-RRB-

-LRB-

h

-RRB-

-LRB-

a

-RRB-

-LRB-

b

-RRB-

-LRB-

c

-RRB-

-LRB-

e

-RRB-

-LRB-

f

g

-RRB-

Figure

Overview

of

Our

Optimization

Framework

-LRB-

define-class

point

-LRB-

-RRB-

x

y

-RRB-

returns

the

distance

from

the

origin

a

reader

method

-LRB-

define-method

point

-LRB-

distance

self

-RRB-

-LRB-

sqrt

-LRB-

-LRB-

square

x

-RRB-

-LRB-

square

y

-RRB-

-RRB-

-RRB-

-RRB-

moves

a

point

a

writer

method

-LRB-

define-method

point

-LRB-

move

self

dx

dy

-RRB-

-LRB-

become

t

x

-LRB-

x

dx

-RRB-

y

-LRB-

y

dy

-RRB-

-RRB-

-RRB-

Figure

Example

Base-level

Program

Our

solution

is

to

-LRB-

-RRB-

translate

meta-objects

into

a

sequential

program

and

-LRB-

-RRB-

use

a

partial

evaluator

for

a

sequential

language

Partial

evaluation

is

applied

for

each

base-level

method

invocation

i.e.

the

specialization

point

is

base-level

method

invocation

Since

the

methods

of

meta-objects

exhibit

almost

sequential

behavior

the

sequential

partial

evaluator

can

effectively

optimize

them

Concurrency

in

the

meta-objects

will

be

residualized

as

applications

to

primitives

Another

problem

is

compatibility

with

other

objects

The

resulting

object

of

our

optimization

should

support

meta-level

operations

that

is

defined

in

the

original

meta-object

At

the

same

time

the

object

should

behave

like

a

base-level

object

so

that

it

can

be

used

with

other

base-level

objects

To

satisfy

these

two

requirements

our

framework

generates

an

object

definition

which

is

a

combination

of

the

base

and

meta-level

objects

in

a

single

level

The

object

has

the

same

methods

to

the

ones

in

the

original

base-level

definition

and

the

body

of

each

method

is

a

specialized

code

of

the

meta-object

Figure

shows

the

overview

of

our

optimization

framework

It

consists

of

three

steps

-LRB-

-RRB-

translation

from

to

Scheme

-LRB-

-RRB-

partial

evaluation

and

-LRB-

-RRB-

translation

from

Scheme

to

Schematic

In

the

following

subsections

we

explain

the

details

of

each

step

using

an

example

base-level

program

-LRB-

Figure

-RRB-

and

the

default

meta-object

metaobj

-LRB-

Figure

-RRB-

Pre-processing

Meta-object

definitions

are

translated

into

a

Scheme

program

so

that

it

can

be

processed

by

a

Scheme

partial

evaluator

-LRB-

Figure

-LRB-

a

-RRB-

-RRB-

A

meta-level

object

is

converted

into

a

whose

fields

are

its

class

name

and

values

of

instance

variables

A

reader

method

is

converted

into

a

dispatching

function

and

a

class-specific

function

The

former

examines

the

class-name

our

partial

evaluator

does

not

natively

support

records

we

further

translate

into

cons-cells

-LRB-

define

-LRB-

specalization-point-move

point

state-values

lock

dx

dy

-RRB-

-LRB-

let

-LRB-

-LRB-

mobj

-LRB-

metaobject

point

-LRB-

-LRB-

distance

-LRB-

self

-RRB-

-RRB-

-RRB-

-LRB-

x

y

-RRB-

state-values

lock

-LRB-

make-evaluator

-RRB-

-RRB-

-RRB-

-LRB-

message

-LRB-

message

move

-LRB-

list

dx

dy

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

receive

mobj

message

-RRB-

-RRB-

-RRB-

Figure

Specialization

Point

Function

for

Method

move

of

Class

point

field

in

the

receiver

and

calls

a

matching

class-specific

function

Invocations

on

writer

methods

at

the

meta-level

methods

should

not

be

performed

at

the

partial

evaluation

time

as

they

will

modify

the

state

of

objects

Therefore

the

writer

methods

are

not

passed

to

the

partial

evaluators

and

simply

copied

into

the

resulting

Schematic

program

-LRB-

Figure

-LRB-

b

-RRB-

-RRB-

No

translations

are

needed

for

the

base-level

definitions

since

they

are

used

as

data

to

the

meta-level

program

Functions

however

are

simply

copied

to

the

resulting

Schematic

program

-LRB-

Figure

-LRB-

c

-RRB-

-RRB-

Partial

Evaluation

We

partially

evaluate

the

meta-level

program

for

each

base-level

method

invocation

For

example

given

the

base-level

program

like

Figure

the

meta-level

computation

that

corresponds

to

the

following

base-level

method

invocation

will

be

processed

-LRB-

move

p

dx

dy

-RRB-

where

p

pointfx

x

y

yg

-LRB-

Here

the

variables

written

in

italic

fonts

-LRB-

e.g.

dx

dy

x

and

y

-RRB-

are

dynamic

data

The

variable

p

is

a

partially

static

data

it

is

known

as

an

object

of

class

point

but

values

of

instance

variables

x

and

y

are

dynamic

-LRB-

unknown

-RRB-

-RRB-

The

corresponding

meta-level

computation

is

the

following

expression

-LRB-

receive

mobj

message

-RRB-

where

mobj

metaobjfclass

point

methods

-LRB-

-LRB-

distance

-LRB-

self

-RRB-

-RRB-

-RRB-

state-vars

-LRB-

x

y

-RRB-

state-values

s

lock

l

evaluator

-LRB-

make-evaluator

-RRB-

g

message

messagefselector

move

arguments

-LRB-

list

dx

dy

-RRB-

g

To

partially

evaluate

the

meta-level

computation

like

the

above

one

we

generate

a

specialization

point

function

for

each

base-level

method

-LRB-

Figure

-LRB-

d

-RRB-

-RRB-

The

function

takes

a

vector

of

instance

variables

lock

and

parameters

for

the

method

as

its

arguments

When

called

it

creates

mobj

and

message

and

invokes

the

method

receive

on

mobj

-LRB-

Figure

-RRB-

The

partial

evaluator

specializes

the

function

assuming

that

all

parameters

to

the

function

are

dynamic

We

use

an

online

partial

evaluator

for

Scheme

-LSB-

-RSB-

-LRB-

Figure

-LRB-

e

-RRB-

-RRB-

It

specializes

not

only

the

methods

of

metaobj

but

also

those

of

evaluator

in

The

compilation

techniques

of

the

meta-interpreter

is

described

in

the

other

literature

-LSB-

-RSB-

the

convenience

of

benchmarks

instead

of

a

real

meta-interpter

we

used

a

fake

evaluator

that

directly

executes

the

body

of

methods

This

will

be

discussed

in

Section

Post-processing

The

final

step

is

to

re-translate

the

results

of

partial

evaluation

-LRB-

in

Scheme

-RRB-

into

concurrent

objects

-LRB-

in

Schematic

-RRB-

Here

we

generate

class

declarations

constructor

functions

and

methods

as

are

shown

in

Figure

ffl

For

each

combination

of

base

and

meta-level

classes

a

specialized

class

is

defined

-LRB-

Figure

-LRB-

f

-RRB-

-RRB-

Since

the

class

is

a

specialized

version

of

the

meta-level

class

it

has

the

same

instance

variables

as

the

original

meta-object

-LRB-

E.g.

the

class

metaobject

point

in

Figure

-RRB-

ffl

A

function

that

mimics

the

base-level

constructor

is

defined

for

each

specialized

class

-LRB-

Figure

-LRB-

g

-RRB-

-RRB-

For

example

the

function

point

in

Figure

is

such

a

constructor

which

creates

an

object

belonging

to

class

metaobject

point

with

proper

initial

valeus

ffl

Methods

of

the

specialized

classes

are

defined

-LRB-

Figure

-LRB-

h

-RRB-

-RRB-

The

name

of

each

method

is

the

same

as

the

original

base-level

methods

-LRB-

The

method

distance

and

move

of

class

metaobject

point

in

Figure

are

such

examples

-RRB-

Therfore

the

specialized

object

has

the

same

interface

as

the

original

base-level

program

The

body

of

the

method

is

the

result

of

partial

evaluation

Note

that

since

the

generated

methods

are

specialized

versions

of

receive

of

the

meta-object

they

should

be

defined

as

reader

methods

regardless

of

the

type

of

the

corresponding

base-level

method

When

a

meta-object

is

specialized

with

respect

to

a

reader

method

the

optimized

method

has

the

essentially

same

definition

to

the

original

base-level

method

except

the

indirect

accesses

to

the

instance

variables

-LRB-

cf.

The

method

distance

in

Figure

-RRB-

On

the

other

hand

when

it

is

specialized

with

respect

to

a

writer

method

the

optimized

method

appears

to

contain

extra

operations

Although

some

are

the

same

operations

as

the

ones

performed

inside

of

a

writer

method

in

Schematic

others

are

amenable

to

further

optimization

For

example

the

newly

created

vector

of

instance

variables

is

handed

over

via

reply

and

touch

operations

in

the

same

thread

because

those

operations

are

regareded

as

mere

unknown

functions

in

our

current

partial

evaluator

This

problem

could

be

overcome

by

using

partial

evaluators

for

concurrent

languages

or

applying

static

analysis

for

concurrent

programs

-LSB-

-RSB-

to

the

resulting

code

Performance

Measurement

To

measure

the

efficiency

of

our

partially

evaluated

meta-objects

we

executed

benchmark

programs

in

the

following

three

ways

PE

The

default

meta-object

is

partially

evaluated

with

respect

to

each

benchmark

program

and

the

generated

code

is

further

compiled

by

Schematic

This

will

show

the

performance

of

our

optimization

framework

Interpreted

The

default

meta-object

is

directly

compiled

by

Schematic

and

the

compiled

code

interprets

the

benchmark

programs

This

will

show

the

performance

of

naively

implemented

meta-objects

Non-reflective

The

benchmark

programs

are

directly

compiled

by

Schematic

This

will

show

the

performance

of

non-reflective

languages

All

programs

are

executed

on

Sun

UltraEnterprise

with

UltraSparc

at

and

GB

memory

running

SunOS

The

differences

between

PE

and

Interpreted

-LRB-

Figure

-RRB-

show

the

amount

of

speedup

gained

by

partial

evaluation

while

the

differences

between

PE

and

Non-reflective

show

the

residual

overheads

the

overheads

that

the

partial

evaluator

fails

to

eliminate

-LRB-

Figure

-RRB-

we

used

a

multi-processor

machine

the

programs

are

executed

on

a

single

processor

execution

a

mixed

class

of

metaobject

and

point

-LRB-

define-class

metaobject

point

-LRB-

-RRB-

class

methods

state-vars

state-values

lock

evaluator

-RRB-

constructor

-LRB-

define

-LRB-

point

x

y

-RRB-

-LRB-

metaobject

point

-LRB-

quote

metaobject

-RRB-

-LRB-

quote

methods

-RRB-

-LRB-

quote

-LRB-

x

y

-RRB-

-RRB-

-LRB-

make-cell

-LRB-

vector

x

y

-RRB-

-RRB-

-LRB-

make-lock

-RRB-

-LRB-

quote

evaluator

-RRB-

-RRB-

-RRB-

reader

method

-LRB-

define-method

metaobject

point

-LRB-

distance

self

-RRB-

-LRB-

begin

-LRB-

let

-LRB-

-LRB-

-LRB-

read-cell

state-values

-RRB-

-RRB-

-LRB-

-LRB-

vector-ref

-RRB-

-RRB-

-LRB-

-LRB-

vector-ref

-RRB-

-RRB-

-LRB-

-LRB-

square

-RRB-

-RRB-

-LRB-

-LRB-

square

-RRB-

-RRB-

-RRB-

-LRB-

sqrt

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

writer

method

-LRB-

define-method

metaobject

point

-LRB-

move

self

dx

dy

-RRB-

-LRB-

begin

-LRB-

acquire

lock

-RRB-

-LRB-

let

-LRB-

-LRB-

-LRB-

make-channel

-RRB-

-RRB-

-LRB-

-LRB-

read-cell

state-values

-RRB-

-RRB-

-LRB-

-LRB-

vector-ref

-RRB-

-RRB-

-LRB-

-LRB-

vector-ref

-RRB-

-RRB-

-LRB-

-LRB-

vector

-LRB-

dx

-RRB-

-LRB-

dy

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

reply

-RRB-

-LRB-

let

-LRB-

-LRB-

-LRB-

touch

-RRB-

-RRB-

-RRB-

-LRB-

update-cell

state-values

-RRB-

-LRB-

release

lock

-RRB-

t

-RRB-

-RRB-

-RRB-

-RRB-

Figure

Result

of

Optimization

-LRB-

The

underlined

expressions

come

from

the

base-level

method

-RRB-

In

order

to

examine

on

the

overheads

solely

caused

by

the

meta-objects

body

expressions

in

PE

and

Interpreted

are

executed

without

meta-interpreters

For

example

when

a

base-level

program

has

an

expression

-LRB-

distance

p

-RRB-

then

a

meta-object

looks

up

distance

in

its

method

table

and

extracts

instance

variables

from

p.

However

the

method

body

-LRB-

sqrt

-LRB-

-LRB-

square

x

-RRB-

-LRB-

square

y

-RRB-

-RRB-

-RRB-

should

be

directly

executed

To

do

this

we

generate

a

fake

evaluator

for

each

base-level

class

as

is

shown

in

Figure

Without

fake

evaluators

interpretive

execution

of

method

bodies

would

overwhelm

the

whole

execution

time

in

Interpreted

The

fake

evaluators

are

also

useful

to

skip

over

the

partial

evaluation

of

meta-interpreters

when

a

base-level

object

uses

only

the

default

meta-interpreter

Base-level

Applications

The

following

three

programs

are

executed

as

the

base-level

applications

Readers

and

Writers

Elapsed

time

for

a

single

method

invocation

is

measured

by

repeatedly

calling

a

method

on

an

object

We

tested

objects

with

different

numbers

of

instance

variables

-LRB-

i

-RRB-

and

methods

with

different

numbers

of

arguments

-LRB-

j

-RRB-

The

average

time

over

some

parameter

combinations

-LRB-

i

j

-RRB-

are

shown

as

a

representative

result

Class

definition

-LRB-

define-class

evaluator

point

-LRB-

-RRB-

-RRB-

The

method

called

by

the

meta-object

-LRB-

define-method

evaluator

point

-LRB-

eval-begin

self

method-name

exp

env

-RRB-

-LRB-

cond

-LRB-

-LRB-

eq

method-name

distance

-RRB-

for

method

distance

-LRB-

let

-LRB-

-LRB-

x

-LRB-

lookup

x

env

-RRB-

-RRB-

-LRB-

y

-LRB-

lookup

y

env

-RRB-

-RRB-

-RRB-

-LRB-

sqrt

-LRB-

-LRB-

square

x

-RRB-

-LRB-

square

y

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

eq

method-name

move

-RRB-

for

method

move

-LRB-

let

-LRB-

-LRB-

x

-LRB-

lookup

x

env

-RRB-

-RRB-

-LRB-

y

-LRB-

lookup

y

env

-RRB-

-RRB-

-LRB-

dx

-LRB-

lookup

dx

env

-RRB-

-RRB-

-LRB-

dy

-LRB-

lookup

dy

env

-RRB-

-RRB-

-RRB-

-LRB-

let

-LRB-

-LRB-

new-values

-LRB-

vector

-LRB-

x

dx

-RRB-

-LRB-

y

dy

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

update

self

new-values

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

Each

clause

of

the

cond

form

in

eval-begin

corresponds

to

the

method

of

the

baselevel

class

point

A

clause

is

selected

by

the

argument

method-name

and

executed

after

extracting

the

base-level

arguments

and

instance

variables

from

the

environment

A

become

form

in

the

original

program

is

converted

into

an

invocation

of

the

update

method

to

the

meta-object

with

a

vector

of

updated

instance

variables

Figure

Fake

Evaluator

for

point

Become

Elapsed

time

for

an

invocation

of

writer

methods

which

update

instance

variables

is

measured

by

repeatedly

calling

a

method

that

immediately

performs

become

We

tested

with

the

different

numbers

of

updated

variables

-LRB-

k

-RRB-

The

average

time

over

the

following

parameter

combinations

is

used

as

the

representative

result

i

j

k

Richards

The

Richards

benchmark

is

an

operating

system

simulation

which

is

used

as

a

non-trivial

program

in

several

object-oriented

languages

-LSB-

-RSB-

Since

it

uses

both

functions

and

methods

we

could

know

how

the

efficiency

of

the

meta-objects

affects

overall

execution

speed

in

realistic

applications

The

results

are

summarized

in

Figure

and

As

Figure

shows

the

programs

in

PE

are

more

than

times

faster

than

the

ones

in

Interpreted

This

improvement

is

significant

even

in

realistic

applications

such

as

Richards

whose

factor

is

Figure

shows

the

residual

overheads

in

PE

The

programs

in

PE

are

still

slower

than

the

ones

in

Non-reflective

by

the

factor

of

-LCB-

These

overheads

mainly

come

from

limitations

of

current

partial

evaluators

as

stated

in

Section

In

fact

when

we

further

optimized

the

partially

evaluated

meta-objects

for

Become

by

hand

resolving

obvious

channel

communications

etc.

the

average

residual

overheads

are

reduced

to

Performance

of

Customized

Meta-objects

The

above

benchmark

programs

are

executed

under

the

default

meta-objects

More

practical

interest

is

efficiency

of

customized

meta-objects

The

next

benchmark

program

is

a

boundedbuffer

that

uses

the

guarded

method

invocation

mechanism

which

is

implemented

by

a

customized

meta-object

Since

the

guarded

methods

are

not

directly

supported

in

Schematic

we

simulate

them

by

user-level

programming

in

which

objects

are

programmed

to

check

the

guard

conditions

and

spontaneously

suspend/continue

their

invocation

requests

Figure

shows

the

elapsed

time

for

a

program

that

writes

and

reads

integers

with

a

bounded

buffer

whose

size

is

The

buffer

for

PE

shows

almost

the

same

efficiency

to

the

one

for

Non-reflective

This

result

could

be

understood

as

the

cancellation

of

the

values

of

i

and

j

are

the

worst

case

in

Writers

Readers

WritersBecomeRichards

Figure

Performance

Improvement

by

Partial

Evaluation

-LRB-

The

length

of

each

bar

denotes

the

execution

time

in

Interpreted

relative

to

PE

-RRB-

Readers

WritersBecomeRichards

Figure

Residual

Overheads

in

Partially

Evaluated

Meta-objects

-LRB-

The

length

of

each

bar

denotes

the

execution

time

in

PE

relative

to

Non-reflective

-RRB-

Non-reflectivePEInterpreted

elapsed

time

-LRB-

sec

-RRB-

Figure

Performance

of

Bounded

Buffer

with

Guarded

Methods

residual

overheads

in

PE

by

frequent

method

invocations

in

Non-reflective

In

Non-reflective

we

have

to

define

three

methods

for

each

guarded

method

On

the

other

hand

the

partial

evaluation

successfully

inlines

the

operations

for

guarded

methods

which

are

defined

as

the

meta-object

's

methods

in

PE

The

partially

evaluated

meta-objects

are

approximately

percent

faster

than

the

interpreted

ones

-LRB-

Interpreted

-RRB-

This

improvement

is

less

significant

than

the

previous

benchmarks

We

conjecture

that

the

three

programs

require

a

large

number

of

context

switches

in

common

which

are

expensive

in

the

current

Schematic

implementation

As

a

result

the

time

spent

for

the

context

switching

becomes

dominant

and

makes

the

differences

among

three

programs

relatively

smaller

Related

Work

In

CLOS

Meta-Object

Protocols

-LRB-

MOP

-RRB-

meta-level

methods

are

split

into

functional

and

procedural

ones

for

caching

-LRB-

or

memoization

-RRB-

-LSB-

-RSB-

This

splitting

approach

has

similarity

to

our

meta-object

design

in

principle

However

memoization

technique

requires

more

careful

protocol

design

because

the

unit

of

specialization

is

function

thus

the

functional

methods

can

not

include

operations

that

touch

dynamic

data

On

the

other

hand

such

operations

can

be

written

in

our

reader

methods

since

the

partial

evaluator

automatically

residualizes

them

Compile-time

MOP

is

the

different

approach

to

efficient

reflective

systems

-LSB-

IHS

-RSB-

In

compile-time

MOPs

efficiency

is

guaranteed

by

only

allowing

the

meta-level

computation

at

the

compile-time

This

means

that

the

changes

to

the

run-time

behavior

of

the

base-level

program

should

be

achieved

by

writing

translation

rules

that

converts

the

program

into

the

one

containing

the

expected

behavior

This

could

be

a

burdensome

task

if

the

modification

involves

run-time

representation

of

an

object

because

no

run-time

meta-objects

are

available

in

compile-time

MOPs

Conclusion

We

have

given

a

meta-object

design

for

our

reflective

language

with

an

optimization

framework

using

partial

evaluation

In

the

meta-object

's

description

state-related

operations

are

separated

from

the

rest

which

enables

effective

partial

evaluation

The

optimization

framework

translates

the

meta-objects

and

their

reader

methods

into

records

and

functions

in

Scheme

and

then

applies

a

Scheme

partial

evaluator

The

optimized

code

is

a

combination

of

the

base

and

meta-level

programs

where

most

interpretive

operations

at

the

meta-level

such

as

method

dispatch

and

environment

manipulation

are

removed

The

efficiency

of

our

optimization

is

shown

by

benchmarks

where

the

partially

evaluated

objects

run

significantly

faster

than

the

interpretive

meta-objects

Moreover

a

program

with

customized

meta-objects

runs

as

efficiently

as

an

equivalent

non-reflective

program

thanks

to

the

partial

evaluation

Acknowledgments

The

earlier

version

of

was

designed

in

collaboration

with

Satoshi

Matsuoka

We

would

like

to

express

our

thanks

to

him

We

also

would

like

to

thank

Kenjiro

Taura

who

is

the

principal

designer

and

implementor

of

the

Schematic

language

Kenichi

Asai

offered

us

a

partial

evaluator

for

Scheme

Ken

Wakita

helped

us

to

run

the

Schematic

compiler

on

our

system

References

-LSB-

-RSB-

ACM

Proceedings

of

Partial

Evaluation

and

Semantics-Based

Program

Manipulation

-LRB-

PEPM

-RRB-

Amsterdam

June

-LSB-

-RSB-

Kenichi

Asai

Hidehiko

Masuhara

Satoshi

Matsuoka

and

Akinori

Yonezawa

Partial

evaluation

as

a

compiler

for

reflective

languages

Technical

Report

-LCB-

Department

of

Information

Science

the

University

of

Tokyo

December

-LSB-

-RSB-

Kenichi

Asai

Hidehiko

Masuhara

and

Akinori

Yonezawa

Partial

evaluation

of

call-by-value

lambda-calculus

with

side-effects

In

Proceedings

of

Partial

Evaluation

and

Semantics-Based

Program

Manipulation

-LRB-

PEPM

-RRB-

-LSB-

-RSB-

pages

-LCB-

-LSB-

-RSB-

Lars

Ole

Andersen

Program

Analysis

and

Specialization

for

the

C

Programming

Language

PhD

thesis

DIKU

University

of

Copenhagen

May

-LRB-

DIKU

report

-RRB-

-LSB-

-RSB-

Shigeru

Chiba

A

metaobject

protocol

for

C++

In

Proceedings

of

OOPSLA

-LRB-

SIGPLAN

Notices

Vol

No.

-RRB-

pages

-LCB-

Austin

TX

ACM

-LSB-

-RSB-

Shigeru

Chiba

and

Takashi

Masuda

Designing

an

extensible

distributed

language

with

a

meta-level

architecture

In

Proceedings

of

European

Conference

on

Object-Oriented

Programming

-LRB-

ECOOP

-RRB-

LNCS

-LSB-

-RSB-

Craig

Chambers

David

Ungar

and

Elgin

Lee

An

efficient

implementation

of

self

a

dynamically-type

object-oriented

language

based

on

prototypes

In

Proceedings

of

Conference

on

Object-Oriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

New

Orleans

LA

October

ACM

-LSB-

-RSB-

Yoshihiko

Futamura

Partial

evaluation

of

computation

process

an

approach

to

a

compiler-compiler

Systems

Computers

Controls

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

Marc

Gengler

and

Matthieu

Martel

Self-applicable

partial

evaluation

for

the

pi-calculus

In

Proceedings

of

Partial

Evaluation

and

Semantics-Based

Program

Manipulation

-LRB-

PEPM

-RRB-

-LSB-

-RSB-

-LSB-

-RSB-

Haruo

Hosoya

Hidehiko

Masuhara

Kenjiro

Taura

and

Akinori

Yonezawa

Partial

evaluation

for

a

concurrent

language

based

on

processes

and

channels

SWoPP

Beppu

-LRB-

IPSJ

SIG

Notes

-RRB-

-LRB-

-RRB-

-LCB-

August

-LSB-

IHS

-RSB-

Yutaka

Ishikawa

Atsushi

Hori

Mitsuhisa

Sato

Motohiko

Matsuda

Jorg

Nolte

Hiroshi

Tezuka

Hiroki

Konaka

Munenori

Maeda

and

Kazuto

Kubota

Design

and

implementation

of

metalevel

architecture

in

C++

MPC

approach

In

Reflection

Symposium

San

Francisco

CA

April

-LSB-

-RSB-

Atsushi

Igarashi

and

Naoki

Kobayashi

Type-based

analysis

of

usage

of

communication

channels

for

concurrent

programming

languages

In

Proceedings

of

International

Static

Analysis

Symposium

-LRB-

SAS

-RRB-

volume

of

Lecture

Notes

in

Computer

Science

pages

-LCB-

Springer-Verlag

-LSB-

-RSB-

Neil

D.

Jones

Carsten

K.

Gomard

and

Peter

Sestoft

Partial

Evaluation

and

Automatic

Program

Generation

Prentice

Hall

-LSB-

-RSB-

Gregor

Kiczales

Jim

des

Rivi?eres

and

Daniel

G.

Bobrow

The

Art

of

the

Metaobject

Protocol

MIT

Press

Cambridge

MA

-LSB-

-RSB-

Naoki

Kobayashi

Motoki

Nakade

and

Akinori

Yonezawa

Static

analysis

of

communication

for

asynchronous

concurrent

programming

languages

In

Second

International

Static

Analysis

Symposium

-LRB-

SAS

-RRB-

volume

of

Lecture

Notes

in

Computer

Science

pages

-LCB-

Springer-Verlag

-LSB-

-RSB-

Naoki

Kobayashi

Benjamin

C.

Pierce

and

David

N.

Turner

Linearity

and

the

pi-calculus

In

Conference

record

of

Symposium

on

Principles

of

Programming

Languages

pages

-LCB-

January

-LSB-

-RSB-

Gregor

Kiczales

and

Luis

Rodriguez

Efficient

method

dispatch

in

PCL

In

Proceedings

of

Conference

on

LISP

and

Functional

Programming

pages

-LCB-

-LSB-

-RSB-

Pattie

Maes

Concepts

and

experiments

in

computational

reflection

In

Proceedings

of

Conference

on

Object-Oriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

ACM

October

-LSB-

-RSB-

Mihnea

Marinescu

and

Benjamin

Goldberg

Partial

evaluation

techniques

for

concurrent

programs

In

Proceedings

of

Partial

Evaluation

and

Semantics-Based

Program

Manipulation

-LRB-

PEPM

-RRB-

-LSB-

-RSB-

pages

-LCB-

-LSB-

-RSB-

Hidehiko

Masuhara

Satoshi

Matsuoka

Kenichi

Asai

and

Akinori

Yonezawa

Compiling

away

the

meta-level

in

object-oriented

concurrent

reflective

languages

using

partial

evaluation

In

Proceedings

of

OOPSLA

-LRB-

SIGPLAN

Notices

Vol

No.

-RRB-

pages

-LCB-

-LSB-

-RSB-

Hidehiko

Masuhara

Satoshi

Matsuoka

Takuo

Watanabe

and

Akinori

Yonezawa

Object-oriented

concurrent

reflective

languages

can

be

implemented

efficiently

In

Proceedings

of

Conference

on

Object-Oriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

Vancouver

B.C.

October

ACM

-LSB-

-RSB-

Hidehiko

Masuhara

Satoshi

Matsuoka

and

Akinori

Yonezawa

Implementing

parallel

language

constructs

using

a

reflective

object-oriented

language

In

Reflection

Symposium

San

Francisco

CA

April

-LSB-

-RSB-

Yoshihiro

Oyama

Kenjiro

Taura

and

Akinori

Yonezawa

An

efficient

compilation

framework

for

languages

based

on

a

concurrent

process

calculus

In

Proceedings

of

Euro-Par

Object-Oriented

Programming

Lecture

Notes

in

Computer

Science

Passau

Germany

August

Springer-Verlag

-LSB-

-RSB-

Brian

Cantwell

Smith

Reflection

and

semantics

in

Lisp

In

Conference

record

of

Symposium

on

Principles

of

Programming

Languages

pages

-LCB-

-LSB-

-RSB-

Sun

Microsystems

Java

-LRB-

TM

-RRB-

core

reflection

API

and

specification

-LSB-

-RSB-

Kenjiro

Taura

and

Akinori

Yonezawa

Schematic

A

concurrent

object-oriented

extension

to

scheme

In

Proceedings

of

Workshop

on

Object-Based

Parallel

and

Distributed

Computation

number

in

Lecture

Notes

in

Computer

Science

Springer-Verlag

-LSB-

-RSB-

Takuo

Watanabe

and

Akinori

Yonezawa

Reflection

in

an

object-oriented

concurrent

language

In

Proceedings

of

Conference

on

Object-Oriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

San

Diego

CA

September

ACM

-LRB-

revised

version

in

-LSB-

-RSB-

-RRB-

-LSB-

-RSB-

Akinori

Yonezawa

editor

ABCL

An

Object-Oriented

Concurrent

System

MIT

Press

Cambridge

MA

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 B I 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 B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I 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 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 B I O O O O O O O O O O O O O B I 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 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 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 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 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 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 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 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 O O 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B I 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 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 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 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 B I 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 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 B I O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B 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 B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I 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 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 B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

concurrent object-oriented language
implemenation techniques
meta-objects