Linear

Time

Hierarchies

and

Functional

Languages

Eva

Rose

DIKU

University

of

Copenhageny

Abstract

In

STOC

Jones

sketched

the

existence

of

a

hierarchy

within

problems

decidable

in

linear

time

by

a

first-order

functional

language

based

on

tree-structured

data

-LRB-

F

-RRB-

as

well

as

for

an

extension

of

that

language

based

on

graph-structured

data

-LRB-

Fsu

-RRB-

We

consider

the

Categorical

Abstract

Machine

-LRB-

CAM

-RRB-

a

canonical

machine

model

for

implementing

higher

order

functional

languages

We

show

the

existence

of

such

a

hierarchy

for

the

CAM

based

on

tree-structured

data

-LRB-

in

particular

without

explicit

recursion

facilities

-RRB-

as

well

as

in

the

case

of

graph-structured

data

-LRB-

in

particular

with

explicit

recursion

facilities

-RRB-

Conclusion

first-order

functional

programs

and

higher

order

functional

programs

all

define

the

same

class

of

linear-time

decidable

problems

Establishing

the

hierarchies

for

the

two

CAM

versions

however

reveals

a

tension

with

respect

to

linear-time

complexity

hierarchies

when

using

a

computation

model

for

higher

order

functional

languages

with

selective

update

instructions

and

one

without

Conjecture

programming

with

recursive

data

structures

seems

to

change

the

linear

time

hierarchy

Introduction

There

seems

to

be

a

gap

between

functional

programming

practice

and

complexity

theory

in

general

This

paper

is

meant

to

bridge

some

of

this

gap

In

particular

we

are

concerned

with

whether

functional

programs

which

solve

some

problem

have

a

complexity

similar

to

programs

solving

the

same

problem

in

other

paradigms

Clearly

studying

problems

with

a

linear

time-complexity

provides

the

most

fine-grained

way

to

study

this

-LCB-

and

as

pointed

out

by

Jones

-LSB-

-RSB-

the

practical

significance

of

linear

time

factors

is

wrongly

underestimated

since

many

practical

relevant

decision

problems

can

be

solved

in

either

linear

or

sublinear

time

-LSB-

-RSB-

Jones

-LSB-

-RSB-

claims

the

result

that

imperative

programs

first-order

functional

programs

and

higher

order

functional

programs

all

define

the

same

class

of

linear

timedecidable

problems

and

proves

equivalence

of

the

first

two

but

not

the

last

Accepted

for

publication

ESOP

yAddress

Universitetsparken

Copenhagen

O

Denmark

email

evarose@diku.dk;

WWW

url

people/evarose.html

The

main

contribution

of

this

paper

is

the

exposition

of

the

last

correspondence

or

more

precisely

we

show

that

the

same

class

of

linear

time-decidable

problems

is

indeed

defined

when

using

a

canonical

machine

model

for

higher

order

functional

programs

We

will

restrict

our

attention

to

CAM

-LSB-

-RSB-

a

canonical

abstract

machine

for

implementing

higher

order

functional

languages

The

CAM

is

suitable

for

complexity

considerations

because

it

is

a

uniform

device

for

measuring

time

complexity

of

different

functional

languages

and

because

it

is

a

combinator

based

language

and

thus

operates

without

variables

-LRB-

thus

side-stepping

questions

of

variable

access

times

-RRB-

In

order

to

obtain

the

same

description

form

of

the

different

semantical

language

descriptions

we

present

the

languages

in

the

style

of

natural

-LRB-

operational

-RRB-

semantics

c.f.

Kahn

-LSB-

-RSB-

instrumented

with

the

assumed

running

times

Thus

the

semantics

of

programming

languages

is

defined

through

judgements

of

the

shape

program

input

time

=-RRB-

value

We

start

by

an

introduction

to

the

hierarchy

concept

within

linear

time-decidable

sets

The

definition

of

an

efficient

universal

program

and

of

an

efficient

interpreter

is

presented

in

the

notation

used

in

this

paper

They

constitute

the

technical

proof

tools

to

show

the

existence

of

a

hierarchy

for

some

programming

language

by

relating

it

to

a

known

language

for

which

the

hierarchy

theorem

holds

We

proceed

by

introducing

a

simple

first-order

functional

language

in

two

versions

one

which

allows

and

one

which

does

n't

allow

selective

updating

Then

we

introduce

CAM

in

two

versions

which

basically

differ

on

the

existence

of

selective

update

facilities

Then

we

show

our

main

results

there

exists

a

hierarchy

within

linear

time-decidable

sets

defined

by

CAM

programs

-LRB-

abbreviated

to

linear

hierarchy

for

CAM

-RRB-

one

for

each

version

of

CAM

This

result

is

established

by

proving

the

existence

of

efficient

interpretations

between

the

first-order

functional

language

and

CAM

However

the

proof

has

to

be

done

twice

