Implementing

the

IT

Fundamentals

Knowledge

Area

The

recently

promulgated

IT

model

curriculum

contains

IT

fundamentals

as

one

of

its

knowledge

areas

It

is

intended

to

give

students

a

broad

understanding

of

-LRB-

-RRB-

the

IT

profession

and

the

skills

that

students

must

develop

to

become

successful

IT

professionals

and

-LRB-

-RRB-

the

academic

discipline

of

IT

and

its

relationship

to

other

disciplines

As

currently

defined

the

IT

fundamentals

knowledge

area

requires

lecture

hours

to

complete

The

model

curriculum

recommends

that

the

material

relevant

to

the

IT

fundamentals

knowledge

area

be

offered

early

in

the

curriculum

for

example

in

an

introduction

to

IT

course

however

many

institutions

will

have

to

include

additional

material

in

an

introductory

IT

course

For

example

the

Introduction

of

IT

course

at

Georgia

Southern

University

is

used

to

introduce

students

to

the

available

second

disciplines

-LRB-

an

important

part

of

the

Georgia

Southern

IT

curriculum

aimed

at

providing

students

with

in-depth

knowledge

of

an

IT

application

domain

-RRB-

some

productivity

tools

and

SQL

For

many

programs

there

may

be

too

much

material

in

an

introductory

IT

course

This

paper

describes

how

Georgia

Southern

University

resolved

this

dilemma

K.

-LSB-

Computer

and

Information

Science

Education

-RSB-

Curriculum

Human

Factors

The

recently

promulgated

IT

Model

Curriculum

available

at

consists

of

knowledge

areas

including

IT

fundamentals

-LRB-

ITF

-RRB-

ITF

is

intended

to

provide

students

with

a

set

of

foundation

skills

and

provide

an

overview

of

the

discipline

of

IT

and

its

relationship

to

other

computing

disciplines

It

is

also

intended

to

help

students

understand

the

diverse

contexts

in

which

IT

is

used

and

the

challenges

inherent

in

the

diffusion

of

innovative

technology

Given

its

foundational

nature

it

will

not

come

as

a

surprise

that

the

model

curriculum

recommends

that

ITF

is

covered

early

in

a

student

's

program

of

study

and

it

seems

most

logical

that

this

knowledge

area

be

covered

in

an

introductory

course

in

a

baccalaureate

program

in

IT

The

IT

Model

curriculum

recommends

a

minimum

coverage

of

lecture

hours

for

the

ITF

knowledge

area

however

a

typical

semester

course

gives

an

instructor

at

most

lecture

hours

and

many

programs

will

have

to

include

additional

material

in

an

introductory

course

For

example

an

important

element

of

the

IT

program

at

Georgia

Southern

University

is

the

inclusion

of

second

disciplines

coherent

sets

of

courses

in

an

IT

application

area

such

as

electronic

broadcasting

law

enforcement

music

technology

and

supply

chain

management

-LRB-

-LSB-

-RSB-

-LSB-

-RSB-

-RRB-

Since

students

must

begin

introductory

courses

in

their

second

discipline

relatively

early

in

their

academic

program

it

is

important

that

they

be

exposed

to

the

range

of

second

disciplines

available

to

them

early

and

the

most

appropriate

place

to

do

this

is

in

the

introductory

IT

course

Also

students

enrolling

in

the

introductory

IT

course

at

Georgia

Southern

are

not

expected

to

have

taken

a

computer

literacy

course

beforehand

and

it

has

become

clear

that

many

are

weak

in

the

use

of

spreadsheets

Since

the

program

strongly

believes

that

IT

graduates

can

be

expected

to

be

conversant

with

basic

productivity

tools

including

spreadsheets

the

course

must

cover

the

basics

of

spreadsheet

application

Finally

the

introductory

IT

course

must

also

provide

a

basic

coverage

of

SQL

because

the

web

design

course

which

covers

n-tier

architectures

and

requires

a

basic

knowledge

of

SQL

is

taught

before

the

data

management

course

in

which

SQL

is

normally

presented

While

the

additional

material

that

has

to

be

covered

in

an

introductory

IT

course

is

likely

to

differ

between

institutions

it

is

likely

that

many

if

not

all

IT

programs

will

have

to

cover

some

additional

material

Given

that

ITF

already

requires

lecture

hours

considerable

pressure

is

placed

upon

instructors

in

introductory

IT

courses

to

cover

both

the

ITF

material

and

whatever

additional

material

needs

to

be

included

The

intent

of

this

paper

is

to

describe

how

this

particular

dilemma

was

resolved

at

Georgia

Southern

University

Section

provides

more

details

about

the

IT

fundamentals

knowledge

area

while

section

discusses

the

introduction

to

IT

course

offered

at

Georgia

Southern

University

Section

concludes

Permission

to

make

digital

or

hard

copies

of

all

or

part

of

this

work

for

personal

or

classroom

use

is

granted

without

fee

provided

that

copies

are

not

made

or

distributed

for

profit

or

commercial

advantage

and

that

copies

bear

this

notice

and

the

full

citation

on

the

first

page

To

copy

otherwise

or

republish

to

post

on

servers

or

to

redistribute

to

lists

requires

prior

specific

permission

and/or

a

fee

SIGITE

October

Newark

NJ

USA

Copyright

ACM

The

IT

Model

Curriculum

follows

the

example

set

by

the

Computer

Science

model

curriculum

-LRB-

education/curricula.html

-RRB-

and

distinguishes

between

a

number

of

knowledge

areas

each

consisting

of

a

number

of

knowledge

units

Knowledge

units

are

themselves

composed

of

topics

and

learning

outcomes

For

reasons

explained

in

-LRB-

-LSB-

-RSB-

-RRB-

the

IT

model

curriculum

differs

from

the

computer

science

model

curriculum

in

that

it

distinguishes

between

core

learning

outcomes

which

every

graduate

from

an

IT

program

is

expected

to

achieve

and

elective

learning

outcomes

which

only

graduates

specializing

in

this

area

are

expected

to

achieve

Given

the

foundational

nature

of

ITF

it

should

come

as

no

surprise

that

ITF

only

has

core

learning

outcomes

associated

with

it

Below

are

listed

the

knowledge

units

and

the

core

learning

outcomes

associated

with

each

The

number

behind

each

knowledge

unit

is

the

minimum

recommended

coverage

expressed

in

lecture

hours

Pervasive

themes

in

IT

-LRB-

-RRB-

Describe

the

components

of

IT

systems

and

their

interrelationships

Describe

how

complexity

occurs

in

IT

Recognize

that

an

IT

professional

must

know

how

to

manage

complexity

List

examples

of

tools

and

methods

used

in

IT

for

managing

complexity

Describe

the

role

of

the

IT

professional

as

the

user

advocate

Explain

why

life-long

learning

and

continued

professional

development

is

critical

for

an

IT

professional

Explain

why

adaptability

and

interpersonal

skills

are

important

to

an

IT

professional

Distinguish

between

data

and

information

and

describe

the

interrelationship

Describe

the

importance

of

data

and

information

in

IT

Explain

why

the

mastery

of

information

and

communication

technologies

is

important

to

an

IT

professional

Explain

why

the

IAS

perspective

needs

to

pervade

all

aspects

of

IT

Organizational

Issues

-LRB-

-RRB-

Describe

the

elements

of

a

feasible

IT

application

Identify

the

extent

and

activities

involved

in

an

IT

application

Understand

the

requirements

of

the

business

processes

Outline

the

project

management

processes

List

the

integration

processes

History

of

IT

-LRB-

-RRB-

Outline

the

history

of

computing

technology

Describe

significant

impacts

of

computing

on

society

Describe

significant

changes

in

human-computer

interaction

Outline

the

history

of

the

Internet

IT

and

its

related

and

informing

disciplines

-LRB-

-RRB-

Define

Information

Technology

Describe

the

relationship

between

IT

and

other

computing

disciplines

Describe

the

relationship

between

IT

and

non-computing

disciplines

Explain

why

mathematics

and

statistics

are

important

in

IT

Application

domains

-LRB-

-RRB-

Describe

the

application

of

IT

in

non-computing

disciplines

Describe

how

IT

has

impacted

almost

all

aspects

of

modern

living

Describe

ways

and

extents

in

which

IT

has

changed

the

interaction

and

communication

in

our

society

Describe

how

IT

has

impacted

the

globalization

of

world

economy

culture

political

systems

health

security

warfare

etc

Application

of

math

and

statistics

to

IT

-LRB-

-RRB-

Recognize

the

foundation

of

IT

is

built

upon

the

various

aspects

of

mathematics

Understand

the

number

systems

used

in

computation

Explain

data

representation

and

encoding

systems

Describe

the

current

encryption

methods

and

their

limitations

Describe

the

pervasive

usage

of

mathematical

concepts

such

as

functions

relations

sets

as

well

as

basic

logic

used

in

programming

Recognize

the

value

of

probability

and

statistics

Describe

the

basic

data

analysis

concepts

and

methods

used

in

IT

applications

The

total

minimum

recommended

coverage

thus

is

lecture

hours

The

introduction

to

IT

course

-LRB-

IT

-RRB-

offered

in

the

Department

of

IT

at

Georgia

Southern

University

is

designed

to

introduce

students

to

IT

as

a

discipline

and

cover

some

productivity

tools

namely

Excel

and

Access

In

line

with

all

other

IT

courses

at

Georgia

Southern

University

IT

was

formulated

through

a

set

of

explicit

learning

outcomes

The

learning

outcomes

for

IT

are

Demonstrate

a

basic

understanding

of

the

field

of

IT

including

the

ability

to

i.

Define

the

term

Information

Technology

ii

Recognize

the

disciplines

that

have

contributed

to

the

emergence

of

IT

namely

computer

science

information

systems

and

computer

engineering

iii

Identify

areas

in

which

IT

has

significantly

impacted

individuals

organizations

and/or

societies

Demonstrate

an

understanding

of

basic

information

technology

software

applications

including

the

ability

to

i.

Using

a

given

specification

create

a

simple

database

ii

Use

SQL

for

simple

queries

iii

Use

an

office

productivity

suite

The

overlap

between

Objective

and

the

ITF

Knowledge

Area

is

significant

however

due

to

Objective

the

introductory

IT

course

at

Georgia

Southern

must

cover

significant

additional

material

not

specified

in

the

IT

fundamentals

knowledge

area

Course

Outline

and

its

Mapping

to

the

IT

Fundamentals

Knowledge

Area

The

Introduction

to

IT

course

at

Georgia

Southern

consists

of

lecture

hours

Teaching

productivity

tools

Learning

Outcome

listed

in

Section

accounts

for

roughly

hours

of

instruction

Exams

conducted

during

the

semester

account

for

hours

of

instruction

This

leaves

lecture

hours

to

cover

the

remaining

topics

for

IT

relating

to

Learning

Outcome

listed

in

Section

Table

provides

a

breakdown

of

the

topics

covered

in

the

remaining

hours

of

instruction

the

number

of

lecture

hours

spent

on

that

topic

as

well

as

the

learning

outcome

in

the

IT

fundamentals

knowledge

area

of

the

model

curriculum

to

which

the

topic

corresponds

TABLE

IT

Topics

and

ITF

Learning

Outcomes

IT

Topic

Objective

Hours

Define

IT

Data

and

Information

Components

of

IT

Systems

Hardware

Software

Networks

User

Core

Technologies

Data

Management

Networking

Web

Systems

SAD

Programming

HCI

Specializations

in

BSIT

Related

Disciplines

Application

Domains

-LRB-

Second

Disciplines

in

BSIT

-RRB-

ITF

ITF

History

of

IT

Viruses

Crime

Law

Ethics

Privacy

Security

ITF

IT

as

a

Profession

TOTAL

Table

compares

the

number

of

hours

of

instruction

in

the

IT

course

for

each

of

the

knowledge

units

in

the

IT

fundamentals

area

to

the

minimum

recommended

number

of

lecture

hours

listed

in

the

model

curriculum

The

next

section

Section

discusses

the

discrepancies

between

the

recommended

number

of

hours

and

the

actual

number

of

hours

taught

TABLE

Comparison

of

