IDLE

Unified

to

Interactive

Information

Servers

Louis

Perrochon

Roman

Fischer

Institut

f?r

Informationssysteme

ETH

Z?rich

Z?rich

Switzerland

perrocho@inf.ethz.ch,

rofische@iiic.ethz.ch

Abstract

This

paper

focuses

on

the

problem

of

accessing

interactive

information

servers

-LRB-

interactive

sessions

in

e.g.

an

existing

library

information

system

-RRB-

directly

with

a

instead

of

opening

an

additional

viewer

-LRB-

e.g.

a

terminal

emulation

program

-RRB-

IDLE

is

a

language

designed

to

describe

the

user

interface

of

interactive

information

servers

in

a

way

that

allows

automatic

translation

of

to

server-commands

Interactive

information

servers

described

with

IDLE

can

be

accessed

by

any

via

a

special

translation

server

Describing

the

user

interface

of

an

interactive

information

server

is

typically

much

easier

than

designing

a

fully

featured

gateway

for

each

service

Introduction

The

World-Wide

Web

-LRB-

-RRB-

-LSB-

Berners-Lee

et

al.

-RSB-

in

its

current

state

allows

unified

access

to

a

multitude

of

information

systems

However

many

information

servers

can

not

be

accessed

by

like

Mosaic

Unlike

the

they

are

based

on

stateful

protocols

that

browsers

can

not

handle

To

allow

access

to

these

interactive

information

servers

special

document

types

have

been

introduced

and

additional

viewers

in

this

case

terminal

emulation

programs

are

required

In

this

paper

we

present

another

approach

Translation

servers

-LSB-

Perrochon

-RSB-

handle

the

translation

from

a

stateless

protocol

like

HTTP

-LRB-

Hypertext

Transfer

Protocol

-RRB-

into

a

stateful

one

that

can

be

used

by

interactive

information

servers

-LRB-

e.g.

-RRB-

Translation

servers

can

also

transform

hypertext-links

to

database

queries

and

the

query

results

back

to

hypertext

To

communicate

with

an

interactive

information

server

the

translation

server

accesses

the

same

user

interface

as

any

human

does

-LSB-

Perrochon

-RSB-

-LRB-

Fig.

-RRB-

translation

server

information

server

e.g.

library

system

with

user

interface

request

respond

browser

e.g.

Mosaic

user

stateless

protocol

e.g.

HTTP

stateful

protocol

e.g.

Fig

Translation

server

as

intermediary

Generic

translation

servers

are

able

to

access

different

interactive

information

servers

To

achieve

this

the

user

interface

of

an

interactive

information

server

is

described

in

a

formal

way

This

paper

proposes

a

simple

user

interface

description

language

-LRB-

IDLE

Interface

Description

LanguagE

-RRB-

useful

to

describe

a

whole

range

of

servers

Information

servers

described

with

IDLE

can

directly

be

accessed

by

using

HTTP

and

a

translation

server

The

language

IDLE

allows

the

programmer

to

concentrate

on

the

hard

part

of

the

task

automating

the

user

interaction

required

to

fetch

useful

data

from

an

interactive

information

server

All

low

level

aspects

of

communication

with

both

the

server

and

the

browser

are

completely

hidden

from

the

IDLE

programmer

The

structure

of

this

paper

is

as

follows

in

Section

we

will

define

the

notion

of

states

and

some

other

terms

and

we

also

will

refer

to

related

work

In

Section

IDLE

is

introduced

Section

discusses

some

implementation

aspects

while

Section

presents

a

short

example

The

paper

ends

with

a

summary

and

some

future-oriented

thoughts

An

EBNF-like

description

of

IDLE

can

be

found

in

the

appendix

Definitions

and

Related

Work

Definitions

Information

server

An

information

server

is

a

central

computer

system

providing

information

on

demand

to

remote

users

We

use

the

term

information

server

for

the

computer

and

the

program

running

on

it

This

definition

is

intended

to

include

traditional

systems

that

are

accessed

by

terminal

emulation

programs

as

well

as

newer

systems

like

Interactive

information

servers

are

those

accessed

by

terminal

emulation

programs

They

are

called

interactive

because

one

session

consists

of

an

iterative

dialogue-like

interaction