one

for

the

case

of

the

tree-based

languages

and

the

graph-based

languages

-LRB-

that

is

possesing

the

setcar

and

setcdr

instructions

-RRB-

Finally

we

conlude

the

work

In

the

following

we

will

often

write

a

hierarchy

for

some

language

when

we

really

mean

a

hierarchy

within

the

time-decidable

problems

defined

by

the

programs

of

that

language

The

linear

time

hierarchy

concept

We

define

the

concept

of

an

-LRB-

infinite

-RRB-

hierarchy

within

linear

time-decidable

sets

ordered

by

constant

multiplicative

factors

which

partition

the

set

of

solvable

decision

problems

into

non-empty

classes

c.f.

Jones

-LSB-

-RSB-

In

particular

we

can

identify

the

set

of

problems

which

can

be

solved

in

linear

time

on

a

deterministic

computation

model

by

the

set

of

programs

in

some

programming

language

L

which

encode

the

characteristic

functions

of

sets

and

run

in

linear

time

-LSB-

M

-RSB-

Hence

a

decision

problem

becomes

a

subset

of

the

encoding

programming

language

's

data

domain

and

the

instruction

facilities

in

the

programming

language

L

will

influence

the

problem-solving

power

and

hence

the

hierarchy

just

described

It

has

been

shown

that

the

linear

speed-up

theorem

-LSB-

-RSB-

well-known

from

Turing

machine-theory

does

not

hold

for

tree-structured

insist

on

compositionality

though

determinism

we

mean

no

parallel

facilities

available

in

the

programming

language

data

-LSB-

-RSB-

-LSB-

-RSB-

since

it

violates

the

property

of

extending

the

machine

alphabet

without

cost

A

fair

and

realistic

accounting

practice

is

required

since

the

time

complexity

measure

defined

on

the

language

plays

an

important

role

for

the

problem

solving

power

We

quote

Jones

for

the

definition

of

a

linear

time-hierarchy

There

is

a

constant

b

such

that

for

any

a

there

is

a

set

which

is

recognizable

in

a

b

n

but

not

in

a

n.

Thus

LIN

the

collection

of

all

sets

recognizable

in

linear

time

by

deterministic

programs

contains

an

infinite

hierarchy

ordered

by

constant

coefficients

Another

way

to

state

this

property

is

Definition

-LRB-

linear

time

hierarchy

-RRB-

If

TimeL

-LRB-

a

n

-RRB-

ae

TimeL

-LRB-

a

b

n

-RRB-

then

L

has

a

linear

time

hierarchy

where

TimeL

-LRB-

f

-RRB-

is

the

set

of

L-data

which

is

decidable

in

time

f

by

deterministic

L-programs

The

constant

factor

b

can

actually

be

exact

determined

for

a

hierarchy

This

has

e.g.

been

done

by

Hessellund

and

Dahl

-LSB-

-RSB-

in

the

case

of

a

simple

imperative

language

I

We

define

the

notion

of

an

efficient

universal

program

and

efficient

interpretation

c.f.

-LSB-

-RSB-

adapted

to

the

notation

of

this

paper

Definition

-LRB-

efficient

universal

program

-RRB-

ffl

u

is

a

universal

program

if

p

h

p

d

tp

v

iff

u

-LRB-

p

d

-RRB-

tu

v

i

-LRB-

for

some

repre

sentation

of

programs

as

data

-RRB-

ffl

In

particular

u

is

efficient

if

furthermore

p

tu

a

tp

-LRB-

where

it

is

essential

that

a

is

independent

of

d

and

p

-RRB-

Definition

-LRB-

efficient

interpretation

-RRB-

ffl

m

is

an

interpreter

of

L

written

in

M

if

p

p

d

tLp

v

iff

m

-LRB-

p

d

-RRB-

tMm

v

-LRB-

for

some

representation

of

L-programs

and

values

as

M-data

-RRB-

When

such

an

interpreter

exists

we

write

M

L.

ffl

In

particular

m

is

efficient

if

furthermore

p

tMm

e

tLp

This

can

also

be

formulated

as

TimeL

-LRB-

a

n

-RRB-

TimeM

-LRB-

a

e

n

-RRB-

-LRB-

where

it

is

essential

that

e

is

independent

of

d

and

p

-RRB-

F

and

Fsu

We

base

our

investigation

on

two

Lisp-like

languages

defined

by

Jones

in

-LSB-

-RSB-

because

it

is

known

that

the

constant-or

hierarchy

theorem

holds

c.f.

Theorem

below

The

languages

are

very

restricted

in

that

they

allow

only

one

first-order

recursive

function

-LRB-

f

-RRB-

to

be

defined

and

only

one

variable

name

-LRB-

x

-RRB-

is

available

which

is

thus

used

to

denote

both

the

input

to

the

program

and

the

formal

parameter

of

the

function

However

mutual

recursive