IT

to

ITF

Knowledge

Area

ITF

Knowledge

Units

ITF

Recommended

IT

Knowledge

Units

Not

Covered

Not

Covered

TOTAL

Some

Observations

Table

illustrates

several

noteworthy

differences

between

the

IT

course

at

Georgia

Southern

University

and

the

knowledge

units

in

the

ITF

knowledge

area

A

discrepancy

exists

between

the

minimum

number

of

hours

recommended

for

-LRB-

pervasive

themes

in

IT

-RRB-

and

the

number

of

hours

taught

in

IT

The

hour

discrepancy

can

be

attributed

to

the

lack

of

coverage

in

IT

of

outcomes

Thus

IT

provides

no

explicit

coverage

of

the

reasons

for

the

emergence

of

complexity

in

IT

the

need

for

IT

professionals

to

handle

complexity

and

the

tools

and

techniques

available

to

an

IT

professional

in

Instead

the

IT

program

at

Georgia

Southern

covers

complexity-related

issues

in

a

number

of

courses

throughout

the

curriculum

For

example

some

complexity-related

issues

are

discussed

in

a

two-course

sequence

of

Java

programming

courses

Standards

are

discussed

in

a

number

of

courses

throughout

the

curriculum

including

a

data

communication

course

and

a

web

design

course

in

which

students

learns

how

to

implement

n-tier

architectures

Finally

complexity

related

issues

are

also

covered

in

a

capstone

course

on

IT

issues

and

management

Since

the

need

to

manage

complexity

is

identified

in

the

IT

model

curriculum

as

a

pervasive

theme

this

is

a

reasonable

alternative

to

cover

this

issue

The

IT

course

devotes

more

lectures

hours

than

the

minimum

recommendation

to

-LRB-

organizational

issues

-RRB-

and

-LRB-

application

domains

-RRB-

As

the

recommendation

is

a

minimum

this

is

not

problematic

however

it

is

worth

noting

that

the

explanation

for

these

discrepancies

relates

directly

to

the

structure

of

the

IT

major

at

Georgia

Southern

University

IT

majors

are

expected

to

take

a

number

of

core

courses

including

courses

in

programming

web

design

software

acquisition

implementation

and

integration

networking

systems

analysis

and

design

data

management

and

project

management

In

addition

IT

majors

specialize

in

either

knowledge

management

and

it

integration

systems

development

and

support

telecommunications

and

network

administration

or

web

and

multimedia

foundations

It

is

useful

to

students

starting

out

on

their

academic

program

in

IT

to

receive

information

on

the

structure

of

the

core

of

the

program

the

courses

that

it

consists

of

and

how

they

relate

to

each

other

and

on

the

different

specializations

available

to

them

Since

for

most

IT

majors

IT

is

the

first

course

in

the

program

it

is

the

logical

place

to

meet

this

aim

Clearly

a

full

discussion

of

the

structure

of

the

program

covers

more

than

just

data

management

-LRB-

-RRB-

a

broad

overview

of

IT

applications

-LRB-

-RRB-

and

their

development

-LRB-

-RRB-

systems

analysis

-LRB-

-RRB-

project

management

-LRB-

-RRB-

and

IT

integration

-LRB-

-RRB-

This

explains

why

IT

devotes

more

hours

than

the

recommended

minimum

Another

important

element

of

the

IT

program

at

Georgia

Southern

is

the

inclusion

of

second

disciplines

One

of

the

explicit

program

outcomes

of

the

BS

in

IT

program

at

Georgia

Southern

is

that

on

graduation

graduates

will

be

able

to

demonstrate

sufficient

understanding

of

an

application

domain

to

be

able

to

develop

IT

applications

suitable

for

that

application

domain

This

outcome

was

included

at

the

recommendation

of

industry

representatives

who

were

consulted

when

the

IT

program

was

designed

-LRB-

-LSB-

-RSB-

-RRB-

For

students

to

develop

this

ability

they

must

be

exposed

to

an

IT

application

domain

and

the

BS

IT

program

at

Georgia

Southern

therefore

contains

so-called

second

disciplines

Second

disciplines

are

coherent

sets

of

courses

in

potential

IT

application

domains

such

as

electronic

broadcasting

law

enforcement

music

technology

or

supply

chain

management

Students

typically

start

taking

courses

in

their

second

discipline

early

in

their

program

of

study

-LRB-

the

standard

program

of

study

suggests

that

students

take

their

first

second

discipline

course

in

the

first

semester

of

their

sophomore

year

-RRB-

It

is

therefore

important

that

students

be

exposed

to

the

different

second

disciplines

available

to

them

early

and

IT

is

the

logical

place

to

do

so

One

fortunate

side

effect

of

the

need

to

introduce

a

second

discipline

is

that

it

gives

the

program

an

excellent

opportunity

to

make

students

aware

of

the

broad

range

of

areas

in

which

IT

can

be

applied

and

hence

cover

-LRB-

application

domains

-RRB-

however

since

the

number

of

second

disciplines

is

large

-LRB-

currently

-RRB-

adequate

coverage

requires

hours

more

than

the

minimum

recommend

coverage

for

ITF

-LRB-

application

domains

-RRB-

One

lecture

hour

is

missing

in

-LRB-

history

of

IT

-RRB-

due

to

lack

of

coverage

in

the

IT

course

of

significant

changes

in

HCI

-LRB-

-RRB-

Some

material

relevant

to

this

topic

is

introduced

in

other

courses

that

students

tend

to

take

early

in

their

program

of

study

such

as

the

Introductory

Java

course

and

the

introductory

web

design

course

For

example

the

introductory

web

design

course

includes

among

its

course

objectives

that

students

develop

the

ability

to

design

Web

pages

in

accordance

with

good

design

principles

using

appropriate

styles

and

formats

and

the

ability

to

design

Web

pages

that

are

ADA

compliant

Material

relevant

to

both

objectives

allows

us

to

expand

on

HCI

design

principles

and

place

these

in

a

historical

context

Moreover

students

are

advised

to

take

the

introductory

web

design

course

in

the

semester

following

the

one

in

which

they

take

IT

and

they

are

therefore

likely

to

be

exposed

to

material

relevant

to

early

in

their

program

of

study

The

final

discrepancy

lies

in

the

coverage

of

the

learning

outcomes

corresponding

to

the

-LRB-

application

of

math

and

statistics

to

IT

-RRB-

in

the

IT

course

however

the

material

related

to

this

knowledge

unit

is

covered

in

two

courses

that

students

are

again

advised

to

take

early

in

their

program

of

study

One

course

is

a

course

in

discrete

mathematics

designed

specifically

for

IT

majors

It

includes

among

its

course

objectives

the

ability

to

explain

the

importance

of

discrete

mathematics

in

computer

science

and

information

technology

and

provides

in-depth

coverage

of

functions

sets

basic

propositional

logic

and

algorithm

design

Finally

all

students

enrolled

in

the

IT

major

take

a

statistics

course

which

covers

probability

Support

Material

Since

the

ITF

knowledge

area

is

relatively

new

no

single

textbook

covers

all

relevant

material

We

therefore

use

a

variety

of

sources

to

support

the

course

First

we

use

Excel

-LRB-

-LSB-

-RSB-

-RRB-

and

Access

-LRB-

-LSB-

-RSB-

-RRB-

to

support

the

teaching

of

spreadsheets

and

SQL

-LRB-

IT

course

outcomes

identified

in

section

-RRB-

Second

to

support

the

teaching

of

Topics

-LRB-

components

of

IT

systems

-RRB-

-LRB-

core

technologies

-RRB-

and

-LRB-

history

of

IT

-RRB-

we

use

Discovering

Computers

-LRB-

-LSB-

-RSB-

-RRB-

While

the

textbook

provides

a

reasonable

coverage

of

some

of

the

subtopics

discussed

it

does

not

sufficiently

stress

the

importance

of

the

users

and

the

importance

of

HCI

in

systems

development

and

we

therefore

emphasize

this

issue

throughout

the

course

We

discussed

the

way

in

which

we

cover

these

topics

in

Points

and

in

section

Third

for

topics

-LRB-

Application

Domains

-RRB-

-LRB-

Viruses

Crime

Law

Ethics

Privacy

and

Security

-RRB-

and

-LRB-

IT

as

a

profession

-RRB-

we

use

Computers

in

Our

World

-LRB-

-LSB-

-RSB-

-RRB-

however

we

do

not

rely

solely

on

the

textbook

for

our

coverage

of

topic

Again

we

discussed

this

in

Point

in

section

Finally

to

support

Topics

-LRB-

define

IT

-RRB-

-LRB-

data

and

information

-RRB-

and

-LRB-

IT

and

its

related

disciplines

-RRB-

students

are

given

material

written

specifically

for

the

course

Also

we

invite

representatives

from

computer

science

and

information

systems

to

lecture

on

their

specific

disciplines

and

follow

this

up

with

a

lecture

on

computer

engineering

and

a

discussion

on

the

relationship

between

all

four

disciplines

Table

lists

the

core

learning

outcomes

for

each

of

the

ITF

knowledge

units

and

maps

them

to

the

material

in

the

IT

course

used

to

achieve

that

outcome

The

material

comes

either

from

Discovering

Computers

-LRB-

-LSB-

-RSB-

-RRB-

-LRB-

DC

-RRB-

Computers

in

Our

World

-LRB-

-LSB-

-RSB-

-RRB-

-LRB-

CIOW

-RRB-

or

material

written

specifically

for

the

course

-LRB-

supplemental

material

-RRB-

and/or

lectures/discussions

led

by

faculty

members

from

other

related

departments

TABLE

Course

Materials

Used

in

IT

to

Achieve

ITF

Learning

Outcomes

ITF

Knowledge

Units

Learning

Outcomes

Material

DC

Chapters

Not

covered

DC

Chapters

CIOW

Chapters

Supplemental

Materials

DC

Chapter

Supplemental

Materials

DC

Chapters

Supplemental

Materials

ITF

CIOW

Chapters

DC

Chapters

Supplemental

Materials

DC

Timeline

between

Chapters

and

Chapter

CIOW

Chapters

Not

covered

DC

Timeline

between

Chapters

and

Chapter

ITF

Supplemental

Materials

Lecture

and

Class

Discussion

led

by

CS

IS

and

IT

representatives

CIOW

Chapters

Not

covered

Discovering

Computers

DC

Computers

in

Our

World

CIOW

The

IT

Fundamentals

knowledge

area

in

the

IT

model

curriculum

is

of

central

importance

to

the

design

of

an

introductory

IT

course

however

since

institutions

will

have

to

include

additional

materials

in

their

introductory

IT

courses

depending

on

the

nature

of

their

program

the

minimum

requirement

of

lecture

hours

to

cover

this

material

is

likely

to

lead

to

problems

This

paper

presents

the

experience

with

an

introductory

IT

course

at

Georgia

Southern

University

In

general

we

believe

that

despite

the

need

to

include

additional

material

in

we

are

able

to

cover

most

of

the

knowledge

units

in

the

IT

fundamentals

knowledge

area

We

are

confident

that

those

knowledge

units

not

covered

in

are

covered

in

other

courses

that

students

are

advised

to

take

early

in

their

programs

of

study

Finally

despite

the

fact

that

the

IT

fundamentals

knowledge

area

is

new

and

that

no

textbooks

cover

all

the

knowledge

units

within

the

area

we

have

been

able

to

identify

a

set

of

textbooks

that

jointly

cover

most

of

the

material

however

we

provide

a

relatively

small

amount

of

additional

material

and

the

textbooks

we

identified

do

not

always

cover

the

material

at

the

appropriate

level

Therefore

support

materials

specifically

for

the

IT

fundamentals

knowledge

area

need

to

be

developed

Whether

this

is

best

provided

in

the

form

of

a

textbook

or

more

dynamically

as

a

set

of

online

learning

objects

-LRB-

-LSB-

-RSB-

-LSB-

-RSB-

-RRB-

is

a

question

open

to

debate

-LSB-

-RSB-

Abernethy

K.

Treu

K

Piegari

G

Reichgelt

H.

An

implementation

model

for

a

learning

object

repository

October

E-learn

World

Conference