between

the

user

and

the

server

Non-interactive

information

servers

-LRB-

like

-RRB-

work

on

a

request-response

base

They

do

not

request

dialogue-like

interactions

Browser

-LRB-

or

client

-RRB-

Similar

to

a

terminal

emulation

program

that

accesses

an

interactive

information

server

a

browser

accesses

a

non-interactive

information

server

Mosaic

is

the

most

famous

browser

used

to

access

State

-LSB-

Comer

et

al.

-RSB-

defines

Information

that

a

server

maintains

about

the

status

of

ongoing

interactions

with

clients

is

called

state

information

Servers

that

do

not

keep

any

state

information

are

called

stateless

servers

others

are

called

stateful

servers

State

information

includes

all

stored

state

variables

and

their

values

An

individual

set

of

values

defines

a

state

A

server

is

said

to

change

its

state

whenever

the

values

of

its

state

variables

change

A

stateless

server

always

accepts

the

same

set

of

requests

from

clients

and

its

reaction

solely

depends

on

the

commands

given

A

stateful

server

can

assume

several

different

states

it

changes

its

state

depending

on

the

previous

commands

In

addition

requests

are

always

interpreted

depending

on

the

current

state

Whether

a

server

is

stateless

or

stateful

depends

also

on

the

communication

protocol

used

A

stateless

server

can

not

function

with

a

protocol

that

makes

the

meaning

of

a

message

depend

on

a

previous

message

Typically

an

interactive

information

server

is

stateful

Examples

are

stateless

-LRB-

apart

from

collecting

statistical

information

-RRB-

library

information

systems

and

similar

information

servers

accessed

with

telnet

are

stateful

servers

Interactive

information

server

and

stateful

information

server

are

synonyms

The

former

focuses

on

the

interaction

with

the

user

the

latter

on

the

server

itself

We

prefer

the

term

interactive

information

server

because

it

is

close

to

interactive

service

another

synonymous

notion

that

is

frequently

used

in

the

Related

Work

The

translation

server

approach

differs

from

previous

solutions

such

as

those

discussed

in

the

workshop

Offering

the

same

information

via

multiple

services

of

the

First

World-Wide

Web

Conference

in

Geneva

-LSB-

WWW

-RSB-

One

typical

example

is

the

CUBAI-project

-LSB-

CUBAI

-RSB-

which

offers

uniform

access

to

several

astronomical

libraries

To

join

the

project

library

providers

have

to

export

their

data

in

a

common

format

which

is

then

processed

by

WAIS

-LSB-

WAIS

-RSB-

and

made

available

using

a

gateway

Another

proposed

solution

is

to

replace

an

existing

application

-LRB-

but

not

the

data

-RRB-

with

a

special

purpose

-LRB-

Gateways

in

the

-RRB-

-LSB-

Eichmann

et

al.

-RSB-

-LSB-

Putz

-RSB-

Because

with

our

approach

the

data

provided

by

the

information

server

is

not

accessed

directly

but

via

the

existing

user

interface

there

is

neither

any

need

to

reverse-engineer

the

data-structure

nor

to

transform

nor

to

copy

it

IDLE

A

Simple

Interface

Description

Language

Generic

translation

servers

should

be

able

to

access

a

multitude

of

different

information

servers

To

achieve

this

we

define

a

special

user

interface

description

language

-LRB-

IDLE

-RRB-

that

can

be

used

to

describe

any

textbased

user

interface

of

existing

interactive

information

servers

The

translation

server

interprets

the

formal

interface

description

while

accessing

the

information

server

There

exist

many

scripting

languages

for

manipulation

character

strings

such

as

Perl

or

awk

IDLE

's

regular

expressions

provides

the

same

string

matching

functionality

In

addition

is

has

special

functions

that

handle

communication

with

both

the

information

server

and

the

browser

Because

IDLE

programs

are

neither

very

large

nor

very

complex

no

support

for

modularization

and

abstract

data

types

or

object-oriented

programming

is

given

An

EBNF

like

definition

of

the

language

can

be

found

in

the

appendix

Variables

and

Functions

In

IDLE

the

communication

with

the

interactive

information

server

is

very

simple

The

connection

to

the

server

is

modelled

as

a

duplex