functions

as

well

as

multiple

variables

can

be

simulated

easily

-LCB-

and

the

languages

are

both

Turing

complete

is

the

size

of

the

input

The

languages

are

strict

and

have

running

times

based

on

standard

implementation

technology

-LSB-

CR

-RSB-

-LRB-

in

fact

they

can

be

implemented

on

a

unit-cost

RAM

in

times

proportional

to

those

given

here

-RRB-

The

languages

differ

in

the

data

values

that

can

be

used

F

manipulates

tree-structured

datas

that

is

finite

cons-structures

with

's

for

leaves

Fsu

manipulates

graph-structured

datas

by

allowing

selective

updating

as

in

Scheme

We

quote

-LSB-

-RSB-

the

following

Theorem

on

which

we

develop

our

results

Theorem

-LRB-

Jones

-RRB-

F

and

Fsu

each

have

an

efficient

universal

program

Further

the

constant-hierarchy

theorem

and

the

efficient

version

of

Kleene

's

Recursion

theorem

hold

for

F

as

well

as

for

Fsu

Definition

-LRB-

Syntax

semantics

and

running

times

of

F

-RRB-

See

Figure

Fsu

is

defined

as

a

store-semantic

version

of

F

extended

with

setcar

and

setcdr

with

the

same

meaning

and

running

times

as

in

This

means

that

data

now

are

graph-structured

datas

that

is

either

or

possibly

infinite

regular

cons-structures

with

's

as

leaves

for

the

finite

branches

Since

the

only

place

where

the

store

is

updated

is

in

the

cons-rule

and

in

the

setcar

setcdr

rules

we

omit

a

store

description

other

than

for

these

three

rules

Definition

-LRB-

Syntax

semantics

and

running

times

of

Fsu

-RRB-

See

Figure

The

special

notion

oe@a

is

used

to

mean

the

value

obtained

by

unfolding

the

store

tree

rooted

at

address

a

-LCB-

notice

that

this

may

be

an

infinite

-LRB-

regular

-RRB-

tree

-LRB-

namely

when

there

is

a

cyclic

path

reachable

from

a

-RRB-

CAM

The

categorical

abstract

machine

CAM

based

on

a

categorical

foundation

-LSB-

W

-RSB-

was

designed

with

the

purpose

of

implementing

ML

an

higher

order

functional

language

We

have

found

versions

of

the

machine

one

where

recursion

and

branching

are

implicitly

represented

-LSB-

Table

-RSB-

and

one

where

general

recursion

and

branching

facilities

have

been

made

explicitly

available

-LSB-

Table

-RSB-

We

call

the

first

version

Core-CAM

for

the

latter

one

we

use

a

slightly

extended

version

Extended-CAM

with

respect

to

recursion

operators

instead

of

wind

we

allow

the

Lisp

recursion

operators

rplaca

and

rplacd

We

notice

that

Core-CAM

manipulates

tree-structured

data

whereas

the

Extended-CAM

manipulates

graph-structured

data

Integers

can

be

encoded

both

in

F

-LRB-

Fsu

-RRB-

and

in

Core-CAM

-LRB-

Extended-CAM

-RRB-

as

consstructures

e.g.

assuming

a

Peano-arithmetic

encoding

Since

these

list

structures

have

the

same

complexity

-LRB-

finite

binary

trees

of

the

same

depth

-RRB-

their

encodings

does

not

add

any

program

dependent

interpretation

overhead

in

the

proof-developments

in

Section

thus

without

loss

of

generality

we

leave

out

integers

and

operations

on

integers

from

the

CAM

value

domains

In

Definition

we

quote

the

specification

of

Core-CAM

-LSB-

Table

-RSB-

traditional

Lisp

implementations

but

with

e.g.

hd

-LRB-

and

tl

-RRB-

defined

to

same

meaning

as

rplaca

and

rplacd

in

traditional

Lisp

hereby

understand

applicative-order

evaluation

to

weak

head

normal

form

Syntax

P

Program

E

whererec

f

-LRB-

x

-RRB-

E

Expression

x

j

j

hd

E

j

tl

E

j

cons

-LRB-

-RRB-

j

if

E

then

else

j

f

-LRB-

E

-RRB-

Semantic

sorts

d

v

Value

j

CONS

-LRB-

-RRB-

Semantic

rules

P

d

t

=-RRB-

v

The

program

P

given

input

d

evaluates

to

the

output

v

with

a

time

cost

of

t.

d

E

t

=-RRB-

v

The

expression

E

evaluates

to

the

value

v

with

a

time

cost

t

where

the

variable

x

is

bound

to

the

data

structure

d

and

the

function

f

has

body

d

E

t

=-RRB-

v

E

whererec

f

-LRB-

x

-RRB-

d

t

=-RRB-

v

-LRB-

-RRB-

d

x

=-RRB-

d

-LRB-

-RRB-

d