on

E-learning

in

corporate

government

healthcare

and

higher

education

Vancouver

Canada

-LSB-

-RSB-

Abernethy

K.

Treu

K

Piegari

G

Reichgelt

H.

A

learning

object

repository

in

support

of

introduction

to

information

technology

August

th

Annual

Conference

for

the

Higher

Education

Academy

Subject

Network

for

Information

and

Computer

Science

York

England

-LSB-

-RSB-

Jedlicka

L.

Computers

in

Our

World

Thompson

Course

Technologies

-LSB-

-RSB-

Lawson

E

Reichgelt

H

Lunt

B.

Ekstrom

J

Kamali

R.

Miller

J

and

Gorka

S

The

Information

Technology

Model

Curriculum

Paper

submitted

to

ISECON

-LSB-

-RSB-

Reichgelt

H.

Price

B.

and

Zhang

A.

Designing

an

Information

Technology

curriculum

The

Georgia

Southern

experience

Journal

of

Information

Technology

Education

Vol

No.

-LSB-

-RSB-

Reichgelt

H.

Price

B.

and

Zhang

A.

The

Inclusion

of

Application

Areas

in

IT

Curricula

SIGITE

Rochester

NY

ACM-SIGITE

-LRB-

formerly

SITE

-RRB-

September

-LSB-

-RSB-

Shelley

G.

Cashman

T.

Pratt

P.

and

Last

M.

Microsoft

Office

Access

Thompson

Course

Technologies

-LSB-

-RSB-

Shelley

G.

Cashman

T.

Quasney

J.

Microsoft

Office

Excel

Thompson

Course

Technologies

-LSB-

-RSB-

Shelley

G.

Vermaat

M.

and

Cashman

T.

Discovering

Computers

A

Gateway

to

Information

Thompson

Course

Technologies

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

it fundamentals knowledge area
it model curriculum


A

Functional

Correspondence

between

Evaluators

and

Abstract

Machines

We

bridge

the

gap

between

functional

evaluators

and

abstract

machines

for

the

calculus

using

closure

conversion

transformation

into

continuation-passing

style

and

defunctionalization

We

illustrate

this

approach

by

deriving

Krivine

's

abstract

machine

from

an

ordinary

call-by-name

evaluator

and

by

deriving

an

ordinary

call-by-value

evaluator

from

Felleisen

et

al.

's

CEK

machine

The

first

derivation

is

strikingly

simpler

than

what

can

be

found

in

the

literature

The

second

one

is

new

Together

they

show

that

Krivine

's

abstract

machine

and

the

CEK

machine

correspond

to

the

call-by-name

and

call-by-value

facets

of

an

ordinary

evaluator

for

the

calculus

We

then

reveal

the

denotational

content

of

Hannan

and

Miller

's

CLS

machine

and

of

Landin

's

SECD

machine

We

formally

compare

the

corresponding

evaluators

and

we

illustrate

some

degrees

of

freedom

in

the

design

spaces

of

evaluators

and

of

abstract

machines

for

the

calculus

with

computational

effects

Finally

we

consider

the

Categorical

Abstract

Machine

and

the

extent

to

which

it

is

more

of

a

virtual

machine

than

an

abstract

machine

D.

-LSB-

Software

-RSB-

Programming

Techniques

applicative

-LRB-

functional

-RRB-

programming

D.

-LSB-

Programming

Languages

-RSB-

Proces-sors

interpreters

Design

Languages

Basic

Research

in

Computer

Science

-LRB-

-RRB-

funded

by

the

Danish

National

Research

Foundation

Ny

Munkegade

Building

Aarhus

C

Denmark

Email

mads

dabi

danvy

jmi

@brics

dk

Permission

to

make

digital

or

hard

copies

of

all

or

part

of

this

work

for

personal

or

classroom

use

is

granted

without

fee

provided

that

copies

are

not

made

or

distributed

for

profit

or

commercial

advantage

and

that

copies

bear

this

notice

and

the

full

citation

on

the

first

page

To

copy

otherwise

to

republish

to

post

on

servers

or

to

redistribute

to

lists

requires

prior

specific

permission

and/or

a

fee

PPDP

August

Uppsala

Sweden

Copyright

ACM

In

Hannan

and

Miller

's

words

-LSB-

Section

-RSB-

there

are

fundamental

differences

between

denotational

definitions

and

definitions

of

abstract

machines

While

a

functional

programmer

tends

to

be

familiar

with

denotational

definitions

-LSB-

-RSB-

he

typically

wonders

about

the

following

issues

Design

How

does

one

design

an

abstract

machine

How

were

existing

abstract

machines

starting

with

Landin

's

SECD

machine

designed

How

does

one

make

variants

of

an

existing

abstract

machine

How

does

one

extend

an

existing

abstract

machine

to

a

bigger

source

language

How

does

one

go

about

designing

a

new

abstract

machine

How

does

one

relate

two

abstract

machines

Correctness

How

does

one

prove

the

correctness

of

an

abstract

machine

Assuming

it

implements

a

reduction

strategy

should

one

prove

that

each

of

its

transitions

implements

a

part

of

this

strategy

Or

should

one

characterize

it

in

reference

to

a

given

evaluator

or

to

another

abstract

machine

A

variety

of

answers

to

these

questions

can

be

found

in

the

literature

Landin

invented

the

SECD

machine

as

an

implementation

model

for

functional

languages

-LSB-

-RSB-

and

Plotkin

proved

its

correctness

in

connection

with

an

evaluation

function

-LSB-

Section

-RSB-

Krivine

discovered

an

abstract

machine

from

a

logical

standpoint

-LSB-

-RSB-

and

Cr

egut

proved

its

correctness

in

reference

to

a

reduction

strategy

he

also

generalized

it

from

weak

to

strong

normalization

-LSB-

-RSB-

Curien

discovered

the

Categorical

Abstract

Machine

from

a

categorical

standpoint

-LSB-

-RSB-

Felleisen

et

al.

invented

the

CEK

machine

from

an

operational

standpoint

-LSB-

-RSB-

Hannan

and

Miller

discovered

the

CLS

machine

from

a

proof-theoretical

standpoint

-LSB-

-RSB-

Many

people

derived

invented

or

-LRB-

re

-RRB-

discovered

Krivine

's

machine

Many

others

proposed

modifications

of

existing

machines

And

recently

Rose

presented

a

method

to

construct

abstract

machines

from

reduction

rules

-LSB-

-RSB-

while

Hardin

Maranget

and

Pagano

presented

a

method

to

extract

the

reduction

strategy

of

a

machine

by

extracting

axioms

from

its

transitions

and

structural

rules

from

its

architecture

-LSB-

-RSB-

In

this

article

we

propose

one

constructive

answer

to

all

the

questions

above

We

present

a

correspondence

between

functional

evaluators

and

abstract

machines

based

on

a

two-way

derivation

consisting

of

closure

conversion

transformation

into

continuation-passing

style

-LRB-

CPS

-RRB-

and

defunctionalization

This

two-way

derivation

lets

us

connect

each

of

the

machines

above

with

an

evaluator

and

makes

it

possible

to

echo

variations

in

the

evaluator

into

variations

in

the

abstract

machine

and

vice

versa

The

evaluator

clarifies

the

reduction

strategy

of

the

corresponding

machine

The

abstract

machine

makes

the

evaluation

steps

explicit

in

a

transition

system

Some

machines

operate

on

terms

directly

whereas

others

operate

on

compiled

terms

expressed

with

an

instruction

set

Accordingly

we

distinguish

between

abstract

machines

and

virtual

machines

in

the

sense

that

virtual

machines

have

an

instruction

set

and

abstract

machines

do

not

instead

abstract

machines

directly

operate

on

source

terms

and

do

not

need

a

compiler

from

source

terms

to

instructions

-LRB-

Gr

egoire

and

Leroy

make

the

same

point

when

they

talk

about

a

compiled

implementation

of

strong

reduction

-LSB-

-RSB-

-RRB-

Prerequisites

ML

observational

equivalence

abstract

machines

interpreters

CPS

transformation

defunctionalization

and

closure

conversion

We

use

ML

as

a

meta-language

and

we

assume

a

basic

familiarity

with

Standard

ML

and

reasoning

about

ML

programs

In

particular

given

two

pure

ML

expressions

e

and

e

we

write

e

e

to

express

that

e

and

e

are

observationally

equivalent

Most

of

our

implementations

of

the

abstract

machines

raise

compiler

warnings

about

non-exhaustive

matches

These

are

inherent

to

programming

abstract

machines

in

an

ML-like

language

The

warnings

could

be

avoided

with

an

option

type

or

with

an

explicit

exception

at

the

price

of

readability

and

direct

relation

to

the

usual

mathematical

specifications

of

abstract

machines

It

would

be

helpful

to

the

reader

to

know

at

least

one

of

the

machines

considered

in

the

rest

of

this

article

be

it

Krivine

's

machine

the

CEK

machine

the

CLS

machine

the

SECD

machine

or

the

Categorical

Abstract

Machine

It

would

also

be

helpful

to

have

already

seen

a

interpreter

written

in

a

functional

language

-LSB-

-RSB-

In

particular

we

make

use

of

Strachey

's

notions

of

expressible

values

i.e.

the

values

obtained

by

evaluating

an

expression

and

denotable

values

i.e.

the

values

denoted

by

identifiers

-LSB-

-RSB-

We

make

use

of

the

CPS

transformation

-LSB-

-RSB-

a

term

is

CPS-transformed

by

naming

all

its

intermediate

results

sequentializing

their

computation

and

introducing

continuations

Plotkin

was

the

first

to

establish

the

correctness

of

the

CPS

transformation

-LSB-

-RSB-

We

also

make

use

of

Reynolds

's

defunctionalization

-LSB-

-RSB-

defunctionalizing

a

program

amounts

to

replacing

each

of

its

function

spaces

by

a

data

type

and

an

apply

function

the

data

type

enumerates

all

the

function

abstractions

that

may

give

rise

to

inhabitants

of

this

function

space

in

this

program

-LSB-

-RSB-

Nielsen

Banerjee

Heintze

and

Riecke

have

established

the

correctness

of

defunctionalization

-LSB-

-RSB-

A

particular

case

of

defunctionalization

is

closure

conversion

in

an

evaluator

closure

conversion

amounts

to

replacing

each

of

the

function

spaces

in

expressible

and

denotable

values

by

a

tuple

and

inlining

the

corresponding

apply

function

We

would

like

to

stress

that

all

the

concepts

used

here

are

elementary

ones

and

that

the

significance

of

this

article

is

the

one-fits-all

derivation

between

evaluators

and

abstract

machines

Overview

The

rest

of

this

article

is

organized

as

follows

We

first

consider

a

call-by-name

and

a

call-by-value

evaluator

and

we

present

the

corresponding

machines

which

are

Krivine

's

machine

and

the

CEK

machine

We

then

turn

to

the

CLS

machine

and

the

SECD

machine

and

we

present

the

corresponding

evaluators

We

finally

consider

the

Categorical

Abstract

Machine

For

simplicity

we

do

not

cover

laziness

and

sharing

but

they

come

for

free

by

threading

a

heap

of

updateable

thunks

in

a

call-by-name

evaluator

-LSB-

-RSB-

We

first

go

from

a

call-by-name

evaluator

to

Krivine

's

abstract

machine

-LRB-

Section

-RRB-

and

then

from

the

CEK

machine

to

a

call-by-value

evaluator

-LRB-

Section

-RRB-

Krivine

's

abstract

machine

operates

on

de

Bruijn-encoded

terms

and

the

CEK

machine

operates

on

terms

with

names

Starting

from

the

corresponding

evaluators

it

is

simple

to

construct

a

version

of

Krivine

's

abstract

machine

that

operates

on

terms

with

names

and

a

version

of

the

CEK

machine

that

operates

on

de

Bruijn-encoded

terms

-LRB-

Section

-RRB-

The

derivation

steps

consist

of

closure

conversion

transformation

into

continuation-passing

style

and

defunctionalization

of

continuations

Closure

converting

expressible

and

denotable

values

makes

the

evaluator

first

order

CPS

transforming

the

evaluator

makes

its