character-stream

flowing

to

and

from

the

server

respectively

As

we

are

only

dealing

with

textbased

user

interfaces

we

need

basically

only

one

data

type

String

Often

more

than

one

substring

has

to

be

extracted

from

the

character-stream

flowing

from

the

server

To

simplify

the

handling

of

an

a

priory

unknown

number

of

similar

strings

all

variables

in

IDLE

are

lists

of

character

strings

Another

data

type

called

single

strings

exists

only

in

the

form

of

string

constants

-LRB-

e.g.

hello

-RRB-

and

during

the

evaluation

of

an

expression

-LRB-

E.g.

LEFTOF

-LRB-

foo

FIRST

-LRB-

bar

-RRB-

which

takes

the

first

string

of

the

list

of

bar

This

single

string

is

used

as

a

search

pattern

on

all

the

strings

of

foo

Only

the

strings

of

foo

that

match

the

pattern

and

only

the

characters

left

of

the

pattern

are

copied

to

the

resulting

string

list

-RRB-

As

basically

only

one

data

type

is

supported

there

is

no

need

to

declare

variables

before

using

them

When

evaluating

an

expression

every

name

is

considered

as

the

name

of

an

existing

variable

When

no

variable

with

this

name

can

be

found

a

new

one

is

allocated

and

initialized

For

manipulating

string

lists

and

single

strings

many

functions

are

defined

var

expr

Assignment

The

expression

expr

is

evaluated

and

the

resulting

string

list

is

copied

to

var

If

var

already

exists

its

previous

contents

are

destroyed

ADD

-LRB-

-RRB-

The

string

list

of

is

appended

at

the

end

of

the

string

list

of

As

we

are

handling

lists

duplicates

are

not

removed

DEL

-LRB-

-RRB-

All

strings

of

which

also

are

in

are

deleted

from

-LRB-

For

sets

this

is

also

called

asymmetric

set

difference

-RRB-

FIRST

-LRB-

expr

-RRB-

Returns

the

first

string

of

expr

If

expr

is

an

empty

list

FIRST

returns

an

empty

string

LAST

-LRB-

expr

-RRB-

Same

as

FIRST

but

returns

the

last

string

of

expr

CONCAT

-LRB-

expr

str

-RRB-

The

string

str

is

appended

to

all

strings

in

expr

RIGHTOF

-LRB-

expr

str

-RRB-

All

strings

of

expr

are

searched

for

str

If

str

matches

a

string

of

expr

all

characters

right

of

the

occurrence

of

str

are

copied

to

the

result

If

a

string

of

expr

does

not

match

str

it

will

not

be

copied

to

the

result

LEFTOF

-LRB-

expr

str

-RRB-

All

strings

of

expr

are

searched

for

str

If

str

matches

a

string

of

expr

all

characters

left

of

the

occurrence

of

str

are

copied

to

the

result

If

a

string

of

expr

does

not

match

str

it

will

not

be

copied

to

the

result

BETWEEN

-LRB-

expr

str

str

-RRB-

Same

as

RIGHTOF

and

LEFTOF

but

all

characters

between

the

two

search

strings

are

copied

to

the

result

Searching

Strings

and

Variables

-LRB-

Regular

Expressions

-RRB-

Whenever

a

string

list

is

scanned

for

a

string

the

matching

is

done

using

a

regular

expression

algorithm

Therefore

certain

characters

control

the

behaviour

of

the

searching

algorithm

instead

of

being

part

of

the

search

pattern

The

following

characters

have

special

meanings

in

regular

expressions

One

or

more

repetitions

of

the

preceding

regular

expression

The

preceding

regular

expression

is

optional

Any

number

-LRB-

n

-RRB-

of

repetitions

of

the

preceding

regular

expression

Matches

any

character

-LRB-

-RRB-

Groups

a

subexpression

Alternation

Either

the

regular

expression

to

the

left

or

the

regular

expression

to

the

right

may

match

-LSB-

-RSB-

Range

Matches

one

character

out

of

the

specified

range

or

character

class

Ranges

are

written

as

-LSB-

a-z

-RSB-

Defined

character

classes

are

alpha

upper

lower

alnum

xdigit

space

print

punct

graph

cntrl

blank

Character

classes