=-RRB-

d

=-RRB-

d

=-RRB-

d

cons

-LRB-

-RRB-

=-RRB-

CONS

-LRB-

-RRB-

-LRB-

-RRB-

d

E

t

=-RRB-

CONS

-LRB-

-RRB-

d

hdE

t

=-RRB-

d

E

t

=-RRB-

d

hdE

t

=-RRB-

-LRB-

-RRB-

d

E

t

=-RRB-

CONS

-LRB-

-RRB-

d

tlE

t

=-RRB-

d

E

t

=-RRB-

d

tlE

t

=-RRB-

-LRB-

-RRB-

d

v

=-RRB-

d

=-RRB-

d

if

E

=-RRB-

-LRB-

-RRB-

d

E

=-RRB-

CONS

-LRB-

-RRB-

d

=-RRB-

d

if

E

=-RRB-

-LRB-

-RRB-

d

E

=-RRB-

=-RRB-

v

d

f

-LRB-

E

-RRB-

=-RRB-

v

-LRB-

-RRB-

Figure

F

semantics

Syntax

same

as

F

but

extended

with

E

Expression

j

setcar

E

j

setcdr

E

Semantic

sorts

same

as

F

but

extended

with

oe

Store

Address

Box

a

Address

Nat

Box

j

CONS

-LRB-

-RRB-

Semantic

functions

Store

Address

Value

Extract

value

Semantic

rules

as

F

modified

to

use

a

store

in

particular

a

oe

E

t

=-RRB-

The

expression

E

evaluates

in

the

store

oe

to

the

value

in

store

at

the

address

with

a

time

cost

t

assuming

x

is

bound

to

the

value

at

address

a

in

oe

and

f

has

body

a

E

t

=-RRB-

E

whererec

f

-LRB-

x

-RRB-

d

t

=-RRB-

v

d

v

-LRB-

-RRB-

a

oe

=-RRB-

a

=-RRB-

a

oe

=-RRB-

-LSB-

CONS

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

where

-LRB-

-RRB-

CONS

-LRB-

-RRB-

a

oe

=-RRB-

a

=-RRB-

a

oe

=-RRB-

-LSB-

CONS

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

where

-LRB-

-RRB-

CONS

-LRB-

-RRB-

Figure

Fsu

Semantics

Syntax

p

Program

program

-LRB-

Cs

-RRB-

Cs

Commands

o

j

C

Cs

C

Command

quote

-LRB-

-RRB-

j

car

j

cdr

j

cons

j

push

j

swap

j

op

plus

j

cur

-LRB-

Cs

-RRB-

j

app

Semantic

sorts

s

Stack

s

j

ff

Value

-LRB-

ff

-RRB-

j

-LSB-

Cs

-RSB-

j

-LRB-

-RRB-

Semantic

rules

program

-LRB-

Cs

-RRB-

t

=-RRB-

The

program

program

-LRB-

Cs

-RRB-

with

input

evaluates

to

the

output

with

a

time

cost

of

t

s

Cs

t

=-RRB-

Commands

Cs

evaluates

to

the

output

with

a

time

cost

of

t

on

input

stack-value

s.

init

stack

Cs

t

-RRB-

s

program

-LRB-

Cs

-RRB-

t

-RRB-

-LRB-

Cor-CAM

-RRB-

s

o

-RRB-

S

s

C

t

-RRB-

Cs

-RRB-

s

C

Cs

t

-RRB-

-LRB-

Cor-CAM

-RRB-

s

quote

-LRB-

-RRB-

-RRB-

s

-LRB-

Cor-CAM

-RRB-

s

-LRB-

ff

-RRB-

car

-RRB-

s

s

-LRB-

ff

-RRB-

cdr

-RRB-

s

-LRB-

Cor-CAM

-RRB-

s

cons

-RRB-

s

-LRB-

ff

-RRB-

-LRB-

Cor-CAM

-RRB-

s

push

-RRB-

s

s

swap

-RRB-

s

-LRB-

Cor-CAM

-RRB-

s

ae

cur

-LRB-

Cs

-RRB-

-RRB-

s

-LSB-

Cs

ae

-RSB-

s

-LRB-

ae

-RRB-

Cs

t

-RRB-

s

-LRB-

-LSB-

Cs

ae

-RSB-

-RRB-

app

t

-RRB-

-LRB-

Cor-CAM

-RRB-

Figure

Core-CAM

semantics

-LRB-

except

for

the

plus-operation

as

justified

above

-RRB-

rewritten

as

a

natural

semantics

-LSB-

-RSB-

and

instrumented

with

assumed

execution

times

c.f.

-LSB-

-RSB-

Definition

-LRB-

The

Core

Categorical

Abstract

Machine

-RRB-

See

Figure

In

Definition

we

present

the

Extended-CAM

as

a

store-semantic

version

of

CoreCAM

but

extended

in

the

way