control

flow

manifest

as

a

continuation

Defunctionalizing

the

continuation

materializes

the

control

flow

as

a

first-order

data

structure

The

result

is

a

transition

function

i.e.

an

abstract

machine

From

a

call-by-name

evaluator

to

Krivine

's

machine

Krivine

's

abstract

machine

-LSB-

-RSB-

operates

on

de

Bruijn-encoded

terms

In

this

representation

identifiers

are

represented

by

their

lexical

offset

as

traditional

since

Algol

-LSB-

-RSB-

datatype

term

IND

of

int

-LRB-

de

Bruijn

index

-RRB-

ABS

of

term

APP

of

term

term

Programs

are

closed

terms

A

higher-order

and

compositional

call-by-name

evaluator

Our

starting

point

is

the

canonical

call-by-name

evaluator

for

the

calculus

-LSB-

-RSB-

This

evaluator

is

compositional

in

the

sense

of

denotational

semantics

-LSB-

-RSB-

and

higher

order

-LRB-

-RRB-

It

is

compositional

because

it

solely

defines

the

meaning

of

each

term

as

a

composition

of

the

meaning

of

its

parts

It

is

higher

order

because

the

data

types

and

contain

functions

denotable

values

-LRB-

denval

-RRB-

are

thunks

and

expressible

values

-LRB-

expval

-RRB-

are

functions

An

environment

is

represented

as

a

list

of

denotable

values

A

program

is

evaluated

in

an

empty

environment

-LRB-

-RRB-

structure

struct

datatype

denval

THUNK

of

unit

expval

and

expval

FUNCT

of

denval

expval

-LRB-

eval

term

denval

list

expval

-RRB-

fun

eval

-LRB-

IND

n

e

-RRB-

let

val

-LRB-

THUNK

thunk

-RRB-

List.nth

-LRB-

e

n

-RRB-

in

thunk

-LRB-

-RRB-

end

eval

-LRB-

ABS

t

e

-RRB-

FUNCT

-LRB-

fn

v

eval

-LRB-

t

v

e

-RRB-

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

e

-RRB-

let

val

-LRB-

FUNCT

f

-RRB-

eval

-LRB-

e

-RRB-

in

f

-LRB-

THUNK

-LRB-

fn

-LRB-

-RRB-

eval

-LRB-

e

-RRB-

-RRB-

-RRB-

end

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

-RRB-

end

An

identifier

denotes

a

thunk

Evaluating

an

identifier

amounts

to

forcing

this

thunk

Evaluating

an

abstraction

yields

a

function

Evaluating

an

application

requires

the

evaluation

of

the

sub-expression

in

position

of

function

the

intermediate

result

is

a

function

which

is

applied

to

a

thunk

From

higher-order

functions

to

closures

We

now

closure-convert

the

evaluator

of

Section

In

the

function

spaces

in

the

data

types

of

denotable

and

expressible

values

are

only

inhabited

by

instances

of

the

abstractions

fn

v

eval

-LRB-

t

v

e

-RRB-

in

the

meaning

of

abstractions

and

fn

-LRB-

-RRB-

eval

-LRB-

e

-RRB-

in

the

meaning

of

applications

Each

of

these

abstractions

has

two

free

variables

a

term

and

an

environment

We

defunctionalize

these

function

spaces

into

closures

-LSB-

-RSB-

and

we

inline

the

corresponding

apply

functions

structure

struct

datatype

denval

THUNK

of

term

denval

list

and

expval

FUNCT

of

term

denval

list

-LRB-

eval

term

denval

list

expval

-RRB-

fun

eval

-LRB-

IND

n

e

-RRB-

let

val

-LRB-

THUNK

-LRB-

t

e

-RRB-

-RRB-

List.nth

-LRB-

e

n

-RRB-

in

eval

-LRB-

t

e

-RRB-

end

eval

-LRB-

ABS

t

e

-RRB-

FUNCT

-LRB-

t

e

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

e

-RRB-

let

val

-LRB-

FUNCT

-LRB-

t

e

-RRB-

-RRB-

eval

-LRB-

e

-RRB-

in

eval

-LRB-

t

-LRB-

THUNK

-LRB-

e

-RRB-

-RRB-

e

-RRB-

end

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

-RRB-

end

The

definition

of

an

abstraction

is

now

-LRB-

t

e

-RRB-

instead

of

fn

v

-LRB-

t

v

e

-RRB-

and

its

use

is

now

-LRB-

t

-LRB-

-LRB-

e

-RRB-

-RRB-

e

-RRB-

instead

of

f

-LRB-

-LRB-

fn

-LRB-

-RRB-

-LRB-

e

-RRB-

-RRB-

-RRB-

Similarly

the

definition

of

a

thunk

is

now

-LRB-

e

-RRB-

instead

of

-LRB-

fn

-LRB-

-RRB-

-LRB-

e

-RRB-

-RRB-

and

its

use

is

-LRB-

t

e

-RRB-

instead

of

thunk

-LRB-

-RRB-

The

following

proposition

is

a

corollary

of

the

correctness

of

defunctionalization

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

evaluating

p

yields

a

value

FUNCT

f

and

evaluating

p

yields

a

value

FUNCT

-LRB-

t

e

-RRB-

such

that

f

fn

v

-LRB-

t

v

e

-RRB-

CPS

transformation

We

transform

into

continuation-passing

style

Doing

so

makes

it

tail

recursive

Since

programs

are

closed

applying

List.nth

can

not

fail

and

therefore

it

denotes

a

total

function

We

thus

keep

it

in

direct

style

-LSB-

-RSB-

structure

struct

datatype

denval

THUNK

of

term

denval

list

and

expval

FUNCT

of

term

denval

list

-LRB-

eval

term

denval

list

-LRB-

expval

a

-RRB-

-RRB-

-LRB-

a

-RRB-

fun

eval

-LRB-

IND

n

e

k

-RRB-

let

val

-LRB-

THUNK

-LRB-

t

e

-RRB-

-RRB-

List.nth

-LRB-

e

n

-RRB-

in

eval

-LRB-

t

e

k

-RRB-

end

eval

-LRB-

ABS

t

e

k

-RRB-

k

-LRB-

FUNCT

-LRB-

t

e

-RRB-

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

e

k

-RRB-

eval

-LRB-

e

fn

-LRB-

FUNCT

-LRB-

t

e

-RRB-

-RRB-

eval

-LRB-

t

-LRB-

THUNK

-LRB-

e

-RRB-

-RRB-

e

k

-RRB-

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

fn

v

v

-RRB-

end

The

following

proposition

is

a

corollary

of

the

correctness

of

the

CPS

transformation

-LRB-

Here

observational

equivalence

reduces

to

structural

equality

over

ML

values

of

type

expval

-RRB-

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

Defunctionalizing

the

continuations

The

function

space

of

the

continuation

is

inhabited

by

instances

of

two

abstractions

the

initial

one

in

the

definition

of

with

no

free

variables

and

one

in

the

meaning

of

an

application

with

three

free

variables

To

defunctionalize

the

continuation

we

thus

define

a

data

type

cont

with

two

summands

and

the

corresponding

apply

cont

function

to

interpret

these

summands

structure

struct

datatype

denval

THUNK

of

term

denval

list

and

expval

FUNCT

of

term

denval

list

and

cont

of

term

denval

list

cont

-LRB-

eval

term

denval

list

cont

expval

-RRB-

fun

eval

-LRB-

IND

n

e

k

-RRB-

let

val

-LRB-

THUNK

-LRB-

t

e

-RRB-

-RRB-

List.nth

-LRB-

e

n

-RRB-

in

eval

-LRB-

t

e

k

-RRB-

end

eval

-LRB-

ABS

t

e

k

-RRB-

-LRB-

k

FUNCT

-LRB-

t

e

-RRB-

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

e

k

-RRB-

eval

-LRB-

e

-LRB-

e

k

-RRB-

-RRB-

and

-LRB-

v

-RRB-

v

-LRB-

-LRB-

e

k

-RRB-

FUNCT

-LRB-

t

e

-RRB-

-RRB-

eval

-LRB-

t

-LRB-

THUNK

-LRB-

e

-RRB-

-RRB-

e

k

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

-RRB-

end

The

following

proposition

is

a

corollary

of

the

correctness

of

defunctionalization

-LRB-

Again

observational

equivalence

reduces

here

to

structural

equality

over

ML

values

of

type

expval

-RRB-

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

We

identify

that

cont

is

a

stack

of

thunks

and

that

the

transitions

are

those

of

Krivine

's

abstract

machine

Krivine

's

abstract

machine

To

obtain

the

canonical

definition

of

Krivine

's

abstract

machine

we

abandon

the

distinction

between

denotable

and

expressible

values

and

we

use

thunks

instead

we

represent

the

defunctionalized

continuation

as

a

list

of

thunks

instead

of

a

data

type

and

we

inline

apply

cont

structure

struct

datatype

thunk

THUNK

of

term

thunk

list

-LRB-

eval

term

thunk

list

thunk

list

-RRB-

-LRB-

term

thunk

list

-RRB-

fun

eval

-LRB-

IND

n

e

s

-RRB-

let

val

-LRB-

THUNK

-LRB-

t

e

-RRB-

-RRB-

List.nth

-LRB-

e

n

-RRB-

in

eval

-LRB-

t

e

s

-RRB-

end

eval

-LRB-

ABS

t

e

-RRB-

-LRB-

ABS

t

e

-RRB-

eval

-LRB-

ABS

t

e

-LRB-

t

e

-RRB-

s

-RRB-

eval

-LRB-

t

-LRB-

THUNK

-LRB-

t

e

-RRB-

-RRB-

e

s

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

e

s

-RRB-

eval

-LRB-

e

-LRB-

e

-RRB-

s

-RRB-

-LRB-

main

term

term

thunk

list

-RRB-

fun

main

t

eval

-LRB-

t

-RRB-

end

The

following

proposition

is

straightforward

to

prove

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

For

comparison

with

the

canonical

definition

of

Krivine

's

abstract

machine

is

as

follows

-LSB-

-RSB-

where

t

denotes

terms

v

denotes

expressible

values

e

denotes

environments

and

s

denotes

stacks

of

expressible

values

Source

syntax

t

n

t

t

t

Expressible

values

-LRB-

closures

-RRB-

v

t

e

Initial

transition

transition

rules

and

final

transition

t

t

n

e

s

t

e

s

where

t

e

nth

e

n

t

e

t

e

s

t

t

e

e

s

t

t

e

s

t

e

t

e

s

t

e

t

e

Variables

n

are

represented

by

their

de

Bruijn

index

and

the

abstract

machine

operates

on

triples

consisting

of

a

term

an

environment

and

a

stack

of

expressible

values

Each

line

in

the

canonical

definition

matches

a

clause

in

We

conclude

that

Krivine

's

abstract

machine

can

be

seen

as

a

defunctionalized

CPS-transformed

and

closure-converted

version

of

the

standard

call-by-name

evaluator

for

the

calculus

This

evaluator

evidently

implements

Hardin

Maranget

and

Pagano

's

K

strategy

-LSB-

Section

-RSB-

From

the

CEK

machine

to

a

call-by-value

evaluator

The

CEK

machine

-LSB-

-RSB-

operates

on

terms

with

names

and

distinguishes

between

values

and

computations

in

their

syntax

-LRB-

i.e.

it

distinguishes

trivial

and

serious

terms

in

Reynolds

's

words

-LSB-

-RSB-

-RRB-

datatype

term

VALUE

of

value

COMP

of

comp

and

value

VAR

of

string

-LRB-

name

-RRB-

LAM

of

string

term

and

comp

APP

of

term

term

Programs

are

closed

terms

The

CEK

abstract

machine

Our

starting

point

reads

as

follows

-LSB-

Figure

page

-RSB-

where

t

denotes

terms

w

denotes

values

v

denotes

expressible

values

k

denotes

evaluation

contexts

and

e

denotes

environments

Source

syntax

t

w

t

t

w

x

x

t

Expressible

values

-LRB-

closures

-RRB-

and

evaluation

contexts

v

x

t

e

k

stop

fun

v

k

arg

t

e

k

Initial

transition