are

written

as

-LSB-

name

To

search

for

characters

having

special

meanings

in

regular

expressions

the

escapenotation

has

to

be

used

-LRB-

e.g.

search

for

an

asterisk

-RRB-

For

searching

a

simply

write

All

string

matching

is

strictly

done

from

left

to

right

This

also

holds

for

RIGHTOF

Notes

on

IDLE

Semantics

Backphases

-LRB-

BP

-RRB-

and

Frontphases

-LRB-

FP

-RRB-

The

description

of

the

user

interface

of

an

interactive

information

server

consists

of

a

sequence

of

phases

Backphases

-LRB-

BP

-RRB-

control

the

interactions

with

the

server

while

frontphases

-LRB-

FP

-RRB-

control

the

communication

with

the

user

-LRB-

typically

the

user

interacts

with

a

browser

which

itself

interacts

with

the

translation

server

which

interprets

an

IDLE

program

-RRB-

An

IDLE

program

must

follow

the

simple

rule

that

FP

and

BP

alternate

-LRB-

Fig.

-RRB-

It

is

therefore

forbidden

to

use

a

BACK

statement

in

a

BP

or

to

use

a

FRONT

statement

in

a

FP

Execution

of

an

IDLE

program

always

begins

with

the

start-phase

-LRB-

i.e.

the

one

named

START

-RRB-

An

IDLE

program

terminates

when

it

reaches

the

end

of

a

phase

before

reaching

a

FRONT

or

BACK

statement

Note

that

the

FRONT

and

BACK

statements

are

in

fact

jumps

or

mode

switches

to

the

respective

phases

rather

than

subroutine

calls

When

executing

a

FRONT

or

BACK

statement

the

current

phase

is

terminated

and

the

next

phase

is

started

Jumps

can

also

go

backwards

to

previous

phases

information

server

browser

user

Start

login

request

information

from

user

request

data

from

service

send

data

to

user

translation

server

frontphase

frontphase

backphase

backphase

frontphase

Fig.

Basic

mechanism

of

a

translation

server

The

Errophase

-LRB-

EP

-RRB-

An

EP

has

two

parts

The

first

part

is

a

sequence

of

special

commands

to

set

time-out-values

and

alike

-LRB-

errstm

-RRB-

These

commands

are

interpreted

before

execution

of

the

START-phase

The

second

part

is

a

statement

sequence

-LRB-

stmseq

-RRB-

grouped

between

BEGIN

and

END

This

stmseq

is

only

executed

after

an

error

occurred

The

following

special

commands

are

defined

for

the

first

part

of

an

EP

ERROR

READ/OPEN

You

can

specify

pairs

of

-LRB-

errorsymptom

id

-RRB-

to

catch

typical

error

messages

generated

by

the

server

Every

OPEN

and

READ

statement

will

watch

for

the

symptoms

while

they

execute

If

a

symptom

is

found

the

variable

receives

the

appropriate

id

and

the

statements

after

the

BEGIN

in

the

EP

are

executed

Note

that

specifying

too

many

errorsymptoms

will

slow

down

the

processing

of

READ

statements

TIMEOUT

FRONT

sets

the

number

of

seconds

a

PAGE

statement

will

wait

for

an

answer

-LRB-

i.e.

a

follow-up

request

from

the

user

-RRB-

before

it

gives

up

TIMEOUT

BACK

sets

the

number

of

seconds

an

OPEN

or

READ

statement

will

wait

to

succeed

before

giving

up

When

an

error

or

a

time-out

occurs

the

corresponding

identifier

will

be

placed

in

the

system

variable

The

statements

in

the

errorphase

after

the

BEGIN

can

then

query

this

variable

to

determine

the

cause

of

the

error

Note

The

EP

is

not

yet

implemented

in

the

current

version

of

the

translation

server

OPEN

CLOSE

READ

WRITE

These

statements

provide

an

easy

way

to

handle

streams

The

language

allows

having

multiple

streams

open

at

the

same

time

The

different

streams

can

be

labelled

with

a

file

identifier

-LRB-

a

number

-RRB-

However

the

file

identifier

will

not

be

needed

if

only

one

connection

is

open

at

a

time

When

executing

a

READ

statement

either

COUNT

or