just

described

and

instrumented

with

the

assumed

running

times

We

have

chosen

to

describe

Extended-CAM

by

a

store-semantic

-LSB-

-RSB-

version

of

natural

semantics

in

order

to

obtain

a

decompositional

description

of

the

recursion

operators

which

also

at

the

same

time

reflects

the

annotated

running

times

in

an

intuitive

way

We

notice

that

an

op

rule

defining

the

of

CAM

has

been

added

and

remark

that

any

practical

use

of

CAM

as

implementation

technique

requires

the

ffi-rules

to

be

instantiated

Definition

-LRB-

The

Extended

Categorical

Abstract

Machine

-RRB-

See

Figure

A

linear

time

hierarchy

for

Core-CAM

Here

is

our

main

result

for

Core-CAM

Theorem

There

exists

a

linear-time

hierarchy

for

Core-CAM

The

proof

thereof

is

based

on

the

existence

of

efficient

interpretations

F

Core-CAM

and

Core-CAM

F.

Lemma

There

is

an

efficient

interpretation

F

Core-CAM

Proof

An

F-interpreter

of

Core-CAM

is

shown

in

Figure

To

ease

readability

we

introduce

a

finite

number

of

atoms

seq

quote

etc.

to

abbreviate

distinct

F

cons-patterns

and

some

macros

whose

expansions

are

explained

below

At

run

time

the

input

variable

is

bound

to

-LRB-

pc

d

-RRB-

where

pc

is

some

Core-CAM

program

and

d

some

Core-CAM

input

value

The

actual

interpretation

is

performed

by

an

interpretation

loop

in

the

Loop

macro

The

abbreviations

used

are

the

following

ffl

Simple

definitions

of

the

form

LET

pattern

v

IN

E

mean

that

each

name

defined

by

the

pattern

is

replaced

with

an

appropriate

decomposition

of

the

value

v

inside

E

furthermore

denotes

a

new

name

for

each

use

Since

the

decomposition

is

performed

into

a

finite

number

of

names

matching

can

be

done

within

a

constant

time-bound

ffl

CASE

v

OF

atomi

Ei

denotes

the

nested

if

statement

obtained

by

testing

the

value

v

and

selecting

Ei

when

the

value

is

equal

to

atomi

-LRB-

we

exploit

the

convention

of

F

that

false

and

everything

else

is

true

-RRB-

Since

the

number

of

atoms

is

finite

mathing

can

be

done

within

a

constant

time-bound

ffl

For

brevity

we

use

instead

of

the

cons

-LRB-

-RRB-

the

lambda

calculus

the

concept

means

rewrite

rules

which

are

defined

outside

the

calculus

Syntax

same

as

Core-CAM

but

extended

with

C

Command

j

op

op

j

branch

-LRB-

-RRB-

j

rplaca

j

rplacd

Semantic

sorts

same

as

Core-CAM

but

extended

with

Value

j

false

j

true

oe

Store

Address

Box

a

b

c

Address

Nat

s

Stack

s

a

j

a

Box

-LRB-

a

b

-RRB-

j

-LSB-

Cs

a

-RSB-

j

-LRB-

-RRB-

j

false

j

true

Semantic

functions

Store

Address

Value

Extract

value

Semantic

rules

as

Core-CAM

extended

with

s

oe

Cs

t

=-RRB-

Commands

Cs

evaluates

in

the

store

oe

to

the

output

value

at

address

in

store

with

a

time

cost

of

t

on

input

stack-value

s.

eval

op

-RRB-

eval

axiomatizes

the

so

called

ffi-rules

of

CAM

By

ffi-rules

we

understand

rules

which

specify

elementary

machine

operations

that

is

which

can

be

done

in

constant

time

init

stack

a

Cs

t

-RRB-

oe

-LRB-

s

b

-RRB-

program

-LRB-

Cs

-RRB-

t

-RRB-

ff

-LRB-

Ext-CAM

-RRB-

eval

op

-RRB-

s

op

op

-RRB-

s

-LRB-

Ext-CAM

-RRB-

s

t

-RRB-

s

true

branch

-LRB-

-RRB-

t

-RRB-

-LRB-

Ext-CAM

-RRB-

s

t

-RRB-

s

false

branch

-LRB-

-RRB-

t

-RRB-

-LRB-

Ext-CAM

-RRB-

s

a

b

oe

rplaca

-RRB-

oe

-LSB-

a

CONS

-LRB-

b

-RRB-

-RSB-

s

a

oe

-LRB-

a

-RRB-

CONS

-LRB-

-RRB-

-LRB-

Ext-CAM

-RRB-

s

a

b

oe

rplacd

-RRB-

oe

-LSB-

a

CONS

-LRB-

b

-RRB-

-RSB-

s

a

oe

-LRB-

a

-RRB-

CONS

-LRB-

-RRB-

-LRB-

Ext-CAM