transition

rules

-LRB-

two

kinds

-RRB-

and

final

transition

t

init

t

mt

stop

w

e

k

eval

k

w

e

t

t

e

k

eval

t

e

arg

t

e

k

arg

t

e

k

v

cont

t

e

fun

v

k

fun

x

t

e

k

v

cont

t

e

x

v

k

stop

v

final

v

where

x

e

e

x

x

t

e

x

t

e

Variables

x

are

represented

by

their

name

and

the

abstract

machine

consists

of

two

mutually

recursive

transition

functions

The

first

transition

function

operates

on

triples

consisting

of

a

term

an

environment

and

an

evaluation

context

The

second

operates

on

pairs

consisting

of

an

evaluation

context

and

an

expressible

value

Environments

are

extended

in

the

fun

transition

and

consulted

in

The

empty

environment

is

denoted

by

mt.

This

specification

is

straightforward

to

program

in

ML

signature

ENV

sig

type

a

env

val

mt

a

env

val

lookup

a

env

string

a

val

extend

string

a

a

env

a

env

end

Environments

are

represented

as

a

structure

Env

ENV

containing

a

representation

of

the

empty

environment

mt

an

operation

lookup

to

retrieve

the

value

bound

to

a

name

in

an

environment

and

an

operation

extend

to

extend

an

environment

with

a

binding

structure

struct

datatype

expval

CLOSURE

of

string

term

expval

Env.env

datatype

STOP

ARG

of

term

expval

Env.env

FUN

of

expval

-LRB-

eval

term

expval

Env.env

-RRB-

-LRB-

expval

-RRB-

fun

eval

-LRB-

VALUE

v

e

k

-RRB-

continue

-LRB-

k

-LRB-

v

e

-RRB-

-RRB-

eval

-LRB-

COMP

-LRB-

APP

-LRB-

-RRB-

-RRB-

e

k

-RRB-

eval

-LRB-

e

ARG

-LRB-

e

k

-RRB-

-RRB-

and

-LRB-

VAR

x

e

-RRB-

Env.lookup

-LRB-

e

x

-RRB-

-LRB-

LAM

-LRB-

x

t

-RRB-

e

-RRB-

CLOSURE

-LRB-

x

t

e

-RRB-

and

continue

-LRB-

STOP

w

-RRB-

w

continue

-LRB-

ARG

-LRB-

e

k

-RRB-

w

-RRB-

eval

-LRB-

e

FUN

-LRB-

w

k

-RRB-

-RRB-

continue

-LRB-

FUN

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

k

-RRB-

w

-RRB-

eval

-LRB-

t

Env.extend

-LRB-

x

w

e

-RRB-

k

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

Env.mt

STOP

-RRB-

end

Refunctionalizing

the

evaluation

contexts

into

continuations

We

identify

that

the

data

type

ev

context

and

the

function

continue

are

a

defunctionalized

representation

The

corresponding

higher-order

evaluator

reads

as

follows

As

can

be

observed

it

is

in

continuation-passing

style

structure

struct

datatype

expval

CLOSURE

of

string

term

expval

Env.env

-LRB-

eval

term

expval

Env.env

-LRB-

expval

a

-RRB-

-RRB-

-LRB-

a

-RRB-

fun

eval

-LRB-

VALUE

v

e

k

-RRB-

k

-LRB-

-LRB-

v

e

-RRB-

-RRB-

eval

-LRB-

COMP

-LRB-

APP

-LRB-

-RRB-

-RRB-

e

k

-RRB-

eval

-LRB-

e

fn

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-RRB-

eval

-LRB-

e

fn

w

eval

-LRB-

t

Env.extend

-LRB-

x

w

e

-RRB-

k

-RRB-

-RRB-

-RRB-

and

-LRB-

VAR

x

e

-RRB-

Env.lookup

-LRB-

e

x

-RRB-

-LRB-

LAM

-LRB-

x

t

-RRB-

e

-RRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

Env.mt

fn

w

w

-RRB-

end

The

following

proposition

is

a

corollary

of

the

correctness

of

defunctionalization

-LRB-

Observational

equivalence

reduces

here

to

structural

equality

over

ML

values

of

type

expval

-RRB-

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

Back

to

direct

style

CPS-transforming

the

following

direct-style

evaluator

yields

the

evaluator

of

Section

-LSB-

-RSB-

structure

struct

datatype

expval

CLOSURE

of

string

term

expval

Env.env

-LRB-

eval

term

expval

Env.env

expval

-RRB-

fun

eval

-LRB-

VALUE

v

e

-RRB-

-LRB-

v

e

-RRB-

eval

-LRB-

COMP

-LRB-

APP

-LRB-

-RRB-

-RRB-

e

-RRB-

let

val

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-RRB-

eval

-LRB-

e

-RRB-

val

w

eval

-LRB-

e

-RRB-

in

eval

-LRB-

t

Env.extend

-LRB-

x

w

e

-RRB-

-RRB-

end

and

-LRB-

VAR

x

e

-RRB-

Env.lookup

-LRB-

e

x

-RRB-

-LRB-

LAM

-LRB-

x

t

-RRB-

e

-RRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

Env.mt

-RRB-

end

The

following

proposition

is

a

corollary

of

the

correctness

of

the

direct-style

transformation

-LRB-

Again

observational

equivalence

reduces

here

to

structural

equality

over

ML

values

of

type

expval

-RRB-

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

From

closures

to

higher-order

functions

We

observe

that

the

closures

in

are

defunctionalized

representations

with

an

apply

function

inlined

The

corresponding

higher-order

evaluator

reads

as

follows

structure

struct

datatype

expval

CLOSURE

of

expval

expval

-LRB-

eval

term

expval

Env.env

expval

-RRB-

fun

eval

-LRB-

VALUE

v

e

-RRB-

-LRB-

v

e

-RRB-

eval

-LRB-

COMP

-LRB-

APP

-LRB-

-RRB-

-RRB-

e

-RRB-

let

val

-LRB-

CLOSURE

f

-RRB-

eval

-LRB-

e

-RRB-

val

w

eval

-LRB-

e

-RRB-

in

f

w

end

and

-LRB-

VAR

x

e

-RRB-

Env.lookup

-LRB-

e

x

-RRB-

-LRB-

LAM

-LRB-

x

t

-RRB-

e

-RRB-

CLOSURE

-LRB-

fn

w

eval

-LRB-

t

Env.extend

-LRB-

x

w

e

-RRB-

-RRB-

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

eval

-LRB-

t

Env.mt

-RRB-

end

The

following

proposition

is

a

corollary

of

the

correctness

of

defunctionalization

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

evaluating

p

yields

a

value

CLOSURE

-LRB-

x

t

e

-RRB-

and

evaluating

p

yields

a

value

CLOSURE

f

such

that

fn

w

-LRB-

t

Env.extend

-LRB-

x

w

e

-RRB-

-RRB-

f

A

higher-order

and

compositional

call-by-value

evaluator

The

result

in

is

a

call-by-value

evaluator

that

is

compositional

and

higher-order

This

call-by-value

evaluator

is

the

canonical

one

for

the

calculus

-LSB-

-RSB-

We

conclude

that

the

CEK

machine

can

be

seen

as

a

defunctionalized

CPS-transformed

and

closure-converted

version

of

the

standard

call-by-value

evaluator

for

terms

Variants

of

Krivine

's

machine

and

of

the

CEK

machine

It

is

easy

to

construct

a

variant

of

Krivine

's

abstract

machine

for

terms

with

names

by

starting

from

a

call-by-name

evaluator

for

terms

with

names

Similarly

it

is

easy

to

construct

a

variant

of

the

CEK

machine

for

terms

with

de

Bruijn

indices

by

starting

from

a

call-by-value

evaluator

for

terms

with

indices

It

is

equally

easy

to

start

from

a

call-by-value

evaluator

for

terms

with

de

Bruijn

indices

and

no

distinction

between

values

and

computations

the

resulting

abstract

machine

coincides

with

Hankin

's

eager

machine

-LSB-

Section

-RSB-

Abstract

machines

processing

terms

with

de

Bruijn

indices

often

resolve

indices

with

transitions

v

e

s

v

s

n

v

e

s

n

e

s

Compared

to

the

evaluator

of

Section

the

evaluator

corresponding

to

this

machine

has

List.nth

inlined

and

is

not

compositional

fun

eval

-LRB-

IND

denval

e

s

-RRB-

denval

eval

-LRB-

IND

n

denval

e

s

-RRB-

eval

-LRB-

IND

-LRB-

n

-RRB-

e

s

-RRB-

Conclusion

We

have

shown

that

Krivine

's

abstract

machine

and

the

CEK

abstract

machine

are

counterparts

of

canonical

evaluators

for

call-by-name

and

for

call-by-value

terms

respectively

The

derivation

of

Krivine

's

machine

is

strikingly

simpler

than

what

can

be

found

in

the

literature

That

the

CEK

machine

can

be

derived

is

to

the

best

of

our

knowledge

new

That

these

two

machines

are

two

sides

of

the

same

coin

is

also

new

We

have

not

explored

any

other

aspect

of

this

call-by-name/call-by-value

duality

-LSB-

-RSB-

Using

substitutions

instead

of

environments

or

inlining

one

of

the

standard

computational

monads

-LRB-

state

continuations

etc.

-LSB-

-RSB-

-RRB-

in

the

call-by-value

evaluator

yields

variants

of

the

CEK

machine

that

have

been

documented

in

the

literature

-LSB-

Chapter

-RSB-

For

example

inlining

the

state

monad

in

a

monadic

evaluator

yields

a

state-passing

evaluator

The

corresponding

abstract

machine

has

one

more

component

to

represent

the

state

In

general

inlining

monads

provides

a

generic

recipe

to

construct

arbitrarily

many

new

abstract

machines

It

does

not

seem

as

straightforward

however

to

construct

a

monadic

abstract

machine

and

then

to

inline

a

monad

we

are

currently

studying

the

issue

On

another

note

one

can

consider

an

evaluator

for

strictness-annotated

terms

represented

either

with

names

or

with

indices

and

with

or

without

distinction

between

values

and

computations

One

is

then

led

to

an

abstract

machine

that

generalizes

Krivine

's

machine

and

the

CEK

machine

-LSB-

-RSB-

Finally

it

is

straightforward

to

extend

Krivine

's

machine

and

the

CEK

machine

to

bigger

source

languages

-LRB-

with

literals

primitive

operations

conditional

expressions

block

structure

recursion

etc.

-RRB-

by

starting

from

evaluators

for

these

bigger

languages

For

example

all

the

abstract

machines

in

The

essence

of

compiling

with

continuations

-LSB-

-RSB-

are

defunctionalized

continuation-passing

evaluators

i.e.

interpreters

In

the

rest

of

this

article

we

illustrate

further

the

correspondence

between

evaluators

and

abstract

machines

The

CLS

abstract

machine

is

due

to

Hannan

and

Miller

-LSB-

-RSB-

In

the

following

t

denotes

terms

v

denotes

expressible

values

c

denotes

lists

of

directives

-LRB-

a

term

or

the

special

tag

ap

-RRB-

e

denotes

environments

l

denotes

stacks

of

environments

and

s

denotes

stacks

of

expressible

values

Source

syntax

t

n

t

t

t

Expressible

values

-LRB-

closures

-RRB-

v

t

e

Initial

transition

transition

rules

and

final

transition

t

t

t

c

e

l

s

c

l

t

e

s

t

t

c

e

l

s

t

t

ap

c

e

e

l

s

c

v

e

l

s

c

l

v

s

n

c

v

e

l

s

n

c

e

l

s

ap

c

l

v

t

e

s

t

c

v

e

l

s

v

s

v

Variables

n

are

represented

by

their

de

Bruijn

index

and

the

abstract

machine

operates

on

triples

consisting

of

a

list

of

directives

a

stack

of

environments

and

a

stack

of

expressible

values

The

CLS

machine

Hannan

and

Miller

's

specification

is

straightforward

to

program

in

ML

datatype

term

IND

of

int

-LRB-

de

Bruijn

index

-RRB-

ABS

of

term

APP

of

term

term

Programs

are

closed

terms

structure