UPTO

has

to

be

specified

COUNT

reads

the

specified

number

of

characters

UPTO

reads

until

the

specified

pattern

appears

Note

that

READ

stops

after

meeting

the

specified

condition

Due

to

the

way

strings

are

handled

READ

UPTO

ignores

bytes

However

READ

COUNT

does

not

ignore

them

and

reads

exactly

the

specified

number

of

bytes

IF

condition

THEN

stmseq

-LSB-

ELSE

stmseq

-RSB-

END

This

statement

provides

the

standard

conditional

execution

of

statements

The

condition

can

be

one

of

three

relations

Both

string

lists

must

be

the

same

This

means

that

all

the

strings

must

be

the

same

and

the

order

of

the

strings

must

be

the

same

Contrary

of

the

relation

yields

TRUE

when

one

or

more

strings

are

different

expr

CONTAINS

str

Yields

TRUE

if

str

matches

any

string

of

expr

FOREACH

var

IN

expr

DO

FOREACH

is

an

iterator

The

expression

is

evaluated

and

the

statements

between

the

DO

and

END

are

executed

for

every

string

of

the

stringlist

expr

The

variable

var

holds

the

string

for

which

the

loop

is

currently

executed

Var

always

represents

a

list

with

just

one

string

WHILE

condition

DO

stmseq

END

The

statements

in

the

WHILE-body

are

executed

while

the

condition

in

the

WHILE-head

holds

PRINT

PRINT

provides

an

easy

way

of

logging

events

and

printing

information

for

the

operator

of

the

translation

server

The

strings

in

expr

are

copied

to

STDOUT

RESUME

This

statement

is

allowed

only

in

an

errorphase

A

RESUME

statement

terminates

the

execution

of

the

errorphase

and

continues

at

the

location

where

the

error

occurred

Comments

Comments

are

enclosed

in

-LRB-

and

-RRB-

Nested

comments

are

allowed

The

PAGE

Statement

The

PAGE

statement

is

aimed

at

shielding

all

the

interaction

with

different

browsers

and

protocols

-LRB-

on

the

browser

side

of

the

translation

server

-RRB-

from

the

programmer

of

an

interface

description

PAGE

statements

are

allowed

in

frontphases

only

All

of

the

so-called

OUTPUT

and

INPUT

statements

in

a

PAGE

statement

are

gathered

together

and

they

define

a

single

interaction

with

the

user

If

the

PAGE-statement

contains

no

input

fields

it

will

not

-LRB-

have

to

-RRB-

wait

for

a

user-response

INPUT

incontrol

argpairs

The

input

incontrols

have

the

following

meanings

STRING

The

user

is

prompted

for

a

string

The

user

may

enter

any

string

-LRB-

including

linefeeds

etc.

-RRB-

PASSWORD

Same

as

STRING

but

the

characters

are

not

shown

in

the

entry-field

MENU

The

prompt

strings

are

displayed

in

a

menu

among

which

the

user

is

supposed

to

select

one

The

identifier

of

the

selected

menu

item

is

returned

RADIO

Radio

buttons

are

used

to

create

fields

of

mutually

exclusive

items

of

which

the

user

can

select

one

The

identifier

of

the

selected

button

is

returned

CHECK

Similar

to

radio

buttons

but

allows

multiple

items

to

be

selected

The

identifiers

of

all

the

selected

boxes

are

returned

REF

The

strings

in

the

argpairs

are

displayed

as

hypertext-links

to

further

information

If

the

user

selects

a

link

the

identifier

of

that

link

is

returned

by

INPUT

In

contrast

to

the

other

input

control

elements

when

the

user

selects

a

hyper-link

the

selection

is

immediately

returned

For

all

the

other

control

elements

the

user

has

to

press

a

submit

button

first

Every

INPUT

statement

can

hold

several

entries

-LRB-

argpairs

-RRB-

Every

entry

consists

of

an

-LRB-

expr

string

-RRB-

pair

The

strings

of

the

expr

will

form

the

prompt-text

of

that

INPUT

element

The

string

will

be

used

as

the

identifier

of

the

INPUT

field

INPUT

fields

of

type

STRING

and

PASSWORD

return

the

entered

string

rather

than

the

field-identifier

Note

If