-RRB-

Figure

Extended-CAM

semantics

Run

F-program

f

-LRB-

x

-RRB-

whererec

f

-LRB-

x

-RRB-

Loop

on

input

data

p

where

Loop

is

LET

stack

-LRB-

instruction

arg

-RRB-

x

IN

CASE

instruction

OF

'em

pseq

stack

seq

LET

arg

IN

f

-LRB-

f

-LRB-

stack

-RRB-

-RRB-

quote

LET

rest

stack

IN

rest

arg

car

LET

rest

-LRB-

a

-RRB-

stack

IN

rest

a

cdr

LET

rest

-LRB-

b

-RRB-

stack

IN

rest

b

cons

LET

-LRB-

rest

a

-RRB-

b

stack

IN

rest

-LRB-

a

b

-RRB-

push

LET

rest

a

stack

IN

rest

a

a

swap

LET

-LRB-

rest

b

-RRB-

a

stack

IN

-LRB-

rest

a

-RRB-

b

cur

LET

rest

rho

stack

IN

rest

-LRB-

rho

arg

-RRB-

app

LET

rest

-LRB-

-LRB-

cs

rho

-RRB-

a

-RRB-

stack

IN

f

-LRB-

-LRB-

rest

-LRB-

rho

a

-RRB-

-RRB-

cs

-RRB-

-LRB-

see

the

text

for

the

expansion

of

the

CASE

LET

and

atom

macros

-RRB-

and

F-representation

of

Core-CAM

programs

-LRB-

program

-LRB-

Cs

-RRB-

-RRB-

cons

-LRB-

Cs

-RRB-

o

cons

-LRB-

'em

pseq

-RRB-

C

Cs

cons

-LRB-

seq

cons

-LRB-

C

Cs

-RRB-

-RRB-

quote

-LRB-

-RRB-

cons

-LRB-

quote

-RRB-

car

cons

-LRB-

car

-RRB-

cdr

cons

-LRB-

cdr

-RRB-

cons

cons

-LRB-

cons

-RRB-

push

cons

-LRB-

push

-RRB-

swap

cons

-LRB-

swap

-RRB-

cur

-LRB-

Cs

-RRB-

cons

-LRB-

cur

Cs

-RRB-

app

cons

-LRB-

app

-RRB-

F-representation

of

Core-CAM

values

S

cons

-LRB-

S

-RRB-

-LRB-

ff

-RRB-

cons

-LRB-

-RRB-

-LSB-

Cs

-RSB-

cons

-LRB-

Cs

-RRB-

-LRB-

-RRB-

Figure

iCF

-LRB-

p

-RRB-

interpreting

CAM-program

p

on

input

The

Loop

macro

represents

one

iteration

of

the

interpreter

hence

it

is

easy

to

see

by

induction

that

any

single

step

of

the

interpreted

program

is

realised

in

a

bounded

amount

of

time

We

conclude

that

the

interpreter

is

efficient

Lemma

There

is

an

efficient

interpretation

Core-CAM

F

Proof

A

Core-CAM

interpreter

of

F

is

shown

in

its

entirety

in

Figure

The

code

CLoop

represents

one

iteration

of

the

interpreter

consuming

one

level

of

an

F-expression

Hence

again

it

is

easy

to

see

by

induction

that

any

single

step

of

the

interpreted

program

is

realised

in

a

bounded

amount

of

time

We

conclude

that

the

interpreter

is

efficient

Proof

of

Theorem

The

above

combines

to

f

TimeC

-LRB-

a

n

-RRB-

TimeF

-LRB-

a

e

n

-RRB-

by

Lemma

ae

TimeF

-LRB-

a

e

n

-RRB-

by

Theorem

TimeC

-LRB-

a

e

f

n

-RRB-

by

Lemma

Hence

TimeC

-LRB-

a

n

-RRB-

ae

TimeC

-LRB-

a

b

n

-RRB-

with

b

e

f

A

linear

time

hierarchy

for

the

Extended-CAM

Here

is

our

main

result

for

Extended-CAM

Theorem

There

exists

a

linear-time

hierarchy

for

Extended-CAM

The

branch

command

requires

a

testing

facility

of

data

structures

which

can

not

be

encoded

Hence

for

our

purpose

we

instantiate

a

ffi-rule

eval

is

false

false

-RRB-

true

eval

is

false

-RRB-

false

false

Remark

Our

rplacd

instruction

corresponds

to

the

wind

instruction

of

the

original

CAM

-LSB-

-RSB-

the

symmetric

rplaca

has

no

counterpart

in

CAM

Kahn

's

rec

instruction

-LSB-

-RSB-

is

similar

the

simple

case

rec

-LRB-

cur

-LRB-

C

-RRB-

-RRB-

can

be

simulated

by

the

ExtendedCAM

code

sequence

push

quote

-LRB-

-LRB-

-RRB-

-RRB-