struct

datatype

directive

TERM

of

term

AP

datatype

env

ENV

of

expval

list

and

expval

CLOSURE

of

term

env

-LRB-

run

directive

list

env

list

expval

list

-RRB-

-LRB-

expval

-RRB-

fun

run

-LRB-

v

s

-RRB-

v

run

-LRB-

-LRB-

TERM

-LRB-

IND

-RRB-

-RRB-

c

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

run

-LRB-

c

l

v

s

-RRB-

run

-LRB-

-LRB-

TERM

-LRB-

IND

n

-RRB-

-RRB-

c

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

run

-LRB-

-LRB-

TERM

-LRB-

IND

-LRB-

n

-RRB-

-RRB-

-RRB-

c

-LRB-

ENV

e

-RRB-

l

s

-RRB-

run

-LRB-

-LRB-

TERM

-LRB-

ABS

t

-RRB-

-RRB-

c

e

l

s

-RRB-

run

-LRB-

c

l

-LRB-

CLOSURE

-LRB-

t

e

-RRB-

-RRB-

s

-RRB-

run

-LRB-

-LRB-

TERM

-LRB-

APP

-LRB-

-RRB-

-RRB-

-RRB-

c

e

l

s

-RRB-

run

-LRB-

-LRB-

TERM

-RRB-

-LRB-

TERM

-RRB-

AP

c

e

e

l

s

-RRB-

run

-LRB-

AP

c

l

v

-LRB-

CLOSURE

-LRB-

t

ENV

e

-RRB-

-RRB-

s

-RRB-

run

-LRB-

-LRB-

TERM

t

-RRB-

c

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

run

-LRB-

-LRB-

TERM

t

-RRB-

-LRB-

ENV

-RRB-

-RRB-

end

A

disentangled

definition

of

the

CLS

machine

In

the

definition

of

Section

all

the

possible

transitions

are

meshed

together

in

one

recursive

function

run

Instead

let

us

factor

run

into

several

mutually

recursive

functions

each

of

them

with

one

induction

variable

In

this

disentangled

definition

run

c

interprets

the

list

of

control

directives

i.e.

it

specifies

which

transition

to

take

if

the

list

is

empty

starts

with

a

term

or

starts

with

an

apply

directive

If

the

list

is

empty

the

computation

terminates

If

the

list

starts

with

a

term

run

t

is

called

caching

the

term

in

the

first

parameter

If

the

list

starts

with

an

apply

directive

run

a

is

called

run

t

interprets

the

top

term

in

the

list

of

control

directives

run

a

interprets

the

top

value

in

the

current

stack

The

disentangled

definition

reads

as

follows

structure

struct

datatype

directive

TERM

of

term

AP

datatype

env

ENV

of

expval

list

and

expval

CLOSURE

of

term

env

-LRB-

directive

list

env

list

expval

list

-RRB-

-LRB-

expval

-RRB-

fun

-LRB-

v

s

-RRB-

v

-LRB-

-LRB-

TERM

t

-RRB-

c

l

s

-RRB-

-LRB-

t

c

l

s

-RRB-

-LRB-

AP

c

l

s

-RRB-

-LRB-

c

l

s

-RRB-

and

-LRB-

IND

c

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

c

l

v

s

-RRB-

-LRB-

IND

n

c

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

IND

-LRB-

n

-RRB-

c

-LRB-

ENV

e

-RRB-

l

s

-RRB-

-LRB-

ABS

t

c

e

l

s

-RRB-

-LRB-

c

l

-LRB-

CLOSURE

-LRB-

t

e

-RRB-

-RRB-

s

-RRB-

-LRB-

APP

-LRB-

-RRB-

c

e

l

s

-RRB-

-LRB-

-LRB-

TERM

-RRB-

AP

c

e

e

l

s

-RRB-

and

-LRB-

c

l

v

-LRB-

CLOSURE

-LRB-

t

ENV

e

-RRB-

-RRB-

s

-RRB-

-LRB-

t

c

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

-LRB-

t

-LRB-

ENV

-RRB-

-RRB-

end

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

P

ROOF

By

fold-unfold

-LSB-

-RSB-

The

invariants

are

as

follows

For

any

ML

values

t

term

e

expval

list

and

s

expval

list

c

-LRB-

c

l

s

-RRB-

-LRB-

c

l

s

-RRB-

t

-LRB-

t

c

l

s

-RRB-

-LRB-

-LRB-

TERM

t

-RRB-

c

l

s

-RRB-

a

-LRB-

c

l

s

-RRB-

-LRB-

AP

c

l

s

-RRB-

The

evaluator

corresponding

to

the

CLS

machine

In

the

disentangled

definition

of

Section

there

are

three

possible

ways

to

construct

a

list

of

control

directives

-LRB-

cons

ing

a

term

and

cons

ing

an

apply

directive

-RRB-

We

could

specify

these

constructions

as

a

data

type

rather

than

as

a

list

Such

a

data

type

together

with

run

c

is

in

the

image

of

defunctionalization

-LRB-

run

c

is

the

apply

functions

of

the

data

type

-RRB-

The

corresponding

higher-order

evaluator

is

in

continuation-passing

style

Transforming

it

back

to

direct

style

yields

the

following

evaluator

structure

struct

datatype

env

ENV

of

expval

list

and

expval

CLOSURE

of

term

env

-LRB-

term

env

list

expval

list

-RRB-

-LRB-

env

list

expval

list

-RRB-

fun

-LRB-

IND

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

l

v

s

-RRB-

-LRB-

IND

n

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

IND

-LRB-

n

-RRB-

-LRB-

ENV

e

-RRB-

l

s

-RRB-

-LRB-

ABS

t

e

l

s

-RRB-

-LRB-

l

-LRB-

CLOSURE

-LRB-

t

e

-RRB-

-RRB-

s

-RRB-

-LRB-

APP

-LRB-

-RRB-

e

l

s

-RRB-

let

val

-LRB-

l

s

-RRB-

-LRB-

e

e

l

s

-RRB-

val

-LRB-

l

s

-RRB-

-LRB-

l

s

-RRB-

in

-LRB-

l

s

-RRB-

end

and

-LRB-

l

v

-LRB-

CLOSURE

-LRB-

t

ENV

e

-RRB-

-RRB-

s

-RRB-

-LRB-

t

-LRB-

ENV

-LRB-

v

e

-RRB-

-RRB-

l

s

-RRB-

-LRB-

main

term

expval

-RRB-

fun

main

t

let

val

-LRB-

v

s

-RRB-

-LRB-

t

-LRB-

ENV

-RRB-

-RRB-

in

v

end

end

The

following

proposition

is

a

corollary

of

the

correctness

of

defunctionalization

and

of

the

CPS

transformation

-LRB-

Here

observational

equivalence

reduces

to

structural

equality

over

ML

values

of

type

expval

-RRB-

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

As

in

Section

this

evaluator

can

be

made

compositional

by

refunctionalizing

the

closures

into

higher-order

functions

and

by

factoring

the

resolution

of

de

Bruijn

indices

into

an

auxiliary

lookup

function

We

conclude

that

the

evaluation

model

embodied

in

the

CLS

machine

is

a

call-by-value

interpreter

threading

a

stack

of

environments

and

a

stack

of

intermediate

results

with

a

caller-save

strategy

-LRB-

witness

the

duplication

of

environments

on

the

stack

in

the

meaning

of

applications

-RRB-

and

with

a

left-to-right

evaluation

of

sub-terms

In

particular

the

meaning

of

a

term

is

a

partial

endofunction

over

a

stack

of

environments

and

a

stack

of

intermediate

results

The

SECD

abstract

machine

is

due

to

Landin

-LSB-

-RSB-

In

the

following

t

denotes

terms

v

denotes

expressible

values

c

denotes

lists

of

directives

-LRB-

a

term

or

the

special

tag

ap

-RRB-

e

denotes

environments

s

denotes

stacks

of

expressible

values

and

d

denotes

dumps

-LRB-

list

of

triples

consisting

of

a

stack

an

environment

and

a

list

of

directives

-RRB-

Source

syntax

t

x

x

t

t

t

Expressible

values

-LRB-

closures

-RRB-

v

x

t

e

Initial

transition

transition

rules

and

final

transition

t

mt

t

s

e

x

c

d

e

x

s

e

c

d

s

e

x

t

c

d

x

t

e

s

e

c

d

s

e

t

t

c

d

s

e

t

t

ap

c

d

x

t

e

v

s

e

ap

c

d

e

x

v

t

d

where

d

s

e

c

d

v

s

e

s

e

d

d

v

s

e

c

d

v

s

e

v

Variables

x

are

represented

by

their

name

and

the

abstract

machine

operates

on

quadruples

consisting

of

a

stack

of

expressible

values

an

environment

a

list

of

directives

and

a

dump

Environments

are

consulted

in

the

first

transition

rule

and

extended

in

the

fourth

The

empty

environment

is

denoted

by

mt.

The

SECD

machine

Landin

's

specification

is

straightforward

to

program

in

ML

Programs

are

closed

terms

Environments

are

as

in

Section

datatype

term

VAR

of

string

-LRB-

name

-RRB-

LAM

of

string

term

APP

of

term

term

structure

struct

datatype

directive

TERM

of

term

AP

datatype

value

CLOSURE

of

string

term

value

Env.env

fun

run

-LRB-

v

e

-RRB-

v

run

-LRB-

s

e

-LRB-

TERM

-LRB-

VAR

x

-RRB-

-RRB-

c

d

-RRB-

run

-LRB-

-LRB-

Env.lookup

-LRB-

e

x

-RRB-

-RRB-

s

e

c

d

-RRB-

run

-LRB-

s

e

-LRB-

TERM

-LRB-

LAM

-LRB-

x

t

-RRB-

-RRB-

-RRB-

c

d

-RRB-

run

-LRB-

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-RRB-

s

e

c

d

-RRB-

run

-LRB-

s

e

-LRB-

TERM

-LRB-

APP

-LRB-

-RRB-

-RRB-

-RRB-

c

d

-RRB-

run

-LRB-

s

e

-LRB-

TERM

-RRB-

-LRB-

TERM

-RRB-

AP

c

d

-RRB-

run

-LRB-

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-RRB-

v

s

e

AP

c

d

-RRB-

run

-LRB-

Env.extend

-LRB-

x

v

e

-RRB-

-LRB-

TERM

t

-RRB-

-LRB-

s

e

c

-RRB-

d

-RRB-

run

-LRB-

v

e

-LRB-

s

e

c

-RRB-

d

-RRB-

run

-LRB-

v

s

e

c

d

-RRB-

-LRB-

main

term

value

-RRB-

fun

main

t

run

-LRB-

Env.mt

-LRB-

TERM

t

-RRB-

-RRB-

end

A

disentangled

definition

of

the

SECD

machine

As

in

the

CLS

machine

in

the

definition

of

Section

all

the

possible

transitions

are

meshed

together

in

one

recursive

function

run

Instead

we

can

factor

run

into

several

mutually

recursive

functions

each

of

them

with

one

induction

variable

These

mutually

recursive

functions

are

in

defunctionalized

form

the

one

processing

the

dump

is

an

apply

function

for

the

data

type

representing

the

dump

-LRB-

a

list

of

stacks

environments

and

lists

of

directives

-RRB-

and

the

one

processing

the

control

is

an

apply

function

for

the

data

type

representing

the

control

-LRB-

a

list

of

directives

-RRB-

The

corresponding

higher-order

evaluator

is

in

continuation-passing

style

with

two

nested

continuations

and

one

control

delimiter

reset

-LSB-

-RSB-

The

delimiter

resets

the

control

continuation

when

evaluating

the

body

of

a

abstraction

-LRB-

More

detail

is

available

in

a

technical

report

-LSB-

-RSB-

-RRB-

The

evaluator

corresponding

to

the

SECD

machine

The

direct-style

version

of

the

evaluator

from

Section

reads

as

follows

structure

struct

datatype

value

CLOSURE

of

string

term

value

Env.env

-LRB-

eval

term

value

list

value

Env.env

-RRB-

-LRB-

value

list

value

Env.env

-RRB-

fun

eval

-LRB-