several

INPUT

statements

put

their

results

into

the

same

variable

the

returned

strings

will

be

combined

in

a

list

The

order

of

the

INPUT

statements

in

the

PAGE

description

defines

the

order

of

the

returned

strings

OUTPUT

outcontrol

expr

With

the

OUTPUT

statement

the

IDLE

programmer

can

easily

transfer

data

-LRB-

either

written

as

text

in

the

IDLE

program

or

resulting

from

the

evaluation

of

any

expression

-RRB-

to

the

user

It

is

possible

to

read

data

into

a

variable

during

a

backphase

and

bring

it

to

the

user

with

an

OUTPUT

statement

in

the

next

frontphase

The

outcontrols

have

the

following

meaning

TITLE

If

this

control

occurs

in

the

first

OUTPUT-statement

of

a

PAGE-statement

the

expression

will

become

the

title

of

the

page

presented

to

the

user

HEADER

The

HEADER

flag

allows

placing

headings

on

the

PAGE

Currently

six

different

levels

of

headings

are

defined

in

IDLE

-LRB-

refer

to

the

-LSB-

HTML

-RSB-

documentation

for

further

details

-RRB-

PREDEFINED

The

expression

will

not

be

formatted

by

the

browser

A

fixed

width

font

will

be

used

to

display

the

text

Implementation

Aspects

Implementation

alternatives

for

translation

servers

have

been

discussed

in

-LSB-

Perrochon

-RSB-

In

this

chapter

some

implementation

decisions

in

connection

with

the

IDLE-definition

are

presented

One

of

the

goals

was

to

use

as

much

of

existing

programs

as

possible

For

simplicity

we

chose

Unix

as

the

target

operating

system

for

our

translation

server

We

decided

to

base

on

the

Common

Gateway

Interface

-LSB-

CGI

-RSB-

As

CGI

is

supported

by

many

of

the

available

-LRB-

i.e.

HTTP-daemons

-RRB-

this

solution

will

work

with

most

existing

servers

Staying

alive

to

keep

connections

open

Because

the

IDLE

programmer

normally

wants

to

keep

the

connection

to

an

information

server

open

during

the

whole

session

the

translation

server

should

not

close

the

connection

after

a

backphase

If

a

translation

server

is

implemented

without

further

precaution

with

CGI

it

would

be

restarted

for

every

single

request

e.g.

it

would

terminate

in

the

middle

of

every

frontphase

and

would

restart

when

the

next

request

from

the

user

arrives

thus

losing

contact

with

the

information

server

Our

solution

is

a

small

starter-program

This

program

merely

establishes

a

communication

channel

between

the

and

the

translation

server

When

a

request

is

served

the

starter-program

terminates

and

the

translation

server

stays

alive

This

concept

allows

the

translation

server

to

keep

communication

channels

open

as

long

as

needed

An

alternative

would

be

to

modify

an

existing

to

pass

special

requests

directly

to

the

translation

server

This

would

restrict

the

translation

server

to

run

with

a

so-patched

only

This

is

not

acceptable

State

Information

One

of

the

problems

discussed

in

-LSB-

Perrochon

-RSB-

was

the

question

of

how

and

where

to

store

state

information

of

the

translation

server

itself

between

different

requests

We

had

the

choice

between

storing

all

state-information

in

a

database

or

creating

a

new

process

for

every

ongoing

interaction

between

a

user

and

an

information

server

Storing

the

state-information

implicitly

in

the

process

that

interprets

the

interface

description

has

considerable

advantages

over

the

database

solution

Reading

from

streams

can

be

done

by

using

the

simple

synchronous

-LRB-

wait

until

data

arrives

-RRB-

read-calls

With

the

database

solution

we

would

have

been

forced

to

use

asynchronous

-LRB-

no

wait

-RRB-

read-calls

to

allow

a

certain

amount

of

parallelism

in

the

translation

server

The

scheduling

mechanism

of

Unix

ensures

that

waiting

processes

do

not

block

the

system

There

is

no

extra

programming

for

accessing

a

database

nor

is

there

any

dependency

on

third-party

databases

because

everything

is

included

in

the

translation

server

Creating

new

processes

is

far

easier

than

interfering

with

a

database

system

The

processing