cons

push

cur

-LRB-

C

-RRB-

rplacd

Thus

Extended-CAM

is

slightly

more

expresssive

than

both

these

however

not

in

any

essential

way

i.e.

there

does

not

seem

to

be

algorithms

that

can

be

implemented

more

efficiently

on

Extended-CAM

Lemma

There

is

an

efficient

interpretation

Fsu

Extended-CAM

Proof

sketch

Since

setcar

setcdr

and

rplaca/rplacd

implements

the

same

operations

on

graph-values

it

is

trivial

to

see

that

the

interpretation

thereoff

can

be

done

efficiently

We

therefore

omit

further

details

Run

CAM-program

program

-LRB-

Cloop

-RRB-

on

input

-LRB-

-LRB-

d

-RRB-

E

-RRB-

where

CAM-representation

E

of

F-expression

E

x

-LRB-

-LSB-

Cx

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

-RRB-

-LRB-

-LSB-

C'nil

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

-RRB-

cons

-LRB-

-RRB-

-LRB-

-LSB-

Ccons

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

-RRB-

hd

E

-LRB-

-LSB-

Chd

-LRB-

-RRB-

-RSB-

E

-RRB-

tl

E

-LRB-

-LSB-

Ctl

-LRB-

-RRB-

-RSB-

E

-RRB-

if

E

-LRB-

-LSB-

Cif

-LRB-

-RRB-

-RSB-

-LRB-

E

-LRB-

-RRB-

-RRB-

-RRB-

f

-LRB-

E

-RRB-

-LRB-

-LSB-

Ccall

-LRB-

-RRB-

-RSB-

E

-RRB-

CAM-representation

d

of

F-value

d

-LRB-

-LSB-

CNIL

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

-RRB-

CONS

-LRB-

-RRB-

-LRB-

-LSB-

CCONS

-LRB-

-RRB-

-RSB-

-LRB-

-RRB-

-RRB-

CAM-code

macros

Cloop

push

cdr

car

swap

push

car

swap

cdr

cdr

cons

cons

app

CCONS

cdr

car

swap

cons

app

CNIL

cdr

cdr

swap

cons

app

Cx

cdr

car

car

Cnil

quote

-LRB-

-RRB-

Ccons

cdr

push

push

car

swap

cdr

cdr

cons

swap

push

car

swap

cdr

car

cons

Cloop

swap

Cloop

cons

push

quote

-LRB-

-LSB-

CCONS

-LRB-

-RRB-

-RSB-

-RRB-

swap

cons

Chd

cdr

Cloop

push

car

push

quote

-LRB-

-LSB-

ChtNIL

-LRB-

-RRB-

-RSB-

-LSB-

ChtCONS

-LRB-

-RRB-

-RSB-

-RRB-

cons

app

car

Ctl

cdr

Cloop

push

car

push

quote

-LRB-

-LSB-

ChtNIL

-LRB-

-RRB-

-RSB-

-LSB-

ChtCONS

-LRB-

-RRB-

-RSB-

-RRB-

cons

app

cdr

where

ChtNIL

cdr

push

cons

and

ChtCONS

cdr

cdr

Cif

cdr

push

push

car

swap

cdr

cdr

cons

swap

push

car

swap

cdr

car

cons

Cloop

car

push

quote

-LRB-

-LSB-

CifNIL

-LRB-

-RRB-

-RSB-

-LSB-

CifCONS

-LRB-

-RRB-

-RSB-

-RRB-

cons

app

where

CifNIL

cdr

push

car

swap

cdr

cdr

cons

Cloop

and

CifCONS

cdr

push

car

swap

cdr

car

cons

Cloop

Ccall

cdr

push

Cloop

swap

car

cdr

cons

swap

car

cdr

cons

Cloop

Figure

iFC

-LRB-

p

d

-RRB-

interpreting

F-program

p

E

whererec

f

-LRB-

x

-RRB-

on

input

d.

Lemma

There

is

an

efficient

interpretation

Extended-CAM

Fsu

Proof

sketch

Same

as

the

proof

of

Proof

sketch

of

theorem

Analogously

to

that

of

Theorem

with

Lemma

replacing

Lemma

and

Lemma

replacing

Lemma

Conclusions

We

have

shown

the

existence

of

a

linear

time

hierarchy

for

Core-CAM

by

exposing

an

interpreter

of

Core-Cam

by

F

and

one

of

F

by

Core-CAM

based

on

detailed

semantical

descriptions

of

these

languages

including

their

assumed

running

times

and

argued

why

the

interpretation

overheads

are

constant

Analogously

we

have

shown

the

existence

of

a

linear

time

hierarchy

for

Extended-CAM

based

on

that

of

Fsu

For

each

of

these

cases

we

conclude

that

first-order

functional

programs

and

higher

order

functional

programs

define

the

same

class

of

linear

time-decidable

problems

As

a