VAR

x

s

e

-RRB-

-LRB-

-LRB-

Env.lookup

-LRB-

x

e

-RRB-

-RRB-

s

e

-RRB-

eval

-LRB-

LAM

-LRB-

x

t

-RRB-

s

e

-RRB-

-LRB-

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-RRB-

s

e

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

s

e

-RRB-

let

val

-LRB-

s

e

-RRB-

eval

-LRB-

s

e

-RRB-

val

-LRB-

s

e

-RRB-

eval

-LRB-

s

e

-RRB-

in

apply

-LRB-

s

e

-RRB-

end

and

apply

-LRB-

-LRB-

CLOSURE

-LRB-

x

t

e

-RRB-

-RRB-

v

s

e

-RRB-

let

val

-LRB-

v

-RRB-

reset

-LRB-

fn

-LRB-

-RRB-

eval

-LRB-

t

Env.extend

-LRB-

x

v

e

-RRB-

-RRB-

-RRB-

in

-LRB-

v

s

e

-RRB-

end

-LRB-

main

term

value

-RRB-

fun

main

t

let

val

-LRB-

v

-RRB-

reset

-LRB-

fn

-LRB-

-RRB-

eval

-LRB-

t

Env.mt

-RRB-

-RRB-

in

v

end

end

The

following

proposition

is

a

corollary

of

the

correctness

of

defunctionalization

and

of

the

CPS

transformation

-LRB-

Here

observational

equivalence

reduces

to

structural

equality

over

ML

values

of

type

value

-RRB-

P

ROPOSITION

-LRB-

FULL

CORRECTNESS

-RRB-

For

any

ML

value

p

term

denoting

a

program

p

p

As

in

Sections

and

this

evaluator

can

be

made

compositional

by

refunctionalizing

the

closures

into

higher-order

functions

We

conclude

that

the

evaluation

model

embodied

in

the

SECD

machine

is

a

call-by-value

interpreter

threading

a

stack

of

intermediate

results

and

an

environment

with

a

callee-save

strategy

-LRB-

witness

the

dynamic

passage

of

environments

in

the

meaning

of

applications

-RRB-

a

right-to-left

evaluation

of

sub-terms

and

a

control

delimiter

In

particular

the

meaning

of

a

term

is

a

partial

endofunction

over

a

stack

of

intermediate

results

and

an

environment

Furthermore

this

evaluator

evidently

implements

Hardin

Maranget

and

Pagano

's

L

strategy

i.e.

right-to-left

call

by

value

without

us

having

to

guess

its

inference

rules

-LSB-

Section

-RSB-

The

denotational

content

of

the

SECD

machine

puts

a

new

light

on

it

For

example

its

separation

between

a

control

register

and

a

dump

register

is

explained

by

the

control

delimiter

in

the

evaluator

-LRB-

reset

in

-RRB-

Removing

this

control

delimiter

gives

rise

to

an

abstract

machine

with

a

single

stack

component

for

control-not

by

a

clever

change

in

the

machine

itself

but

by

a

straightforward

simplification

in

the

corresponding

evaluator

It

is

straightforward

to

construct

a

variant

of

the

CLS

machine

for

terms

with

names

by

starting

from

an

evaluator

for

term

with

names

Similarly

it

is

straightforward

to

construct

a

variant

of

the

SECD

machine

for

terms

with

de

Bruijn

indices

by

starting

from

an

evaluator

for

term

with

indices

In

the

same

vein

it

is

simple

to

construct

call-by-name

versions

of

the

CLS

machine

and

of

the

SECD

machine

by

starting

from

call-by-name

evaluators

It

is

also

simple

to

construct

a

properly

tail

recursive

version

of

the

SECD

machine

and

to

extend

the

CLS

machine

and

the

SECD

machine

to

bigger

source

languages

by

extending

the

corresponding

evaluator

What

is

the

difference

between

an

abstract

machine

and

a

virtual

machine

Elsewhere

-LSB-

-RSB-

we

propose

to

distinguish

them

based

on

the

notion

of

instruction

set

A

virtual

machine

has

an

instruction

set

whereas

an

abstract

machine

does

not

Therefore

an

abstract

machine

directly

operates

on

a

term

but

a

virtual

machine

operates

on

a

compiled

representation

of

a

term

expressed

using

an

instruction

set

-LRB-

This

distinction

can

be

found

elsewhere

in

the

literature

-LSB-

-RSB-

-RRB-

The

Categorical

Abstract

Machine

-LSB-

-RSB-

for

example

has

an

instruction

set

categorical

combinators

and

therefore

-LRB-

despite

its

name

-RRB-

it

is

a

virtual

machine

not

an

abstract

machine

In

contrast

Krivine

's

machine

the

CEK

machine

the

CLS

machine

and

the

SECD

machine

are

all

abstract

machines

not

virtual

machines

since

they

directly

operate

on

terms

In

this

section

we

present

the

abstract

machine

corresponding

to

the

Categorical

Abstract

Machine

-LRB-

CAM

-RRB-

We

start

from

the

evaluation

model

embodied

in

the

CAM

-LSB-

-RSB-

The

evaluator

corresponding

to

the

CAM

The

evaluation

model

embodied

in

the

CAM

is

an

interpreter

threading

a

stack

with

its

top

element

cached

in

a

register

representing

environments

as

expressible

values

-LRB-

namely

nested

pairs

linked

as

lists

-RRB-

with

a

caller-save

strategy

-LRB-

witness

the

duplication

of

the

register

on

the

stack

in

the

meaning

of

applications

below

-RRB-

and

with

a

left-to-right

evaluation

of

sub-terms

In

particular

the

meaning

of

a

term

is

a

partial

endofunction

over

the

register

and

the

stack

This

evaluator

reads

as

follows

datatype

term

IND

of

int

-LRB-

de

Bruijn

index

-RRB-

ABS

of

term

APP

of

term

term

CONS

of

term

term

CAR

of

term

CDR

of

term

Programs

are

closed

terms

A

rough

definition

of

reset

is

fun

reset

t

t

-LRB-

-RRB-

A

more

accurate

definition

however

falls

out

of

the

scope

of

this

article

-LSB-

-RSB-

structure

struct

datatype

expval

PAIR

of

expval

expval

CLOSURE

of

expval

-LRB-

expval

expval

list

expval

expval

list

-RRB-

-LRB-

access

int

expval

expval

list

-RRB-

-LRB-

expval

expval

list

-RRB-

fun

access

-LRB-

PAIR

-LRB-

-RRB-

s

-RRB-

-LRB-

s

-RRB-

access

-LRB-

n

PAIR

-LRB-

-RRB-

s

-RRB-

access

-LRB-

n

s

-RRB-

-LRB-

eval

term

expval

expval

list

-RRB-

-LRB-

expval

expval

list

-RRB-

fun

eval

-LRB-

IND

n

v

s

-RRB-

access

-LRB-

n

v

s

-RRB-

eval

-LRB-

ABS

t

v

s

-RRB-

-LRB-

CLOSURE

-LRB-

v

fn

-LRB-

v

s

-RRB-

eval

-LRB-

t

v

s

-RRB-

-RRB-

s

-RRB-

eval

-LRB-

APP

-LRB-

-RRB-

v

s

-RRB-

let

val

-LRB-

v

v

s

-RRB-

eval

-LRB-

v

v

s

-RRB-

val

-LRB-

v

-LRB-

CLOSURE

-LRB-

v

f

-RRB-

-RRB-

s

-RRB-

eval

-LRB-

v

v

s

-RRB-

in

f

-LRB-

PAIR

-LRB-

v

v

-RRB-

s

-RRB-

end

eval

-LRB-

v

s

-RRB-

-LRB-

s

-RRB-

eval

-LRB-

CONS

-LRB-

-RRB-

v

s

-RRB-

let

val

-LRB-

v

v

s

-RRB-

eval

-LRB-

v

v

s

-RRB-

val

-LRB-

v

v

s

-RRB-

eval

-LRB-

v

v

s

-RRB-

in

-LRB-

PAIR

-LRB-

v

v

-RRB-

s

-RRB-

end

eval

-LRB-

CAR

t

v

s

-RRB-

let

val

-LRB-

PAIR

-LRB-

-RRB-

s

-RRB-

eval

-LRB-

t

v

s

-RRB-

in

-LRB-

s

-RRB-

end

eval

-LRB-

CDR

t

v

s

-RRB-

let

val

-LRB-

PAIR

-LRB-

-RRB-

s

-RRB-

eval

-LRB-

t

v

s

-RRB-

in

-LRB-

s

-RRB-

end

-LRB-

main

term

expval

-RRB-

fun

main

t

let

val

-LRB-

v

-RRB-

eval

-LRB-

t

-RRB-

in

v

end

end

This

evaluator

evidently

implements

Hardin

Maranget

and

Pagano

's

X

strategy

-LSB-

Section

-RSB-

The

abstract

machine

corresponding

to

the

CAM

As

in

Sections

and

we

can

closure-convert

the

evaluator

of

Section

by

defunctionalizing

its

expressible

values

transform

it

into

continuation-passing

style

and

defunctionalize

its

continuations

The

resulting

abstract

machine

reads

as

follows

where

t

denotes

terms

v

denotes

expressible

values

k

denotes

evaluation

contexts

and

s

denotes

stacks

of

expressible

values

Source

syntax

t

n

t

t

t

cons

t

t

car

t

cdr

t

Expressible

values

-LRB-

unit

value

pairs

and

closures

-RRB-

and

evaluation

contexts

v

v

v

v

t

k

t

k

k

t

k

k

k

k

Initial

transition

transition

rules

-LRB-

two

kinds

-RRB-

and

final

transition

t

init

t

n

v

s

k

eval

k

n

v

s

t

v

s

k

eval

k

v

t

s

v

s

k

eval

k

s

t

t

v

s

k

eval

t

v

v

s

t

k

cons

t

t

v

s

k

eval

t

v

v

s

t

k

car

t

v

s

k

eval

t

v

s

k

cdr

t

v

s

k

eval

t

v

s

k

t

k

v

v

s

cont

t

v

v

s

k

k

v

v

t

s

cont

t

v

v

s

k

t

k

v

v

s

cont

t

v

v

s

k

k

v

v

s

cont

k

v

v

s

k

v

v

s

cont

k

v

s

k

v

v

s

cont

k

v

s

v

final

v

where

v

v

v

n

v

v

n

v

Variables

n

are

represented

by

their

de

Bruijn

index

and

the

abstract

machine

consists

of

two

mutually

recursive

transition

functions

The

first

transition

function

operates

on

quadruples

consisting

of

a

term

an

expressible

value

a

stack

of

expressible

values

and

an

evaluation

context

The

second

transition

function

operates

on

triples

consisting

of

an

evaluation

context

an

expressible

value

and

a

stack

of

expressible

values

This

abstract

machine

embodies

the

evaluation

model

of

the

CAM

Naturally

more

intuitive

names

could

be

chosen

instead

of

etc.

We

have

presented

a

constructive

correspondence

between

functional

evaluators

and

abstract

machines

This

correspondence

builds

on

off-the-shelf

program

transformations

closure

conversion

CPS

transformation

defunctionalization

and

inlining

We

have

shown

how

to

reconstruct

known

machines

-LRB-

Krivine

's

machine

the

CEK

machine

the

CLS

machine

and

the

SECD

machine

-RRB-

and

how

to

construct

new

ones

Conversely

we

have

revealed

the

denotational

content

of

known

abstract

machines

We

have

shown

that

Krivine

's

abstract

machine

and

the

CEK

machine

correspond

to

canonical

evaluators

for

the

calculus

We

have

also

shown

that

they

are

dual

of

each

other

since

they

correspond

to

call-by-name

and

call-by-value

evaluators

in

the

same

direct

style

In

terms

of

denotational

semantics

-LSB-

-RSB-

Krivine

's

machine

and

the

CEK

machine

correspond

to

a

standard

semantics

whereas

the

CLS

machine

and

the

SECD

machine

correspond

to

a

stack

semantics

of

the

calculus

Finally

we

have

exhibited

the

abstract

machine

corresponding

to

the

CAM

which

puts

the

reader

in

a

new