of

multiple

parallel

requests

is

controlled

by

the

operating

system

Parsing

IDLE

Of

course

the

ability

to

read

and

understand

interface

descriptions

written

in

IDLE

is

one

of

the

key

aspects

of

a

translation

server

IDLE

is

not

compiled

but

interpreted

by

the

translation

server

This

approach

was

chosen

because

efficiency

inside

the

translation

server

is

not

a

key

issue

The

delays

caused

by

communication

are

several

orders

of

magnitude

higher

The

parser

of

the

translation

server

was

generated

with

the

help

of

a

compiler-compiler

Given

a

formal

description

of

the

language

and

some

additional

program-code

the

compiler-compiler

produces

an

IDLE-parser

Using

a

compiler-compiler

substantially

cuts

down

the

implementation

time

needed

for

programming

a

translation

server

An

Example

SVI-Kurs

In

this

chapter

a

commented

example

of

an

interface

description

using

IDLE

is

presented

The

service

described

is

SVI-Kurs

a

public

information

system

storing

dates

and

topics

of

conferences

tutorials

and

other

activities

of

the

Swiss

computer

professionals

organisations

The

existing

interface

allows

browsing

through

the

courses

by

date

or

organizer

-LRB-

Fig

-RRB-

This

example

is

selected

here

because

of

its

simplicity

However

still

not

all

details

can

be

included

here

Prototypes

accessing

SVI-Kurs

and

other

information

servers

are

available

via

the

translation

server

project

Fig.

Screen

shot

of

existing

Interface

of

SVI-Kurs

FRONTPHASE

START

<HTML>

BEGIN

<HEAD>

<TITLE>

SVI-Kurs

</TITLE>

</HEAD>

PAGE

<BODY>

OUTPUT

HEADER

SVI-Kurs

FORM

method

POST

action

cgi-bin/svi

kurs

OUTPUT

Select

an

access

method

SVI-Kurs

INPUT

RADIO

Select

an

access

method

<p>

-LRB-

By

Society

By

Subject

By

Society

input

name

sel

type

radio

value

By

Date

All

events

-RRB-

INTO

sel

By

Subject

input

name

sel

type

radio

value

END

By

Date

input

name

sel

type

radio

value

IF

sel

THEN

BACK

soc

END

All

events

input

name

sel

type

radio

value

IF

sel

THEN

BACK

subj

END

<p>

IF

sel

THEN

BACK

date

END

<input type="submit" value="Submit">

IF

sel

THEN

BACK

all

END

</form>

END

Tab

Frontphase

START

and

its

corresponding

HTML-document

The

interface

description

of

SVI-Kurs

starts

with

a

frontphase

requesting

more

information

from

the

user

-LRB-

Fig.

-RRB-

In

the

PAGE

statement

the

user

is

offered

four

different

access

methods

If

the

user

selects

one

of

the

choices

this

selection

is

stored

in

the

variable

sel

Depending

on

the

result

a

backphase

is

then

selected

The

whole

interaction

with

the

user

i.e.

waiting

for

the

initial

user

contact

preparing

of

HTML-pages

sending

this

page

to

the

user

waiting

for

an

answer

checking

all

follow-up

requests

to

the

same

site

for

the

answer

from

the

same

user

and

finally

parsing

this

follow-up

request

for

the

necessary

data

everything

is

done

by

the

translation

server

Fig.

Result

of

frontphase

START

on

a

Let

us

assume

now

that

the

user

wants

to

see

all

the

events

and

courses

stored

in

the

system

Then

the

translation

server

will

start

backphase

all

BACKPHASE

all

BEGIN

OPEN

PORT

ezinfo.ethz.ch

-LRB-

login

to

SVI-Kurs

-RRB-

WRITE

r

n

READ

UPTO

Username

WRITE

GAST

r

n

READ

UPTO

ezinfo

WRITE

EXT

SVI

n

READ

UPTO

-LRB-

Prompt

of

SVI-Kurs

-RRB-

WRITE

sel

-LRB-

Forward

the

user

selection

-RRB-

n

info

id

READ

UPTO

-LRB-

READ

COUNT

INTO

c

WHILE

c

E

DO

-LRB-

Now

start

to

fetch

data

-RRB-

IF