consequence

functional

languages

which

can

be

implemented

on

CAM

have

a

fair

time

cost

measurement

Discussion

Eventhough

hierarchies

exists

both

in

the

case

of

a

tree-based

functional

language

and

in

the

case

of

a

graph-based

one

it

seems

not

possible

to

establish

a

correspondance

between

those

two

data-models

In

-LSB-

-RSB-

we

study

what

happens

when

trying

to

both

translate

from

the

extended

CAM

given

by

Curien

in

-LSB-

table

-RSB-

into

the

F

language

or

to

interpret

this

CAM

version

by

F

Since

the

languages

are

eager

the

latter

forces

an

evaluation

of

an

infinite

graph

when

interpreting

the

recursion

operator

In

the

first

case

closures

and

recursive

bindings

intoduce

program

dependent

slowdown

proportional

to

the

number

of

closure-building

instructions

and

recursive

binding

instructions

present

in

the

translated

program

By

requiring

a

uniform

bound

on

this

number

-LRB-

as

for

the

number

of

variables

in

the

laguage

-RRB-

we

seem

to

avoid

this

problem

Acknowledgements

Special

thanks

are

due

to

my

supervisor

Neil

Jones

for

introducing

me

to

the

subject

and

for

fruitful

discussions

along

Also

I

would

like

to

thank

Kristoffer

Rose

and

Olivier

Danvy

for

their

thoughtful

comments

and

encouragement

References

-LSB-

-RSB-

G.

Cousineau

P.-L

Curien

and

M.

Mauny

The

categorical

abstract

machine

Science

of

Computer

Programming

-LCB-

-LSB-

CR

-RSB-

William

Clinger

Jonathan

Rees

et

al.

Report

on

the

Algotithmic

Language

Scheme

November

-LSB-

-RSB-

Claus

Dahl

and

Mogens

Hessellund

Determining

the

constant

coefficients

in

a

time

hierarchy

Student

report

DIKU

-LRB-

University

of

Copenhagen

-RRB-

Department

of

Computer

Science

Universitetsparken

Copenhagen

O

Denmark

February

-LSB-

-RSB-

J.

Hannan

Making

abstract

machines

less

abstract

In

Functional

Programming

Languages

and

Computer

Architecture

number

in

LNCS

pages

-LCB-

Association

for

Computing

Machinery

Springer-Verlag

August

-LSB-

-RSB-

J.

E.

Hopcroft

and

J.

D.

Ullman

Introduction

to

automata

theory

languages

and

computation

Addison-Wesley

series

in

computer

science

Addison-Wesley

-LSB-

-RSB-

Martin

Huhne

Linear

speed-up

does

not

hold

on

turing

machines

with

tree

storages

Forschungsbericht

Lehrstuhl

Informatik

II

Universitat

Dortmund

Dortmund

Germany

-LSB-

-RSB-

Neil

D.

Jones

Constant

time

factors

do

matter

In

Steven

Homer

editor

STOC

Symposium

on

Theory

of

Computing

pages

-LCB-

ACM

Press

-LSB-

-RSB-

Neil

D.

Jones

Program

speedups

in

theory

and

practice

In

B.

Pehrson

and

I.

Simon

editors

World

Computer

Congress

volume

IFIP

Elsevier

Science

B.V.

-LRB-

North-Holland

-RRB-

-LSB-

-RSB-

G.

Kahn

Natural

semantics

Rapport

de

Recherche

INRIA

SophiaAntipolis

France

February

-LSB-

M

-RSB-

A.

R.

Meyer

et

al.

Algorithm

and

Complexity

volume

A

of

Handbook

of

Theoretical

Computer

Science

Elsevier

Science

Publishers

B.V.

-LSB-

-RSB-

Christos

H.

Papadimitriou

Computational

Complexity

Addison-Wesley

-LSB-

-RSB-

Robert

Paige

and

Fritz

Henglein

Mechanical

translation

of

set

theoretic

problem

specifications

into

efficient

ram

code

a

case

study

In

Lisp

and

Symbolic

Computation

North-Holland

-LSB-

-RSB-

G.

D.

Plotkin

A

structural

approach

to

operational

semantics

Technical

Report

DAIMI

Aarhus

University

Aarhus

Denmark

-LSB-

-RSB-

Ken

Regan

Linear

speed-up

information

vicinity

and

finite-state

machines

In

IFIP

proceedings

North-Holland

-LSB-

-RSB-

Eva

Rose

Linear

time

hierarchies

and

functional

languages

Student

report

DIKU

Department

of

Computer

Science

Universitetsparken

Copenhagen

O

Denmark

-LSB-

W

-RSB-

P.

Weis

et

al.

The

CAML

Reference

Manual

INRIA-ENS

version

edition

December

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

computation model
data structures
functional languages
selective updating
the categorical abstract machine

linear complexity
problem hierarchy
time-decidable sets