position

to

answer

the

recurrent

question

as

to

whether

the

CLS

machine

is

closer

to

the

CAM

or

to

the

SECD

machine

Indeed

the

push-enter

twist

of

Krivine

's

machine

is

obtained

by

inlining

apply

cont

in

Section

Since

this

article

was

written

we

have

studied

the

correspondence

between

functional

evaluators

and

abstract

machines

for

call

by

need

-LSB-

-RSB-

and

for

Propositional

Prolog

-LSB-

-RSB-

In

both

cases

we

derived

sensible

machines

out

of

canonical

evaluators

It

seems

to

us

that

this

correspondence

between

functional

evaluators

and

abstract

machines

builds

a

reliable

bridge

between

denotational

definitions

and

definitions

of

abstract

machines

On

the

one

hand

it

allows

one

to

identify

the

denotational

content

of

an

abstract

machine

in

the

form

of

a

functional

interpreter

On

the

other

hand

it

gives

one

a

precise

and

generic

recipe

to

construct

arbitrarily

many

new

variants

of

abstract

machines

-LRB-

e.g.

with

substitutions

or

environments

or

with

stacks

-RRB-

or

of

arbitrarily

many

new

abstract

machines

starting

from

an

evaluator

with

any

given

computational

monad

-LSB-

-RSB-

Acknowledgments

We

are

grateful

to

Malgorzata

Biernacka

Julia

Lawall

and

Henning

Korsholm

Rohde

for

timely

comments

Thanks

are

also

due

to

the

anonymous

reviewers

This

work

is

supported

by

the

ESPRIT

Working

Group

APPSEM

II

-LRB-

-RRB-

-LSB-

-RSB-

Mads

Sig

Ager

Dariusz

Biernacki

Olivier

Danvy

and

Jan

Midtgaard

From

interpreter

to

compiler

and

virtual

machine

a

functional

derivation

Technical

Report

BRICS

DAIMI

Department

of

Computer

Science

University

of

Aarhus

Aarhus

Denmark

March

-LSB-

-RSB-

Mads

Sig

Ager

Olivier

Danvy

and

Jan

Midtgaard

A

functional

correspondence

between

call-by-need

evaluators

and

lazy

abstract

machines

Technical

Report

BRICS

DAIMI

Department

of

Computer

Science

University

of

Aarhus

Aarhus

Denmark

June

-LSB-

-RSB-

Anindya

Banerjee

Nevin

Heintze

and

Jon

G.

Riecke

Design

and

correctness

of

program

transformations

based

on

control-flow

analysis

In

Naoki

Kobayashi

and

Benjamin

C.

Pierce

editors

Theoretical

Aspects

of

Computer

Software

International

Symposium

TACS

number

in

Lecture

Notes

in

Computer

Science

Sendai

Japan

October

Springer-Verlag

-LSB-

-RSB-

Dariusz

Biernacki

and

Olivier

Danvy

From

interpreter

to

logic

engine

A

functional

derivation

Technical

Report

BRICS

DAIMI

Department

of

Computer

Science

University

of

Aarhus

Aarhus

Denmark

June

Accepted

for

presentation

at

LOPSTR

-LSB-

-RSB-

Rod

M.

Burstall

and

John

Darlington

A

transformational

system

for

developing

recursive

programs

Journal

of

ACM

-LRB-

-RRB-

-LSB-

-RSB-

Guy

Cousineau

Pierre-Louis

Curien

and

Michel

Mauny

The

categorical

abstract

machine

Science

of

Computer

Programming

-LRB-

-RRB-

-LSB-

-RSB-

Pierre

Cr

egut

An

abstract

machine

for

lambda-terms

normalization

In

Mitchell

Wand

editor

Proceedings

of

the

ACM

Conference

on

Lisp

and

Functional

Programming

pages

Nice

France

June

ACM

Press

-LSB-

-RSB-

Pierre-Louis

Curien

Categorical

Combinators

Sequential

Algorithms

and

Functional

Programming

Progress

in

Theoretical

Computer

Science

Birkha

user

-LSB-

-RSB-

Pierre-Louis

Curien

and

Hugo

Herbelin

The

duality

of

computation

In

Philip

Wadler

editor

Proceedings

of

the

ACM

SIGPLAN

International

Conference

on

Functional

Programming

SIGPLAN

Notices

Vol

No.

pages

Montr

eal

Canada

September

ACM

Press

-LSB-

-RSB-

Olivier

Danvy

Back

to

direct

style

Science

of

Computer

Programming

-LRB-

-RRB-

-LSB-

-RSB-

Olivier

Danvy

A

lambda-revelation

of

the

SECD

machine

Technical

Report

BRICS

DAIMI

Department

of

Computer

Science

University

of

Aarhus

Aarhus

Denmark

December

-LSB-

-RSB-

Olivier

Danvy

and

Andrzej

Filinski

Representing

control

a

study

of

the

CPS

transformation

Mathematical

Structures

in

Computer

Science

-LRB-

-RRB-

-LSB-

-RSB-

Olivier

Danvy

and

John

Hatcliff

CPS

transformation

after

strictness

analysis

ACM

Letters

on

Programming

Languages

and

Systems

-LRB-

-RRB-

-LSB-

-RSB-

Olivier

Danvy

and

John

Hatcliff

On

the

transformation

between

direct

and

continuation

semantics

In

Stephen

Brookes

Michael

Main

Austin

Melton

Michael

Mislove

and

David

Schmidt

editors

Proceedings

of

the

Conference

on

Mathematical

Foundations

of

Programming

Semantics

number

in

Lecture

Notes

in

Computer

Science

pages

New

Orleans

Louisiana

April

Springer-Verlag

-LSB-

-RSB-

Olivier

Danvy

and

Lasse

R.

Nielsen

Defunctionalization

at

work

In

Harald

S

ndergaard

editor

Proceedings

of

the

Third

International

ACM

SIGPLAN

Conference

on

Principles

and

Practice

of

Declarative

Programming

-LRB-

PPDP

-RRB-

pages

Firenze

Italy

September

ACM

Press

Extended

version

available

as

the

technical

report

BRICS

-LSB-

-RSB-

Matthias

Felleisen

and

Matthew

Flatt

Programming

languages

and

lambda

calculi

Unpublished

lecture

notes

readings.html

-LSB-

-RSB-

Matthias

Felleisen

and

Daniel

P.

Friedman

Control

operators

the

SECD

machine

and

the

calculus

In

Martin

Wirsing

editor

Formal

Description

of

Programming

Concepts

III

pages

Elsevier

Science

Publishers

B.V.

-LRB-

North-Holland

-RRB-

Amsterdam

-LSB-

-RSB-

Andrzej

Filinski

Representing

monads

In

Hans-J

Boehm

editor

Proceedings

of

the

Twenty-First

Annual

ACM

Symposium

on

Principles

of

Programming

Languages

pages

Portland

Oregon

January

ACM

Press

-LSB-

-RSB-

Cormac

Flanagan

Amr

Sabry

Bruce

F.

Duba

and

Matthias

Felleisen

The

essence

of

compiling

with

continuations

In

David

W.

Wall

editor

Proceedings

of

the

ACM

SIGPLAN

Conference

on

Programming

Languages

Design

and

Imple-mentation

SIGPLAN

Notices

Vol

No

pages

Albuquerque

New

Mexico

June

ACM

Press

-LSB-

-RSB-

Daniel

P.

Friedman

Mitchell

Wand

and

Christopher

T.

Haynes

Essentials

of

Programming

Languages

second

edition

The

MIT

Press

-LSB-

-RSB-

Benjamin

Gr

egoire

and

Xavier

Leroy

A

compiled

implementation

of

strong

reduction

In

Simon

Peyton

Jones

editor

Proceedings

of

the

ACM

SIGPLAN

International

Conference

on

Functional

Programming

SIGPLAN

Notices

Vol

No.

pages

Pittsburgh

Pennsylvania

September

ACM

Press

-LSB-

-RSB-

Chris

Hankin

Lambda

Calculi

a

guide

for

computer

scientists

volume

of

Graduate

Texts

in

Computer

Science

Oxford

University

Press

-LSB-

-RSB-

John

Hannan

and

Dale

Miller

From

operational

semantics

to

abstract

machines

Mathematical

Structures

in

Computer

Science

-LRB-

-RRB-

-LSB-

-RSB-

Th

er

ese

Hardin

Luc

Maranget

and

Bruno

Pagano

Functional

runtime

systems

within

the

lambda-sigma

calculus

Journal

of

Functional

Programming

-LRB-

-RRB-

-LSB-

-RSB-

Jean-Louis

Krivine

Un

interpr

ete

du

calcul

Brouil-lon

Available

online

at

krivine

-LSB-

-RSB-

Peter

J.

Landin

The

mechanical

evaluation

of

expressions

The

Computer

Journal

-LRB-

-RRB-

-LSB-

-RSB-

Robert

E.

Milne

and

Christopher

Strachey

A

Theory

of

Programming

Language

Semantics

Chapman

and

Hall

London

and

John

Wiley

New

York

-LSB-

-RSB-

Eugenio

Moggi

Notions

of

computation

and

monads

Information

and

Computation

-LSB-

-RSB-

Lasse

R.

Nielsen

A

denotational

investigation

of

defunctionalization

Technical

Report

BRICS

DAIMI

Department

of

Computer

Science

University

of

Aarhus

Aarhus

Denmark

December

-LSB-

-RSB-

Gordon

D.

Plotkin

Call-by-name

call-by-value

and

the

calculus

Theoretical

Computer

Science

-LSB-

-RSB-

John

C.

Reynolds

Definitional

interpreters

for

higher-order

programming

languages

Higher-Order

and

Symbolic

Computation

-LRB-

-RRB-

Reprinted

from

the

proceedings

of

the

ACM

National

Conference

-LRB-

-RRB-

-LSB-

-RSB-

Kristoffer

H.

Rose

Explicit

substitution

tutorial

survey

BRICS

Lecture

Series

DAIMI

Department

of

Computer

Science

University

of

Aarhus

Aarhus

Denmark

September

-LSB-

-RSB-

Amr

Sabry

and

Matthias

Felleisen

Reasoning

about

programs

in

continuation-passing

style

Lisp

and

Symbolic

Computation

-LRB-

-RRB-

-LSB-

-RSB-

David

A.

Schmidt

Denotational

Semantics

A

Methodology

for

Language

Development

Allyn

and

Bacon

Inc.

-LSB-

-RSB-

Guy

L.

Steele

Jr.

and

Gerald

J.

Sussman

The

art

of

the

interpreter

or

the

modularity

complex

-LRB-

parts

zero

one

and

two

-RRB-

AI

Memo

Artificial

Intelligence

Laboratory

Massachusetts

Institute

of

Technology

Cambridge

Massachusetts

May

-LSB-

-RSB-

Joseph

Stoy

Some

mathematical

aspects

of

functional

programming

In

John

Darlington

Peter

Henderson

and

David

A.

Turner

editors

Functional

Programming

and

its

Applications

Cambridge

University

Press

-LSB-

-RSB-

Joseph

E.

Stoy

Denotational

Semantics

The

Scott-Strachey

Approach

to

Programming

Language

Theory

The

MIT

Press

-LSB-

-RSB-

Christopher

Strachey

Fundamental

concepts

in

programming

languages

Higher-Order

and

Symbolic

Computation

-LRB-

-RRB-

-LSB-

-RSB-

Philip

Wadler

The

essence

of

functional

programming

-LRB-

in-vited

talk

-RRB-

In

Andrew

W.

Appel

editor

Proceedings

of

the

Nineteenth

Annual

ACM

Symposium

on

Principles

of

Programming

Languages

pages

Albuquerque

New

Mexico

January

ACM

Press

-LSB-

-RSB-

Mitchell

Wand

A

short

proof

of

the

lexical

addressing

algorithm

Information

Processing

Letters

-LSB-

-RSB-

Glynn

Winskel

The

Formal

Semantics

of

Programming

Languages

Foundation

of

Computing

Series

The

MIT

Press

closure conversion
interpreters
abstract machines
evaluator
abstract machine
defunctionalization

transformation into continuation-passing style (cps)