c

N

THEN

READ

UPTO

WRITE

N

n

CONCAT

-LRB-

n

N

-RRB-

ELSE

IF

c

M

THEN

READ

COUNT

READ

UPTO

n

INTO

line

info

ADD

-LRB-

info

CONCAT

-LRB-

CONCAT

-LRB-

line

-RRB-

CONCAT

-LRB-

n

FIRST

-LRB-

c

-RRB-

-RRB-

-RRB-

-RRB-

id

ADD

-LRB-

id

CONCAT

-LRB-

n

FIRST

-LRB-

c

-RRB-

-RRB-

-RRB-

END

END

READ

UPTO

-LRB-

READ

COUNT

INTO

c

END

WRITE

M

READ

UPTO

FRONT

END

Tab

Backphase

all

Only

now

the

translation

server

opens

a

connection

to

the

information

server

goes

through

the

login

procedure

and

gets

the

necessary

data

The

data

is

then

temporarily

stored

in

a

variable

info

Finally

the

next

frontphase

is

called

FRONTPHASE

<HTML>

BEGIN

<HEAD>

<TITLE>

SVI-Kurs

</TITLE>

</HEAD>

PAGE

<BODY>

OUTPUT

HEADER

List

of

all

Events

List

of

all

Events

FOREACH

x

IN

info

DO

<ul>

text

LEFTOF

-LRB-

x

-RRB-

id

RIGHTOF

-LRB-

x

-RRB-

<li>

INPUT

REF

-LRB-

text

id

-RRB-

INTO

sel

a

href

END

END

Workgroup

und

Workflow

</a>

BACK

END

</ul>

</BODY>

Tab

Frontphase

and

its

corresponding

HTML-document

This

frontphase

extracts

the

data

from

the

variable

info

and

sends

a

page

to

the

user

-LRB-

Fig.

-RRB-

In

this

case

the

page

consists

of

a

list

of

hypertext-links

of

which

the

user

can

select

one

All

this

is

invisible

for

the

IDLE

programmer

If

the

user

selects

one

of

the

links

the

translation

server

will

eventually

resume

its

operation

with

the

next

backphase

the

variable

sel

then

contains

the

identifier

of

the

selected

link

Note

that

in

this

case

the

user

will

have

to

select

between

hypertext-links

He

or

she

does

not

have

to

push

a

submit

button

after

the

selection

Fig.

Result

of

frontphase

on

a

BACKPHASE

BEGIN

WHILE

sel

DO

IF

sel

-LSB-

-RSB-

THEN

-LRB-

First

navigate

to

the

right

place

-RRB-

WRITE

sel

sel

ELSE

WRITE

N

READ

UPTO

sel

RIGHTOF

-LRB-

sel

N

-RRB-

END

END

READ

COUNT

READ

UPTO

-RSB-

INTO

kurs

-LRB-

get

the

data

-RRB-

kurs

LEFTOF

-LRB-

kurs

-RSB-

-RRB-

WRITE

M

READ

UPTO

FRONT

END

Tab

Backphase

In

this

phase

additional

data

for

the

selected

course

are

fetched

from

the

information

server

Note

that

in

the

meantime

the

translation

server

holds

the

connection

open

so

additional

information

can

be

read

from

the

stream

FRONTPHASE

<HTML>

BEGIN

<HEAD>

<TITLE>

SVI-Kurs

</TITLE>

</HEAD>

<BODY>

PAGE

Selected

SVI-Kurs

<PRE>

OUTPUT

HEADER

Selected

SVI-Kurs

Tagung

Workgroup

und

Workflow

OUTPUT

PREDEFINED

kurs

Zuerich

END

H.Gonzenbach

P.H.

Albrecht

CLOSE

SVD-Mitglieder

Fr

Uebrige

Teilnehmer

Fr

END

SVD

Postfach

Zuerich

Tel.

</PRE>

</BODY>

Tab

Frontphase

and

its

corresponding

HTML-document

The

final

frontphase

puts

the

detailed

information

concerning

the

selected

course

into

another

page

and

sends

it

back

to

the

user

-LRB-

Fig

-RRB-

Fig.

Result

of

frontphase

on

a

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

idle
interactive sessions
translation servers
user interface description language
w3