Chiron-1: A Software Architecture for User Interface Development ...

3 downloads 55928 Views 3MB Size Report
Interface Development, Maintenance, and ... users. Each artist and the application .... develop user interface and applications architectures that address software.
Chiron-1: A Software Architecture for User Interface Development, Maintenance, and Run-Time Support RICHARD N. TAYLOR, KARI A. NIES, GREGORY MACFARLANE, and KENNETH M. ANDERSON University of California,

ALAN BOLCER,

CRAIG A.

Irvine

and GREGORY F. JOHNSON Northrop Corporation

The Chiron-1 user interface system demonstrates key techniques that enable a strict separation of an application from its user interface. These techniques include separating the control-flow aspects of the application and user interface: they are concurrent and may contain many threads. Chiron also separates windowing and look-and-feel issues from dialogue and abstract presentation decisions via mechanisms employing a client–server architecture. To separate application are attached to instances of code from user interface code, user interface agents called artists application abstract data types (ADTs). Operations on ADTs within the application implicitly trigger user interface activities within the artists. Multiple artists can be attached to ADTs, providing multiple views and alternative forms of access and manipulation by either a single user or by multiple users. Each artist and the application run in separate threads of control. Artists maintain the user interface by making remote calls to an abstract depiction hierarchy in the Chiron server, insulating the user interface code from the specifics of particular windowing systems and toolkits. The Chiron server and clients execute in separate processes. The client–server architecture also supports multilingual systems: mechanisms are demonstrated that support clients written in programming languages other than that of the server, while nevertheless supporting object-oriented server concepts. The system has been used in several universities and research and development projects. It is available by anonymous ftp.

This article is a major revision and expansion of “Separations of Concerns in the Chiron-1 User Interface Development and Management System,” which appeared in the Proceedings of InterCHl 93 [Taylor and Johnson 1993]. This material is based on work sponsored by the Advanced Research Projects Agency under Grant MDA972-91-J-101O. The content of the information does not necessarily reflect the position or the policy of the U.S. Government, and no official endorsement should be inferred. Authors’ addresses: R. N. Taylor, K. A. Nies, G. A. Bolter, C. A. MacFarlane, and K. M. Anderson, Department of Information and Computer Science, University of California, Irvine, CA 927173425; G. F. Johnson, Northrop Corporation, Pico Rivera, CA. Permission to make digital\hard copy of part or all 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, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. @ 1995 ACM 1073-0516/95/0600-0105 $03.50 ACM Transactions

on Computer-Human

InteractIon,

Vol. 2, No. 2, June 1995, Pages 105-144.

106

.

R, N. Taylor

et al.

Categories

and Subject Descriptors: D.2.2 [Software Engineering]: TOOISand Techniques—user D.2 ,m [Software Engineering]: Miscellaneous—reusable software; H.5.2 [ InformaInterfaces and Presentation]: User Interfaces—user interface management systems

interfaces; tion ( UIMS)

General

Terms:

Design,

Languages

Additional Key Words and Phrases: Artists, user interface architectures

client-server,

concurrency,

event-based

integration,

1. OVERVIEW The development of well-known

of user interfaces problems

including

for large cost,

applications

is subject

maintainability,

and

changes in the operating environment. The objective of the to address these software engineering concerns by creating technology with the following properties: — architectural

flexibility

in the presence

— facilitation

of software

The

Chiron

project

of change,

and

reuse,

has

focused

architectures.

interface architectures do not exploit or even interface as the center

to

Chiron project is a user interface

and extensibility,

— robustness

and applications

to a series

sensitivity

its

research

We believe

that

in the

area

current,

of user

widely

interface

accepted

user

are too constraining for many applications. They often support concurrency, and they tend to view the user of the universe. Current user interface architectures

are also generally tied to a single programming language or even to a single development environment. They are often not easily reconfigurable and focus little

or no attention

develop

user

engineering and

interface concerns,

to offer

on issues and that

of software

applications is, to take

an environment

in

reuse.

Our

architectures the

which

it

best

objective that

in user

is relatively

interface easy

has been

address

to

software technology

to develop

and

maintain user interfaces for new and preexisting applications. We believe that our focus on software engineering concerns in the user interface domain is distinctive. In this section we discuss the objectives for the Chiron project and briefly indicate key constituents of the Chiron system. The domain of discourse is user interface development and run-time management architectures and how they relate to application software architectures. This work is in the stream of research often associated with the influential Seeheim model for UIMS architectures [Pfaff 1983]. Our perspective is that of researchers and developers of user interface systems. Our intended as system architects.

1.1 Architecture

audience

in our brief description definitions. The application

providing

a user interface.

ACM TransactIons

researchers

and developers,

as well

Overview

To be clear few

is other

of the Chiron architecture, we provide is the body of code for which Chiron

A user interface

on Computer-Human

InteractIon,

consists

of presentations

Vol 2, No 2, June 1995

(abstract

a is

Chiron-1 graphics)

plus

actions).

For

dialogue our

decisions

purposes,

mine

look-and-feel

refers

to an operating

(association

specification

(concrete

graphics).

system

of behavior

of a user Process

process.

interface in

the

.

with

events

does

not

ensuing

We also use the term

107 or

deter-

discussion

agent

to refer

to

software components that have their own thread of control. Multiple agents may reside in a single process. Chiron employs a client–server architecture. The server provides clients with an interface to an extensible, object-oriented class hierarchy of graphical objects called the abstract depiction hierarchy ( ADl+). The Chiron server maintains a structured graphics model of the user interface managed by each client,

called

stract toolkit.

depiction to a concrete depiction, using a windowing system and In addition, the server listens for events from the underlying window-

ing

system,

those A

the

abstract

interprets

that

it cannot

Chiron

client

depiction,

these fully

events,

handle

The

frame

of reference is the

an

mechanism

about the information

for

operations

responds

forwards

application

and dialogue

rendering

to the and

of the

appropriate

its

to the

operation to one about operations

decisions;

communication on objects

tions implicitly trigger user interface ing is performed by listening agents ing

and

the

ab-

client

user

To

interface.

from user interface code, user interface agents to instances of objects within the application. An

artist encapsulates presentation making calls to a Chiron server. application

oversees

locally.

encapsulates

separate application code called artistsl are attached

and

between

within

the

and

or many artists. on one or many

are enacted

the

artists

application.

activities within associated with

triggers

they

the artists. the objects.

may

convey

Likewise, objects.

and

Such

the

opera-

The triggerA dispatch-

the

artists

by

information may

receive

1.2 Goals The following design these

paragraphs

properties

and

elaborate, briefly

in turn,

discuss

how

each of our software the

Chiron

architecture

engineering achieves

goals:

Architectural

Extensibility

and

Flexibility.

Current

nologies often impose a fairly rigid set of constraints must be structured. In a large application, however, architectural

desiderata,

so it is undesirable

a particular architecture. Chiron provides architectural

flexibility

user

for the user at two

interface

tech-

on how the application there are typically many

levels:

interface within

to enforce application

processes and across process and machine boundaries. Inside an application process, the Chiron dispatching mechanism provides an unobtrusive interface between the application and the user interface layer. Across process boundaries, Chiron’s client–server architecture provides flexibility in terms of application languages, windowing systems and toolkits, and process interconnection topology. 1 The term originated concept that is similar

with the Incense system [Myers 1983]. We use the term in purpose, but more general, powerful, and complex. ACM Transactions

on Computer-Human

Interaction,

to apply

to a

Vol. 2, No. 2, June 1995.

108

.

R. N. Taylor

et al.

In a system that has distinct Change. it becomes difficult or impossible to manage since changes to one part of such a system

Robustness in the Presence groups of concerns intermingled, changes in the environment, inevitably

mandate

changes

of

in other,

unrelated

parts

of the

system.

worst case, one is required to do an amount of work proportional the entire system whenever a change is necessary. Chiron provides separation of concerns at two levels: between tion

and the user

interface

and the underlying Reusable

windowing

Software

A

agent

well-defined facilitates

the user

the

interface

applicasoftware

and toolkit.

key

to

software

use modular components notion of artists adheres

software

and has a small, The artist notion

and between

system

Artifacts.

systems so that they interfaces. The Chiron is a standalone

software

In the

to the size of

that

implements

interface software

reuse

with to this

is

to

focused, principle.

a particular

to the application reuse by factoring

structure

well-defined Each artist user

interface

and to the server. out user interface

code from the application code, allowing for separately maintainable and reusable entities. The reuse issue is also addressed by the design of the ADH. A programmer can make use of the standard class hierarchy of user interface objects

or can create

1.3 Specific Turning

from Chiron

groups — Support network

tailored

the

general

software

was designed

for multiple coordinated

with

for concurrency, boundaries. The of control;

for

for clients

techniques the

should

to standard systems.

of graphical changes written

used

be in absolute user

look-and-feels

library

— Support for dynamic executes.

The

above

to more-specific

in mind: update. user or

both within processes and across machine application and user interface should have

neither

multiple

— An extensible

throughout

goals

objectives

graphical and textual views, with coordinated views should be available to either a single

— Performance comparable and ad hoc handcrafted

— Support

engineering the following

of users.

own threads

— Support reloading.

subclasses.

Objectives

issues,

— Support Multiple

new,

without

development

recoding,

set of active

in multiple

of this

control. systems

recompiling,

or

objects.

to the

to achieve

remainder

interface

and their

views

as the

application

languages.

these

objectives

article.

Although

are

addressed other

user

in

detail

interface

development systems have achieved several of these objectives, our goal has been to achieve all of them simultaneously, not to excel in one area only. We believe the exploitation of concurrency, an unrestricted application architecture, and a multilingual design are all aspects that set Chiron apart from existing user interface development systems. ACM Transactions

on Computer-Human

Interaction,

Vol 2, No. 2, June 1995

Chiron-1

.

109

Fig. 1. Flight simulator instrument panel. Each of the windows is associated with a separate artist. The application manages a simple set of flight laws and continually updates the six degrees of freedom of the simulated aircraft. Artists giving various presentations of the vehicle’s state are attached to the objects that define the six degrees of freedom of the simulated vehicle.

1,4 Example Figure There

Client

1 shows

a simple

are several

— Coordinated

flight

points

simulator

of interest

multiple

views.

instrument

in this

The

panel

built

with

Chiron.

example:

display

shows

how

multiple

artists

can

be attached to the same object to provide alternate views. For example, the Airspeed artist and the Speed Indicator artist are both bound to the speed of the aircraft simulator, the display of one using an analog gauge and the other pitch

a digital readout. The Artificial Horizon artist is bound and the roll objects of the aircraft simulator, presenting

of their present.

information.

— Concurrency. by

the

There

and

recomputes

while

the

artists

is a symmetry

application

continually vector

Separate

user

the

for the pitch between

user.

the degree

The

application

laws

and

the

flight

can

concurrently

and roll

objects

of control is

updates

active, the

manipulate

to both the a synthesis are also exercised in

that

aircraft’s

the

controls.

it

state The

application and the user interface through an event-based mechanism.

execute concurrently, With conventional

technologies,

at

time

dormant and the application tions.

a user interface listen/dispatch routine is in control or (2) is active and the system does not respond to user interac-

— Multiple and-feel different loaded

any

look-and-feels.

given

point

The same

by simply communicating implementation of the with

the client

in

either

application

could

(1)

the

have

coordinating user interface application

a different

is

look-

with a Chiron server that uses a ADH. There are no graphics libraries

process.

— Extensible graphics hzerarchy. If we found that we were duplicating graphics (i.e., a dial readout) for a particular domain, we could extend the ADH to include a new class. This would improve efficiency by eliminating ACM Transactions on Computer-Human

Interaction,

Vol. 2, No. 2, June 1995.

110

.

Taylor et al

R. N.

calls to the server, simplifying ics within the same domain. — Reconfigurable state

views.

of the aircraft.

can be invoked recompiling, Certain that

on the

aspects

of the

change

can be added

same

the

consistency

set of active

or omitted,

or on different

for graphviews

of the

and multiple

displays,

artists

without

recoding,

the application.

client

configuration

interpreted

1.5 Organization

of the Article

The

sections

remaining

and ensuring

We can easily Artists

or reloading

is dynamically

artists,

at run

of this

are

specified

in

an external

article

are

organized

as follows,

We

consider some relationships between Chiron and other relevant work user interface area in Section 2. We then give a detailed description Chiron architecture ment with Chiron, experience

Several

in supporting

key systems

called

structures system.

annotation

influenced

Chiron-O

were taken, was model-view-controller debugging

multilingual

clients.

and is followed and conclusion

Section

6 discusses

the perfor-

by some example uses of the section closes the article.

system

in

TO OTHER WORK

1’s predecessor,

for data

first in the of the

in Section 3. Section 4 describes user interface developand Section 5 describes our limited, but promising,

mance of the system Section 7. A summary 2. COMPARISON

file

time.

influenced (MVC) were Loops that

the design

[Young

from

[Stefik

by Myers

[1983]

of Chiron-1.

which

by Smalltalk’s [Goldberg paradigm and its separations

introduced

binds

and evolution

et al. 1988],

several

of artists

ideas

and Robson 1983] of concerns. Artists

in the Incense

et al, 1986] uses a special

the equivalent

Chironkey

form

to objects.

symbolic

of inheritance This

annota-

tion concept inspired Chiron’s wrapper technology. Finally, Anson’s [1982] device model provided some key insights in developing concurrent interfaces. Other influential systems are discussed elsewhere in this article, Ongoing research projects in the user interface area offer approaches that contrast in various ways with that of Chiron. Rather than comparing all systems on the basis of the same criteria (which is desirable, but would consume far too much space), we instead comment only on the most-relevant features of some of these other systems. A general architectural comparison can be made with two well-known systems, Interviews and Garnet. InterViews [Linton et al. 1989] uses C ++ and is tightly coupled to that language. Application and user interface code are closely tied together, and a user interface listener/dispatcher is in control of the single control thread. The application is dormant until InterViews invokes application code. Application code takes the form of virtual functions in user-defined subclasses of the InterViews class hierarchy, This is in contrast with Chiron’s focus on clear separation of the user interface from the application, as well as Chiron’s concurrent control model. Garnet [Myers et al. 1990] is a user interface development environment for Common

Lisp.

ACM Transactions

Garnet

makes

on Computer-Human

use

of a combined

Interaction,

constraint

Vol 2, No 2, June 1995

manager

and

Chiron-1 object

manager.

listener

For

is given

by the user tecturally

interface this

layer

exhibited

presentation

(and

are

built

in of their

interface

Chiron,

in its Ada

display. purpose,

concept

system

to the

[Dewan

a groupware

to Chiron’s

Picasso

and

exit,

and

user

interface

Chiron

new

the

some

[SEI

et

any toolkit on

data

places

does not demand storage

its

control

tion-link-view links

are

related common,

project

1991], objects.

built,

since

they

of the

object

use inheritance

for

to

applications from the events from multiple

In and

on scope

devised

objective.

to Picasso.

Picasso’s

in

purpose

to

strongly

typed,

trigger

model

database dispatching that

in

in

similar

relational

entry

to support (discussed

multiple,

to Chiron’s

et al. 1994]

the

mechanism,

maybe

displayed

to the user interface

focuses

structuring are

Chiron’s

and

system,

akin

In

terms

to Chiron’s

uses

architecture.

the application

object-oriented Set UIMS

must

processes.

The

data

ACM Transactions

its

views

are

its

two

systems

technology write

have

whereas however,

is

the application

Lisp.” [Rotella

et al. 1992]

UIMS via UNIX pipes. The UIMS

however, restricting application to situations sui%ce to capture the object to be displayed.

inter-

and

A key difference,

developer

user

ADTs;

the

constraint

and

application

mechanism,

of capabilities,

Rendezvous

Construction

on the use of the abstrac-

of applications

dispatching

event-based

“an extended

T Display

interaction,

simpler

is

uses

relinquish,

is similar

in Suite.

language

in contrast

Chiron

that

to be displayed.

for

artists.

been

is much

on the set of types

[Hill

though

user

LoCAL it

of Suite

destroyed

have

mechanism)

is similar

architecture

a programming-language

and

Chiron’s

but

abstractions

uses a simpler

The AT&

of

of the

[McKay

exploited

for

uses

modes

the application

to use Rendezvous

in Rendezvous,

1991] created

though

no restriction

to Chiron’s

Chiron that

This

fully

metaphor

uses a client-server

paradigm

Rendezvous’

in

are

architecture

development,

of the objects

faces.

much

many

specifications

is more

al.

constraint

types.

that

The Rendezvous

similar

artists

a distributed

are

idioms.

similarities,

1989]

restricted

but

main

objects

programming

(based

but Chiron

archiways

application

cannot

implements

parameter-passing

has avoided

Serpent

achieve

Manager

implementation,

Chiron’s dispatching mechanism, concurrent mechanisms. with

Although

from

package

The distributed

[Rowe

interface

5) has

triggering

invoked

1991]).

Interface

Chiron

the

orientation,

toolkit

User

Section

way

1990]

Suite, however, editing is graphics are not supported. The

[Myers

to

inheritance

from

service.

client–server

metaphor.

interactions.

a Garnet

until

we are investigating

Chiron

Lisp

events,

dormant

however.

The Suite supports

Gilt

through

much

they

into

Windows/Common

types

this

to user

to Chiron,

mechanisms

in Garnet

to user

code is again

in response

is similar

obtain

to respond

in contrast

constraint

In the Dynamic This

application and application

is again

incorporating benefits

the

control,

111



messages where

on Computer-Human

separates

can thus receive data are not richly typed,

simple

Interaction,

database

records

Vol. 2, No. 2, June 1995.

112

R

.

NASA’s

N

TAE

Taylor

et al.

Plus

system

[Szczur

1992]

is focused

tion of applications Plus insulates the

with GUIS easier than application from changes

many

systems,

commercial

template The

into

UIMS

The set

thus

(i.e.,

programs

specification.

ment

separation

and

of

CHIRON

Section order

determines

user

the

allow

the

and

design

with

of

This

application. 1992]

provides

development

separation,

between

similar

enables

a

docu-

by a formal

of concerns

simultaneous

code

be inserted.

to be determined

application, for

application

et al.

software

a separation

and support

the genera-

must

of the

[Graham

specifications) issues.

an code

architecture

presentation

maintains

interface

generate

application

system

presentation

of documents

which

of the

presentation

Proteus

structure

views 3.

that

however,

remainder

document

services

ments

the

strongly

Proteus

of

style

which

on making

by using toolkits directly. TAE in the toolkit. TAE Plus is like

to

coordinated,

docuChiron’s multiple

editing.

ARCHITECTURE

1 has provided to familiarize

a very

brief

the reader

with

goals. In this section possible configuration

description the basic

we elaborate of the client

of the

Chiron

mechanisms

architecture

in

used to achieve

our

on that description. Figure 2 shows one and server components. Before discussing

the client and server architectures in detail, we attempt to familiarize the reader with the overall architecture by tracing the event flow of the system. Any object whose state is to be depicted by an artist must be defined as an instance

of an

abstract

data

type

( AD!i”).

This

means

that

any

creation,

query, change, or destruction interface.z A listening agent,

of an object must occur via a call to the ADT’s called a wrapper, is attached to each ADT that

exports

to that

calls

an interface

indirectly

wrapper

identical

through

reifies

ADT

of the ADT.

the wrapper, operations

but

into

The application

otherwise

events

that

remains are

makes

ADT

unchanged.

forwarded

to

The a dis-

patcher. The dispatcher then forwards the event to any artists interested the specific event. An artist is an active drawing agent for an ADT. It encapsulates presentation of the ADT. transmitted

in the

and dialogue decisions for a particular graphical representation Ensuing calls by the artists to create/update depictions are over an interprocess communication link to a Chiron server.

When an artist is notified of an ADT operation, it may instruct the server to update its depiction to reflect the state change within the ADT. The server implements the inheritance hierarchy of abstract depiction classes (ADH). Calls from artists create and manipulate instances of these of each artist’s user classes; the server thus maintains an “abstract depiction” interface. The server also oversees rendering of the abstract depiction to a concrete depiction, using a window system and toolkit. The instruction / event (I/ E) interpreter mediates the flow of ADH instructions from clients and window When

events from the underlying graphical substrates. the user generates a windowing event—for example,

tion—it

is detected

2A relaxation

by the

of this assumptions

ACM TransactIons

server,

converted

to a Chiron

M dmcussed m Section 3.1.5.

on Computer-Human

InteractIon,

Vol 2, No 2, June 1995,

a menu

event,

and

selecpoten-

Chiron-1

113

.

Chiron Server Chiron Client

i

Chiron Client

-_---l I Abstract

Oepiction

ww~,,

=i=l(@

Am

Toolkitl

I

Toolkit2



\

Xt

Xll I

4 , -------------------Concrete Depiction

I !----

..-----

.

..-.

--.

I

.---—----

Fig. 2.

tially

sent back

“---T---

Chiron- 1 conceptual

to the client

where

it will

architecture.

be routed

to the artist

that

created

the object of the event, in this case, the menu. The artist might handle the event by changing the state of an object within the application. This would be done, as in the application, through a call to an ADT’s wrapper; thus, any artist concerned with this state application objects are modified exactly the same manner. The

remainder

run-time in

detail

of this

components in

order

specific

objectives

Chiron

client

3.1

change will by the user

section

of both to elucidate

how

of the project.

and the tools

elaborates

the client

on this

and server the

Section

available

be notified. Note therefore that and the application program in architecture.

architecture

architecture

satisfies

4 describes

the process

to aid in that

The

key

are discussed some

of the

of creating

a

activity.

Client Architecture

This

section

time

architecture

describes

the

of a Chiron

architectural

components

client.

architecture

This

that

make

is illustrated

up the

run-

in Figure

3. 3.1.1

Chiron

Applications.

The

application

the client is providing a user interface. through a wrapper that has an interface also include the client changed. An application

initializer executes

is the

body

of code for which

Calls to ADTs are made indirectly identical to that of the ADT. It must

package, but otherwise, it remains unin its own thread of control. It is not

ACM TransactIons on Computer-Human

Interaction,

Vol 2, No 2, June 1995

114

R. N. Taylor

.

r

et al

Legend —

= calls

_

= reads

m

-

O

= task (agent)

package/procedure

~ ~

-rile

I

-

rephcated

per ADT

I

I

Client Initializer

Client Con fig

L

File (CCF)

Application

1

T Wrapper

Access

Cl,

Controller

Spilt

Fig. 3.

segregated interface, 3.1.2

into

a collection

Chiron

Client

run-time

of callback

nor does it directly The

ent-Server

control

Dispatching

architecture.

routines

that

the execution

Architecture.

are driven

of the user

Chiron’s

by the

interface

user code.

dispatchingme&a-

nism enables the separation of user interface and application. This mechanism is implemented primarily by two components: the wrapper and the dispatcher. The wrapper plays the role of listener and notifier of ADT events. It listens for A.DT calls the

form

the ADT

and relays

of a client so that

event.

information The

about

wrapper

the tool and artists

them

exports

can make

client

dispatcher

in

an unobtrusive

to the

interface

to

calls

into

it just

as they

would

directly to the ADT. There is one wrapper generated for each depicted ADT. The client dispatcher routes client events from wrappers to the appropriate artists. Artists register directly with a dispatcher for notification of specific events, and a dispatcher only passes events to artists that have registered for that event. Dynamic registration and deregistration are supported. There may be a single centralized dispatcher or dedicated dispatchers per ADT. This mechanism is conceptually similar to broadcast message systems such as Field [Reiss 1990] and SoftBench [Cagan 1990], although the actual mechanisms employed are quite different. The differences will become apparent in the following discussion. ACM TransactIons

on Computer-Human

InteractIon,

Vol. 2, No. 2, June 1995,

.

115

Flight

Simulator

Chiron-1

Elevator Conuol

Wrapper




Fuel Ir@cator

“spa’cbr

It

is also

~]

this

Multiple

simultaneously ADT

using

notified

~ Wrapper

.4rust

Fig. 4.

objects.

F

the

Flight

mechanism

simulator

that

supports

artists

may register

to reflect

the current

wrapper,

of the client

event.

all

architecture.

coordinated,

multiple

for the same ADT state

other

Figure

dispatching

of the ADT.

listening

4 shows

artists

events,

If an artist will

views

allowing modifies

automatically

the dispatching

architecture

of

them an be of the

flight simulator application depicted in Figure 1. The top four artists are pilot control artists and correspond to the leftmost artists in the flight simulator depiction. Note that these artists modify the state of ADTs in response to interactions with the user. This is done through calls to the corresponding ADT

wrapper.

that

several

separate

This artists

artists,

for

architecture may

uses one dedicated

be registered

example,

monitor

for events the

various

dispatcher with

the

state

per ADT. same

aspects

Note

ADT.

Four

of the

Alti-

tude Module ADT. The Artificial Horizon Artist registers for events on both the pitch and the roll of the simulated aircraft. Because multiple artists may be invoking operations on the ADT in addition to the application, it is necessary to employ a means of access control on ACM Transactions

on Computer-Human

Interaction,

Vol. 2, No. 2, June 1995

116

R. N. Taylor

0

1

et

al.

I

A

I

n Legerxl

Fig. 5.



. Ca!s

D

. pmcedurefl.nctmn

O

. task (Went)

Chiron

1.4 dispatching

architecture

the ADT. Also, when an artist updates its depiction in response to a change to ADT state, it will sometimes need to query the ADT state if the information encoded in the client event is not sufficient to enable the artist to update the depiction. For this reason, it is necessary that any ADT write (or state-modifying) operation be blocked until all artists have completed updating their depictions ADT

in response locking

controller

to a previous

is handled

is used

by the

by the wrapper

state

change.

access

controller

to ensure

component.

concurrent-read,

The

access

exclusive-write

access to an ADT. The wrapper must obtain a lock from the access controller before accessing the ADT. In addition, when a write operation is performed all

additional

write

operations

are blocked

until

each

interested

artist

has

completed updating its depiction. Update completion is detected and signaled by the dispatcher. There is one access controller generated for each depicted ADT. The default architecture provides one centralized client dispatcher per client. However, it is possible to generate dedicated dispatchers for ADTs. The

client

dispatcher

then

serves

as a router

that

directs

ADT-based

events

and registration requests to the appropriate ADT dispatcher for processing. An illustration of the resulting run-time dispatching architecture is given m Figure 5. This ensures a consistent dispatching interface for wrappers (for notification) and artists (for registration), allowing the dispatching architecture to be modified without requiring any changes to wrappers or artists. The client dispatcher and dedicated ADT dispatchers share the same interface, so it is possible to optimize a client by circumventing the client dispatcher completely (as seen in Figure 4). This requires a trivial hand-editing of the wrapper and artist code that can be done once an optimal dispatching architecture is determined. Informal experience indicates that ADTs that ACM TransactIons

on Computer-Human

InteractIon,

Vol. 2, No. 2, June 1995

Chiron-1 have

a high

ADTs

with

client

event

bandwidth

a low event

dispatcher

dedicated

should

bandwidth,

rather

than

be given

it may to

incur

a dedicated

be optimal the

dispatcher.

to use the

extra

117

.

tasking

For

centralized

overhead

of

a

dispatcher.

3.1.3 Artists. Artists encapsulate the dialogue and presentation aspects of the user interface. An artist may depict the state of zero or more ADTs, or it may be purely interactive and not bound to any ADT. An artist has three main responsibilities: ADT (client) events, model-based viriya

user

to create an initial graphical and to respond to user-generated

interfaces

et al. 1993],

such

as ITS

and HUMANOID

[Wiecha

[ Szekely

emphasis

architecture. An artist

of the project

is defined

as a task

to be dynamically

invoked

their

of control,

own

threads

and

executing

analysis

[Young

et al. 1989],

and checks

in parallel

to Chiron.

(exhaustively)

characteristic instances

It also means

the application. Since concurrency typically for creating buggy programs, we applied CATS

use diathe

multiple

Chiron

with

performs

for deadlocks.

of the

of an artist

that

artists

each other

presents many a concurrency

CATS

[Suka-

approach in defining the This choice simply reflects

allowing

terminated.

UIDE

artists

and is not an inherent type,

to respond to events. Unlike

et al. 1990],

et al. 1993],

a programmatic, as opposed to a declarative, logue and presentation of the user interface. research

depiction, (server)

new opportunities analysis system,

a type

of reachability

The analysis

conditions and a deadlock, which we subsequently fixed. An example of an artist specification for the throttle Figure 1) is given in Figure 6. The interface to all artists

have

and with

found

two race

artist (depicted in consists of four task

entries: one to start up the artist, one to shut down the artist, one to accept notification of client events, and another to accept notification of server events. along

For with

each

artist

a template

within

a client,

for

artist

the

details are provided in Section Artists create and manipulate the

server’s

handling

ADH.

routines

of an event.

The

the registration

3.1.4 Server detected within entering a value and translates entirely within higher level of may also be at

Artists that

4. their

respond of client

and invoked

events

specification

by the

graphical

to client

are automatically

definitions

an artist body

Chiron

depictions server

set. Further

by making

events

when

and server

is generated

tool

the

calls

to

by registering

artist

events

is notified

differ,

as does

mechanism. Events.

Server

events

are

user-generated

events

that

are

the server. Examples are a button press, a menu selection, or in a text field. More precisely, the server listens for X events them into Chiron server events. Some X events are handled the server. Some are aggregated into a server event at a abstraction than the original X event. The object of an event a higher level of abstraction. For example, composite objects

may receive select, move, and menu events. The declaration of a Chiron server event is given in Figure 7. The Chiron server event type contains information about a server event that an artist might need in order to update its depiction or to determine how the ADT state should be changed. ACM Transactions

on Computer-Human

Interaction,

Vol. 2, No. 2, June 1995.

118

.

R, N. Taylor et al. with Cllent-Events; use Cllent_Events, with Chiron5tandardlibrary; with System; use System, package Throttle.Artist package

is

CSL renames ChironJ3tandard.J-lbrary;

task type ThrottleArtist entry Staf~Artlst

is ( : CSL.Artlst_l address; CSL Str),

SelfAptr DisplayName entry

entry

D-Type,

Notify _ClientJ3ent Client-Event HandlerRoutlne

(

Notify-ServerJ3ent Object Server_Event HandierRoutme

( : CSL.Object-Type, CSL. Chiron-Event-Ptr; ~ address);

Client&ents address);

Client_Event_Ptr;

entry TermlnateArtist, end ThrottleArtist; type ThrottleArtist-Ptr

is access ThrottleArtist;

end ThrottleArtlst;

Fig 6. Throttle artist specification. All artists contain four entry points: one to start up the artist, one to terminate the artist, one for receiwng notification of client events, and the other for receiving notification of server events.

type Chiron-Event-Kind

ty&coC~lronXvent_Ty

IS (Menu-Event, SelectIvent, Adjust_Event, Key-Event, Move_Event, Resize.Event), pe(Kind

Chrron-Event_Kind)

is

Mouse-X. Integer; Mouse-Y: integer, Time integer, Num_Val : integer; Text_Val : Str;

Fig 7. Chiron server event definition. The Chu-on server produces six different event kinds: Menu. Select, Adjust, Key, Move. and Resize event. Each event kind has a different set of associated data.

case Kind IS when Menu _Event => null, when SelectJS.ent => null, when Adjust_Event => null, when Key-Event => Key-Code character; when Move.Event / Reslze_Event Dest-X : integer; Dest.-Y integer; end case; end record; type ChironIvent-Ptr

ACM Transactions

on Computer-Human

Interaction,

=>

is access Chlron..Event_Ty

Vol 2, No 2, June 1995

pe;

Chiron-1 package Throttie-blodule

is

Maximum.Throttle Minimum.Throttie procedure procedure

119

.

: constant : constant

:= 1.000000; := 0.063000;

Adjust-Throttle (Delta_Value: in FLOAT); Set-Throttle (New-Value: in FLOAT);

function

Get.Throttle

return

FLOAT;

end Throttle-Module;

Fig. 8.

Within

the

artist,

client,

namely,

Artists

register

behaviors server

events.

for

server

event

will

and

3.1.5

with

Client

definition, ated

from

in

event,

A client

for each

An

simulator

example,

the

event name.

The client

event

corresponds event

The

event

For

to the event,

specific

the

of the then

the server

objects

override

dynamically

by

kind

assumption

to specify

for

that

to

client

events

are

Each The

is a read

must

field client

or write

be hand-specified

accurately

can be captured

by

but not

static

by opera-

The ADT

simply

and

concurrent-read,

for any shortcomings,

applications

name

is appended.

operation.

determine

of

for each

ADT

operation.

to ensure

information

definition

number

an operation

difficult

to compensate some

event

is gener-

is defined

of the

for each ADT

value

This

a partial

kind

a unique

whether

all necessary

Also,

server

definition

can in some cases be too constraining.

be modified

is undesirable.

onto

event

is used by the wrapper is

the

event

is a concatenation

or return

as it

that

client

operations,

access to the ADT. builder,

is mapped

a list of fields

This

unlike

client

on all depicted ADTs within a client. For throttle module (Figure 8) of the flight

9. One

overloaded

is defined

on the ADT

can usually this

The

type defines

exclusive-write

When object

is passed

behaviors

definition,

initial

definition

in Figure

on the ADT.

by the client analysis. tions

the ADT

type

to a parameter

mode

operation

for

may change

event

client.

the set of all operations given the ADT for the

operation.

the

in response

event. define

to particular

procedures. created

The artist

Behaviors

Artists

the

Artists

in response

that

object

appropriate

with

manner.

of objects,

of the event.

as parameters.

Events.

operation

following

artist

to the

associated

as event-handling

if the

example,

ADT

the

for the

of objects.

events

object

the mapper.

differs

client

server

the

or classes

the artist

object

for classes

reregistering

events

a behavior

notify

the

routes

are defined

a server

ADT specification.

created

objects,

has registered

behaviors

that

Behaviors

receives

the mapper

mapper

artist

for specific

mapper event

the

the

Throttle_Module

interface sometimes

written

in

an

object-oriented style. Therefore, it is possible for client designers to define their own non-ADT events. This is done by simply editing the generated client event definition. For example, an application without well-defined ADTs

could

be “seeded”

with

hand-specified

ACM Transactions

events.

on Computer-Human

This

is similar

Interaction,

to what

is

Vol. 2, No. 2, June 1995.

120

.

R. N. Taylor

et al,

with Throttle_Module;

use Throttle-lvlodule,

package Cllent_Events

IS

type Cl!ent-Event_Klnd IS ( ThrottleJvloduleAdjust_Throttle, ThrottleJfodule-Set.Throttle, Throttle-Module.Get_Throttle,

Null_Event ); ~w$llent-Event_

Type

(EventKind

: Cllent-Event-Kind

=

Null-Event)

IS

case Event-Kind IS when Throttle_ModuleAdj ust-Throttle => Throttle_ModuleAdjust_ThrottleDelta_Value FLOAT, when Throttle_ModuleSet_Th rottle => Throttle-Module5 et_ThrottleNew-Value, FLOAT; when ThrottleJvlodule-Get-Th rottle => Throttle_Module-Get_ThrottleResult: FLOAT;

Null_Event )

type ClientIvent-Ptr IS access Client-Event_Type, Client-Event-Mode : constant array (CllentXvent_Klnd) ThrottleModuleAdjust-Throttle => Write, ThrottleJvlodule_Set-Throttle => Write, ThrottleJvlodule_Get.Throttle => Read,

Null_Event

procedure

=>

of Client-Event_Modes

= (

None

Free-Client-Event

(ClientXvent

in out Client_Event_Ptr),

end Client-Events;

Fig 9. Partial client event definition for flight simulator example A separate client event kind is defined for each ADT operation. These defimtions are generated automatically with the exception of setting the read/write mode for the various events.

done in the Zeus [Brown 1992] system for algorithm animation. Although it is still possible to support coordinated multiple views using this approach, as also demonstrated by Zeus, it is not possible to modify the application without explicitly generating tion between the application An artist handIes a client with the client dispatcher. routine for the event, When notifies all artists preregistered and a pointer to the handling ACM TransactIons

on Computer-Human

events for the user interface. Thus, the separaand the user interface has been compromised. event by first registering interest in the event Registration includes specifying the handling the dispatcher is notified of a client event, it for that event, passing them the client event, routine. The handling routine is then invoked Interaction,

Vol 2, No 2, June 1995

Chiron-1 within

the

reregister

artist,

passing

for client

events

it

the

client

dynamically

event.

Artists

by making

may

calls

121

.

register

and

to the dispatcher.

The client protocol manager (CPM) 3.1.6 Communication with the Server. handles communication to and from the Chiron server. This includes encoding/decoding messages into/from a lower-level communication protocol. Chiron uses Q [Maybee et al. 1990], a multilingual interprocess communications system built on top of XDR/RPC for client–server from an artist are translated to lower-level calls encoded

to Q protocol

form

receives

events

the

mapper

where

from they

and

shipped

server,

to the Chiron

decodes

can be directed

communication. ADH calls to the CPM, where they are

them,

server.

and

to the appropriate

up the CPM task and invoking There is one client initializer

Chiron (artists). stances

supports

the

dynamic

The artist manager of precompiled artists

used by the client initializer by an artist to invoke other

CPM

them

client initializer This consists

artist instances on specified generated per client.

reconfiguration

also

to the

artist.

3.1.7 Initialization and Dynamic Reconfiguration. The responsible for bringing up the initial client configuration. starting displays.

The

forwards

of the

is of

machine

set of active

views

provides an interface through which new incan be invoked and shut down at run time. It is for dynamic artists. There

configuration is one artist

and may also be used manager generated per

client. The ture

client of the

generate

configuration client

and

code according

file

(CCF)

is used

by

which machine displays. The client initialization, allowing configurations

The

client

to the specified

run-time configuration is specified should be invoked at startup, how

3.2

is used to specify the

the intended

component

architecture.

Additionally,

in this file and includes many instances of those initializer will to be modified

architec-

generators,

which

the initial

which artists,

artists and on

read the CCF at client without recompilation.

Server Architecture server

boundaries.

provides Across

architectural process

flexibility

boundaries

across

the server

process

provides

and

flexibility

machine in terms

of application, and possibly client languages, windowing systems, and domain-specific software reuse. Across machine boundaries the server provides flexibility in terms of distributing processor work load. Clients and servers may be connected in distinct configurations across wide-area networks. The server maintains a structured graphics model, or abstract depiction, of the graphical contents of each window managed by Chiron. This abstract depiction libraries,

simplifies and abstracts while adding insulation

the details of low-level user interface from changes in substrate technology.

Concurrency allows the server to receive, respond to events generated by the user. Figure manager

10 shows the architecture (SPM) handles interprocess ACM Transactions

schedule,

execute

instructions,

and

of the Chiron server. The server protocol communication. It receives and decodes

on Computer-Human

Interaction,

Vol. 2, No 2, June 1995

122

Taylor et al.

R. N.

.

Server Protocol Manager Event Handler I

w

Cllent-$erver

Spilt

Legend: —

. calls

~

- proced.dfonction

O

. tssk (agent)

“1

,,

X Server

Fig. 10.

Q messages client

from

processes.

instructions

client The

and

Chiron-1

processes,

scheduler

events

run-time

until

server architecture.

and

acts the

encodes

and

as a concurrent

interpreter

can

member

function.

event

server handler,

and

If the message sends

in response where

they

it to the

to user

is an event

SPM.

Events,

interactions,

are converted

are sent

to a form

queuing

them.

The

for a client,

3.2.1 The Abstract

Depiction

Hierarchy.

of

the

intersection

of XView

and

consistent interface to both toolkits. decision. No recompilation of artists of the user interface.

from

appropriate

The ADH

3 This is most evident in the naming remarkably similar to XYiew’s. ACM

TransactIons

on Computer-Human

Motif

inter-

it encodes

are generated the ADH

by the to the

for insertion

scheduler and are either processed in the server or sent back to The SPM, scheduler, and interpreter are all implemented in Ada, ADH and a small portion of the interpreter are implemented in C event-handling loop is inside an Ada task, making it possible to events and messages from clients concurrently.

purpose is to provide a simple and high-level of user interfaces. The hierarchy, historically

to both

manner. If the message calls the specified ADH

destined which

Q messages

buffer,

process

preter pulls messages from the scheduler in a FIFO is an instruction, it decodes the parameter list and the

sends

X

event

into

the

the client. while the ++. The X process X

is a set of classes whose

abstraction for the construction based on XView,3 is a superset class

hierarchies.

It

provides

a

The choice of look-and-feel is a run-time is necessary to change the look-and-feel

of the classes and organization

Interaction,

Vol

2, No 2, June

of the class tree, which looks

1995

Chiron-1

123

.

Object

1 Drawable

Color

Model Object

n-rt-rl

BImmp

Slhpse

GIF

Polygon

111 Cucle

Cursor

Polyhne

Rectangle

Font

Pmelltem

Menu

Scrollbar

Spbne

+-l Base

ADH

classes

it

attribute.

These

members objects

The

classes

in most

circles,

ADH

other

artists.

Adding

lation an

class.

function

may

member

function.

without

message

to the

object

type.

For

object’s

attributes

as data

the common drawing

graphical

objects

and bitmaps.

then

such

as

The ADH

is

mechanism

where

buttons

pairs;

it gets may

routed

a certain only

receive

is the copyright 4 The Graphics Interchange Format” Service Mark property of CompuServe Inc. ACM

Transactions

for

function

member

of an if

the

through

event

Chiron to the select

uses

the preprocessor Events

sends

appropriate based while

of CompuServe

Interaction,

that

be handled

handling.

events,

to

member

artist

server

set of events

on Computer-Human

existing

it can usually

property

the

in recompi-

the artist

the

to an

from

does not result

artist

a general

shifts

a new

of an

running

or an extension

for use by all

list

by simply

and

available

parameter is required,

subclasses

be used frequently,

thereby

becomes

does adding

to the

of receiving

class

to the hierarchy

Neither

via will

a depiction

functionality

event)

that

as a new

a recompilation

object,

client,

of functionality

the ADH

A change

is capable

example,

In many

a particular

used

supports

has an operation

new classes

hand-editing,

ADH

of data.

for

such as GIFs4

If a recompilation

(ADH

localization

two-dimensional

of maintaining

artists.

and recompiling. The ADH provides in

hierarchy.

commonly

The ADH

1 Text Field

Shder

X server

encapsulation

This

require

reported

most

plus

writer into

of preexisting

existing

for

the

lly

11.

class. The burden server.

the

and images

also provides

to the

depiction

Panel Text Wmdo.

POpup

Numeric Fmld

a mechanism

toolkits,

If the artist

artist

Message

abstract

classes.

be incorporated

existing

Ixt

to query store

splines,

in Figure

composition. it may

provide

is unnecessary

found

illustrated

cboxx

Chiron-l

of the individual

polygons,

Nouce

Square

Fig. 11.

The

Frame km

Cmvas

Button

instances

Window

,, -,1,

Texi

t--l

Compose

ServerImage

an

are event

artist.

Each

on its class all

objects

Inc. GIF ‘m is a

Vol. 2, No. 2, June

1995.

124

.

R.

N. Taylor et al.

subclasses from ADL–application may receive menu, select, key, adjust, and move events. Like most recent research and commercial user interface toolkits, the ADH suffers from the “least common denominator” intersection of the toolkits. For the most part, by the ADH the

are limited

hierarchy

event

to

handling.)

to-understand

to those

support

that

are found

two-dimensional

The trade-off

of this

and easier-to-use

in both

drawing

limitation

interface.

shown that a novice programmer interfaces based on this hierarchy

problem the objects

as applied to the that are supported

toolkits. objects

is that

Experience

(We extended and

we provide with

student

is able to construct fairly in a matter of a few weeks.

simplified an easierusers

has

sophisticated

We found that the logical extensibility of the ADH was limited by its historical dependence on XView; in some cases subclassing is difficult. Contrasted with systems such as Interviews [Linton et al. 1988], XView’s architecture was not designed with extensibility in mind. Object-oriented programming is characterized by inheritance and dynamic binding. XView, because it was implemented in C, uses static subclassing. Although XView embodies the first characterization in class hierarchies, it does not provide dynamic binding.

The

classes.

ADH

consists

Although

not provide

this

an ideal

of C ++

classes

provides

design

the

from

that

artist

which

encapsulate

writer

with

to subclass

each

of the XView

polymorphism,

and extend

it does

the hierarchy.

Several commercial toolkits, such as Galaxy [Barr et al. 1992] and Open Interface [Neuron Data 1991], that provide a similar kind of toolkit independence as Chiron’s ADH are now available. The API provided by both systems can support standard look-and-feels for Motif, XView, Windows, and Macintosh across multiple platforms. Both systems use the lowest rendering agent on each platform, giving them high look-and-feels on nonnative platforms both

systems

3.2.2 Server

use a standard Drawing

performance, (i.e., XView

single-threaded

Models.

In

more layout control, and on a PC). Unlike Chiron,

callback

addition

architecture.

to hiding

the

details

of the

implementation toolkits, the ADH provides a high level of abstraction, allowing Chiron’s drawing objects to be supported using several different graphical languages. While Chiron’s multilingual support has been predominantly focused on the client side (see the discussion in Section 5), some experimentation with graphical and image modeling languages within the server has been performed. Similar to how the ADH encapsulates details of the underlying toolkit, the drawing-model implementation of the Chiron server can also be As a means of demonstration, an example Chiron hidden from the client. client was built to run with several Chiron server prototypes. Each server prototype used either Phigs [Gaskins 1992], PostScript [ Warnock and Geschke 1992], or Xlib [0’Reilly 1992] calls as the drawing model. The example client allowed the user, through menu selection, to choose the color of a triangle drawn on a graphical canvas. This exercise demonstrated that through abstraction the choice of the imaging language, like the toolkit, is a decision that is delayed until run time, or may even be delayed until the execution of the graphical call (through the use of dynamic library loading). ACM

TransactIons

on Computer-Human

InteractIon,

Vol

2, No. 2, June

1995

Chiron-1

4. USER INTERFACE

DEVELOPMENT

UNDER CHIRON

In order

a Chiron

it is necessary

client

to construct

configuration,

to build

client,

an initial

client

.

to specify

architecture,

the

125

desired

and to define

each

artist. (These steps are described below; for more detail the reader is encouraged to see the Chiron user manual [Nies et al. 1993].) It is then necessary to translate each artist from LoCAL to native Ada. Finally, the client is compiled, linked, and executed. Although the focus of this

work

has been

application architectures, issues of user ignored. Realistically, a system architecture matter

how well

development collection tasks.

The client ture

be

of tools

4.1 Specifying ADTs

engineered,

can

and

will

must

read

which

they

simulator — ADT

appear

(CCF).

initialization

be no

in

mind, the

a

above

and which architec-

at

startup

and

be specified

information

in

client

to determine

is a list

contains

followed

portion

by any ADTs

configuration.

file

of the file names

Each

be generated

of the

CCF

for which

It

line

contains

con@-uraand how as which of a flight

information:

of all ADT

for that

specifica-

ADT.

each

want

an artist

by

is also

Each ADT specificaword “dispatcher.” If

describes

it will

of a

is used

artists as well

the following

will

dispatcher This

in the form

this

the run-time

present,

a dedicated

machine

components.

should be generated. be followed by the

descriptions.

on which

of a CCF for the configuration

12. A CCF

This

are needed a dispatching

configuration defines which should be invoked initially,

use. An example

list.

artists

appropriate

in order

in Figure

specification

— Run-time

this

in performing

tions from which client events tion file name can optionally

its name

and

cannot domain,

also choose

it must

The

to create

The run-time of these artists

should

what

is determined, File

is given

— Artist

interface

of user interface

With

to assist

determine

should

tools

client

tion of a client. many instances display

the process

automated.

He or she must

artists

generator

during

unless

partially

implemented

first

monitor.

Configuration

various

on user

a Client Configuration

displays. Once the configuration Client

is not viable

least

has been

developer

they

at

primarily

interface development in the user interface

artist,

to receive name

listing

events.

followed

by the

number ization,

of instances of that artist that should be invoked at client initialoptionally followed by which machine display should be used. If no

display

is specified,

4.2 Generating

unix:O

is the default.

an Initial Client Architecture

Several tools exist that generate the client run-time components Section 3.1. In addition, a single tool, called the client–builder, full client architecture based on the contents of a given CCF. This

tool

dispatcher.

generates A client

a client

event ACM

initializer,

definition

TransactIons

an

is generated on Computer-Human

artist that

manager, is based

Interaction,

Vol

described generates and

in a

a client

on the union 2, No 2, June

of 1995.

126

R. N. Taylor et al.

.

tailspec.a ailerors5pec.a attitude~pec.a thetaspec.a

dispatcher dispatcher dispatcher dispatcher

Tail-ModuleArtlst Aileron-ModuleArtist Horizon.ModuleArtlst

tails. pec.a aileronspec a attltudespec.a

Tail_ModuleArtlst Aileron-ModuleArtist Horizon_ModuleArt[st

1

Fig. 12.

all operations for each ADT,

the CCF. The client

client configuration

on ADTs in the ADT specification and a dedicated ADT dispatcher

in the CCF. An artist generated for each artist developer

a

unix.O unix.O unlx:O

1 1

Example

theta_spec

file.

list. A wrapper is generated is generated where indicated

specification and template for an artist that is specified in the artist descriptions must

hand-edit

the client

event

specify the correct access modes (read or write) for addition, the developer may want to add hand-coded

definition

body are section of in order

to

each ADT operation. client events.

In

4.3 Writing Artists Artist

writing

is the

Artist

writers

build

calls

to the ADH.

most and

This

labor-intensive

maintain

includes

task

depictions

defining

how

in

Chiron

client

programmatically an artist

will

building. by making

handle

client

and

server events. We first discuss the necessary elements to hand-coding an artist and then turn to some work that has been done to simplify and automate this task. Chiron provides an artist template as a starting point for artist development. A template includes an abstraction of an artist’s architecture along with directives An example

to aid the artist programmer in defining the artist. of an artist template for the Throttle artist depicted

1 is given in Figure 13 The major indicated by the comment directives. — declare — define

and create handling

— register handling — start processing

the initial

routines routines

tasks required They are to

graphical

for client

and server

for specific

on the artist’s

objects

client

in defining

that

make

Transactions

on Computer-Human

in Figure artist

are

up the artist,

events, and server

events,

and

base frame,

Artists are written in a language called LoCAL, which Section 5. It is a minor extension to Ada that enables the ACM

the

InteractIon,

Vol

2, No

2, June

1995

is described artist writer

in to

Chiron-1 with with

Wrapper.Throttle-M ClientDispatcher;

package

.

127

odule;

body Throttle-ModuleArtist

is

task body Throttle-ModuleArtist

is

: Throttle-ModuleArtist-Ptr; : CSL.ArtistJD-Type; : CSL.Str:

Self-Ptr LocalArtistJD LocalDisplay

--> --> >> --

end StartArtist; -–

here. >>

loop select accept or accept

or

Notify-ClientJEvent Client-Event Handler-Routine

(

Notify Server-Event Object Server_Event Handler-Routine

( : CSL.Object-Type; : CSL.Chiron-Event-Ptr; : address);

: Client_Events.Clientlvent-Ptr; : address);

accept TerminateArtist; end select: end loop; end Throttle-M oduleArtist; end Throttle-ModuleArtist;

Fig. 13.

Template

generated

ACM Transactions

for Throttle-Module_Artist

on Computer-Human

Interaction,

body.

Vol. 2, No. 2, June 1995

128

R. N. Taylor

.

et al.

declare, create, and manipulate (in an object-oriented manner) instances of the graphical objects within the server’s ADH. LoCAL programs are translated by a preprocessor into valid Ada. The fully defined artist is listed in the Appendix. To familiarize the reader with the internals of an artist, we briefly describe the implementation Throttle artist. The line numbers indicated in the following paragraphs

of the refer

to the code in the Appendix. Any graphical declared. Lines frame,

panel,

object 30–32 and

that an artist will create and manipulate must first be provide the LoCAL declarations for the artist’s base

slider,

which

comprise

all

the Throttle artist. Lines 90– 121 show the instances of these initial graphical objects. This artist defines only one handling user adjusts the slider). The definition Server

event

handlers

have

two

of the

graphical

LoCAL

apply

the

description. position,

change the state of the Throttle ADT. A client event handler has only one argument, If the application modified

had an autopilot

programmatically,

we

mode would

within create

routine for a server event (when the of this handler is given in lines 47–60.

parameters:

case, the slider) and the server event tion to obtain the new desired Throttle

objects

calls that

object

the client

in which have

whenever the Throttle state was modified. obtain the new Throttle position, and reposition the slider accordingly.

of the

event

(in this

We use the event descripand use that information to event

the Throttle

defined

an

description.

state

event

would

handler

be for

The client event could be used to an ADH call would be made to

Registering for client events consists of making a call to the client dispatcher, providing the client event for which we are registering and the address of a handling routine for that event. This artist does not handle any client events, but if it did, registration calls would for server events, the user defines the behaviors tines)

for

graphical

each possible server no handling routine

objects.

A behavior

occur at line 77. To register (pointers to handling rou-

associates

a handling

event that can occur on an object is provided, the event is ignored.

define a behavior for all instance would override

objects of class ADL–slider this behavior) and then

routine

with

or a class of objects. If On lines 127– 130 we

(a behavior register this

for a slider behavior by

making a LoCAL set–behavior call. Finally, we must activate the artist by invoking the start–processing method on the artist’s base frame. This call is found on line 135. This will cause the artist to appear and to begin listening for server events. 4.3.1 Front-End Builders. The burden of writing artist bodies can be substantially reduced through the use of a graphical interface builder. Many of these are on the market and perform roughly the same services. Rather than adding another interface builder to the market, we examined how we could leverage the investment in existing tools. We discovered that the internal form generated by Sun Microsystems Developer’s GUIDE 5 tool

5 OpenWmdows ACM TransactIons

Developer’s

Graphical

on Computer-Human

User Interface InteractIon,

Development

Environment.

Vol 2, No 2, June 1995

Chiron-1 (GIL) [SunSoft developed two

.

129

19911 was suitable for translation to LoCAL. Accordingly, we tools, gi1210cal and gab (guide artist builder), which enable

the use of GUIDE

in creating

gi1210cal translates

Chiron

the output

artists.

of GUIDE

to LoCAL,

and gab allows

users

to

update an artist template by inserting the gi1210cal-generated LoCAL calls into the appropriate places in the artist template. The artist writer thus has a very substantial basis for creating an artist quickly, using the set of tools provided with Chiron. An interesting side effect of gi1210cal and gab is that, although GUIDE was created to support development of applications that employ the look-and-feel, it can now be used to create applications exhibiting look-and-feel since LoCAL is independent of that choice. Although

this

prototype

approach

can

a user interface,

an ideal

approach.

drawing

objects

GUIDE and corresponding

Manual (such

significantly

it suffers

reduce

several

effort

is still

as circles

or

drawbacks required

the

time

that

make

to create

polylines)

that

are

required

to

it less than

and not

OpenLook the Motif

manipulate

supported

by

to set the dynamic behaviors of those objects. Because the graphical objects provided by the Motif toolkit differ in dimen-

sions from those provided by the X’View toolkit, the corresponding Motif layout generated by GUIDE is sometimes not aesthetically pleasing. Finally, the gab implementation expects an empty artist template. Any iterative development could

would

involve

be modified,

GUIDE’s 4.3.2

GIL

hand-pasting

however,

to allow

to C generator,

Artist

nongenerated

iterative

code.

development,

gab

tool

as supported

by

GXV.

Generators.

Chiron

has

been

developed

as part

project in software engineering environments called Arcadia. are such a pervasive data structure in software engineering the

Arcadia

project

The

developed

a persistent

graph

package

of a larger

Since graphs environments,

generator,

called

PGraphite [ Wileden et al. 1988]. With this tool, the user specifies the particular type of graph desired, and the tool generates an Ada package encapsulating the graph and providing creation/deletion routines, traversal routines, and persistence capabilities. specified should

in the

input

be displayed

the graph 4.3.3 ware

functions.

package

Reusable routine

in

is then Artist the

to the

what

PGraphite

all

of the

user

graphical

may

with other

also

attributes.

artist graph

specify

generator attributes

which

A complete

nodes

artist

for

generated.

Components.

environments for

extended

addition

to PGraphite, and with

engineering

generic

We have

Specifically,

layout

has

The pervasiveness also motivated the

of hierarchical

directed

of graphs in development

graphs

called

softof a

GLAD

(Generic LAyout for Directed-graphs), which may be used within artists for automatically laying out a graph and reducing edge crossings [Snider 1991]. This capability has been used in several Chiron applications, including computer-aided software engineering applications and graph-based analysis tools. We have also found that artist writers often need to maintain relationships between

program

objects ACM

and graphical Transactions

objects.

on Computer-Human

For example,

if a user

InteractIon,

Vol. 2, No. 2, June

selects 1995

130

R. N. Taylor et al.

.

a rectangle representing a node in a graph, the artist will want to locate the corresponding ADT node instance. For this, we provide a generic bidirectional association table that can be instantiated to associate any application object with any graphical object. Additional context data may also be stored with each relation.

5. SUPPORT Chiron’s

FOR MULTIPLE

client–server

mits different client guages. For Chiron-1, but assuming support other

PROGRAMMING

architecture,

employing

modules to be written only language support

the same languages

LANGUAGES event-based

integration,

per-

in different programming lantools for Ada were implemented,

client architecture, these tools in addition to mixed-language

could be changed to clients. To test this

claim, various client prototypes were built for use with the current implementations of the Chiron server. The requirements Chiron places on the client development language as well as our experiences with these prototypes are described in the balance of this section. Chiron’s components less,

exploitation of concurrency and event-based integration places few restrictions on the application architecture.

it requires

language

support

for object-oriented

concepts

of client Neverthe-

and

run-time

support for concurrency. These requirements may not map well into various implementation and development languages, and in some cases necessitate language extensions in order to preserve the Chiron design.

5.1 LoCAL Current software flexibility,

user

interface

engineering and

code

weaknesses. LoCAL is designed

languages concerns reuse.

are relatively such

LoCAL

to Ada

from

the

for large-scale

is designed

as an extension

ADH in an object-oriented manner face development constraints. First, same (or very similar) programming

weak

as support

that

to overcome allows

standpoint

of

programming, some

effective

of these use of the

while meeting two additional user interit is desired that artists be written in the language as Chiron clients. This is so

that developers can avoid the burden of learning a new or specialized user interface language, and it also eliminates the possibility of two different languages’ run-time systems conflicting within a single process. Ada is our language of choice for writing large-scale client applications, so an Ada-like language for writing artists is needed. Second, the artist language must be able to interface in a reasonable way to the ADH, since this library is used to define the components of the user interface that the artist implements. Because the ADH is an object-oriented class library that relies on inheritance and subclasses to achieve flexibility and reuse, and since Ada does not have the language features necessary to support inheritance, it was decided to implement LoCAL as an object-oriented extension to Ada.

6All with

client prototypes, although developed in various programming both the unmodified versions of the Motif and XView servers.

ACM

Transactions

on Computer-Human

InteractIon,

VOI 2, No, 2, June

languages,

1995

are compatible

Chiron-1 --call

a constructor

function

––call

a method

to create a new instance

function

that does not return a value

‘Apply ( class class-name; instance : object-type; method : methodname; []);

a method

that

returns a value

‘Apply ( class : class-name; instance : object-type; method : methodmame; []) return ;

--establish handler for each of the “ behawors” --(user manipulations of the visual representations procedure

Fig. 14.

The LoCAL operation Apply

creates

structor method

features

is introduced

‘Set_Behavior ( object ADH-object; behaviors : BehaviorArray-Type

LoCAL extensions

added

to Ada

in order

an instance

although interface

are summarized with

indicated

class,

of the

);

to the application

to interface

and the other form is for methods ior function establishes the artist’s

extension:

of the object)

language.

in Figure

the ADH. using

14. An Apply

The first

the

the

manipulations development LoCAL

of

con-

the designated return results,

that do not return results. The Set–Behavevent handlers that execute in response to

of the given ADH object. toolset includes two tools

preprocessor

form

designated

method. The second and third forms of Apply invoke of the specified object. One form is for methods that

specified user The Chiron

131

‘Apply ( class class-name; method : methodmame; []) return ObJeCt_type;

procedure

--call

method

.

(lcc)

and

the

that

implement

adl–compiler.

the adl–compiler and the lcc tool were written between Ada artist code and the Chiron ADH,

Note

this that,

to provide the they provide a

general capability for object-oriented interoperation between Ada and C ++. lcc translates LoCAL into standard Ada. It reads in a symbol table that specifies a mapping from a set of class names and member functions to integers. A LoCAL call to a member function of a given object is translated into a standard Ada integers that specify

procedure call. The parameters of the procedure call are the class of the object and the function to be invoked on

the object. A reference to the object instance and the parameters of the function are also passed as parameters to the Ada procedure call. The adl–compiler compiles C ++ class declarations into the symbol table files required by lCC. This allows the automation of bindings to the C++ code in the ADH. After a change to the C ++ interface, all that is required is to ACM Transactions

on Computer-Human

Interaction,

Vol

2, No. 2, June

1995

132

R. N. Taylor

.

et al.

run the adl–compiler to create a new symbol table translate LoCAL code to Ada using the new mappings. automated using a standard tool such as make.

5.2 Language Because

Prototype

Chiron

application

Examples

maintains

a strong

and the user interface

of the client

file, and to use ICC to This process is easily

separation

software,

can be coded in different

various

programming

of

concerns

between

architectural languages

run-time support for each language can safely coexist within For components written in languages that are not compatible,

the

components as long

as the

a single process. the event-based

client design lends itself well to distributing components across process boundaries, although in the current version there are no client support tools to automate this restructuring. In order for Chiron to support clients in other languages, bindings must be established between the ADH and the application language. For object-oriented application languages, this binding is straightforward; for languages like Ada that lack object-oriented features, the changes are more substantial, as described above. In order to demonstrate the generality of the client design, using

Fortran,

Lisp,

and C ++

are described

in the following

language prototypes

paragraphs:

Mixed Ada–Fortran Client. An interface for manipulating and visualizing the infrared signatures of the tail pipe of Northrop’s B-2 aircraft was constructed by extending preexisting Fortran code with a Chiron artist. This was accomplished by wrapping the internal data structures of the tool in such a way that data state changes are propagated as Chiron client events. In addition, the Chiron artist can change the data state and visualization in response to user actions. Although most of the support code for this application

was

hand-generated,

automatic

support

ping could be provided by Fortran-specific described in Section 3.1.

for

versions

code generation of the client

and

wrap-

support

tools

Lisp Client. Another way to exploit multilingualism in the Chiron design is through the client–server separation. Because the client and the server run in different processes and the mechanism for interprocess communication allows for multilingual messages [Maybee et al. 1990], client processes can be built in various languages. One such prototype was built using Common Lisp [Winston and Horn 19891. The focus of this particular Lisp client was to provide development support for specification of artists through interactive LoCAL calls to the ADH, This was done while still maintaining a strict separation of concerns from the underlying graphical substrates through the client–server split. Current functionality of the Chiron Lisp client includes the

mechanisms

for

registering

with

a Chiron

server

and

the

automatic

generation of CLOS7 primitives from the Chiron Standard Library’s symbol table file (see Section 5.1) that provide an interface to the Chiron server. A full suite of Chiron client tools supporting Lisp development was never

7 Common

Lisp object

ACM Transactions

System [Winston

on Computer-Human

and Horn InteractIon,

1989]. Vol. 2, No. 2, June 1995

Chiron-1

.

realized. In addition, the implementation of the Lisp client multiprocessing package external to the language for providing C + +

Client.

client–server oriented natural

Another

client

separation

design wrapping

was

and data of C ++

prototype

built

demonstrating

using

C ++.

abstraction through objects (where they

133

relied on a concurrency.

the benefits

C ++’s

support

for

of the object-

class mechanisms allows a play the role of Ada ADTs).

Unfortunately, this places the burden of inheritance tracing on the client support tools since C ++ objects are not required to include virtual function prototypes (signatures) in their description. Inherited interfaces from these functions to allow This

need to be exhaustively enumerated at the time of client generation for the appropriate client events to be sent to the interested artists.

problem,

client

development

built.

Similar

package 5.3

although

tools,

to the

external

Extended

not insurmountable, and

Lisp

a robust

client,

and

addressed

complete

concurrency

to the implementation

Language

was not was

collection

provided

allow

support

this

Modula-3’s guage

and

a suitable

various

modularization,

to

map

object-oriented

concurrency, client

to address

data

cleanly

into

programming

concurrent candidate

access

never

a threads

client

the weaknesses

architecture.

high-level

structures support. user

concurrency

client also

support make

Chiron’s

off of these

of current

and

Chiron

constructs,

to leverage

are Ada9X [Ada 9X 1992]. Ada9X’s new in conjunction with

abstraction,

the

to data

for future

implementations

cleanly

was

using

Support

for

language

C++

language.

Two good candidates for future Chiron client languages Mapping/Revision Team 1993] and Modula-3 [Harbison mechanisms for handling inheritance and polymorphism established

in the

design

properties

interface

this

for lan-

allows

easily

and

languages.

6. PERFORMANCE In order robustness trade-off

to in

address effectively the objectives of the presence of change, and reuse

between

performance respect,

and maintainability

is employed

the implementation

of Chiron

flexibility, artifacts,

a

in the overall

Chiron

design.

where overall

the overhead of each technology is carefully weighed against the system performance so that the goal of equivalent performance to ad

hoc systems

In this

architectural of software

is achieved.

To demonstrate

the

is a compromise

scope of the overall

system

and

to assess the performance costs the developer incurs by using the Chiron user interface technologies, several size and speed statistics are provided in the balance

of this

section.

6.1 Space Chiron is a robust collection of user interface support tools. In terms of lines of code, the union of all Chiron generator tools and run-time code consists of 65KSLOC (thousand-source-lines-of-code) of hand-written code (37K Ada and 29K

of C++).

32KSLOC

were

ACM Transactions

generated,

for

on Computer-Human

a total InteractIon,

of 98K.

The

flight

Vol. 2, No. 2, June 1995.

134

.

R. N. Taylor

et al.

Table I. Architecture X1l/Ada GXV/Ada GXV/C GXV/C +t Chiron

simulator which

client may

Execution-Time

Low

High

Average

0.35 0.37 0.33 0.42 0.62

1.20 1.27 0.86 0.90 1.85

0.60 0.60 0.59 0.64 0.98

illustrated

in Figure

be attributed

the

to

a

binary

run-time

source

of 1.7M

size

system).

The

code (including

S S s S S

(320K

of

uncommented

ADTs,

application,

Speed

6.2

Table

a comparison of times for the creation and display of hello world program. In addition to these objects for a simple the overhead to bring up an interface with about 20 graphical

I

provides

graphical numbers,

is negligible,

objects takes

taking

approximately

transferred server, sent the

event

and

possibly

was

(C

made

is relevant,

to the

over

all.

The in

to access

client One

the

however,

attributes, and

screen

refreshing

as much providing heavily

added

not

level

of polymorphism,

TransactIons

on Computer-Human

the

the

Chiron’s

ADH object

that

ADH

ADH

by

single

aspects

allows

and of its

system. may

In and

and

need

Also,

greater

the

this

degree

multiple

be

ADH,

of flexibility, language

inheritance, 1995

its

constantly

overhead

Chiron

this,

concerns

objects

implementation

Vol. 2, No. 2, June

layout

of overhead,

toolkits,

a large to

of changing to

toolkit

to This,

take

addition

as a result

For

the

of abstraction

call

instructions

call.

derivation, InteractIon,

level windowing

redrawing,

2–3

provided

class

using

instruction.

and

of abstraction

object-oriented

machines.

mechanism

a higher

consistency.

per

time were

a structured

the

of an object

into

as 10– 15 instructions a higher

through

and

the

approximately

objects

handler, The

Measurements

maintaining

a single

enact

graphical

small,

drawing

on the use

all

to

Chiron to which

event

on separate

of providing

where depiction

are

of

toolkits

situation

maintain

server

the

in

is associated.

averaged.

is to provide

concrete

is relatively

graphical

ADH

of the

to

event

LoCAL.

calls

constraints

head

cost

through

of graphical

the

efficient

reevaluated

The

of the

and

cost

substrate

maintenance

interaction of an

artist

artist

artist

performance

the

the

particular the

then

client

against

ADH

of the which

and

the

and

the

that

creates of

user

processing

scheduled and interpreted process), mapped to the

with

areas:

server

beyond

number

with

two

requirement

user

end-to-end the

to

events

charge

in

hierarchy

An

reflects

inside

ADT

1000

Spare-2s,

the the

executed

routed

concentrated

time

concrete depiction of a graphical object. The event traroute through the Chiron architecture: the Xl 1 event is

on Sun

6.2.1

3 seconds.

This

Ada) to Chiron, Client (process

to

to the

measured

about

15ms.

generated from the verses the following

ACM

1 has

Ada

number of lines of nongenerated is 1590. and artists)

is

Comparison

this

overbut

for

can

be

through relies

(C ++ ). and user-

Chiron-1 customizable

constructor

and

destructor

functions

in

C ++

all

performance costs, especially for complex objects embedded tion trees as seen in the graphical portions of the ADH. discussion

of performance

issues

using

object-oriented

to accessing into

pure

the ADH Ada

provides,

calls.

This

the

LoCAL

expansion

incur

large

language-depen-

the LoCAL

code is translated

degrades

135

in deep-derivaA more-general

and

dent techniques can be found in Reed [1992a; 1992b]. In order to maintain the advantages of flexibility that

.

approach

and expanded

performance

of the

system

because the translation of LoCAL into Ada results on average in three times more instructions to be executed. It is interesting to note that historically this is roughly the same rate of expansion as first seen when adding object-oriented

extensions

to the C language

6.2.2 Client mance

Architecture. from using

overhead

provides dinated

through

C ++.

In addition to the code expansion LoCAL and the ADH, Chiron’s client

support code for event-based dispatching to maintain views and the application-interface separation. For

and perforarchitecture

multiple cooreach ADT de-

scribed in the CCF, a wrapper is generated to provide concurrency and dispatching support. However, this introduction of an intermediate software layer results in a performance overhead for each ADT interface call of two procedure calls for concurrency control and two for event dispatching. Time for dispatching is essentially the time to do a round-trip Ada rendezvous, which for Al artists is IV + 2 task entry calls, where an Ada task entry call is approximately equal to a procedure call plus some small time S for task synchronization 6.2.3 chosen servers

that

is compiler

Client–Server

Split.

and operating The

system

interprocess

dependent.

communication

mechanism

to implement Chiron’s client–server split allows Chiron to communicate to each other across different networks,

clients and languages,

operating systems, and platforms. Although this allows architectural flexibility, this advantage comes at the price of performance. In addition to the expense of performing interprocess communication, messages sent between the client and server need to be encoded and decoded to allow for interoperability between heterogeneous platforms fine types (i.e., integer, boolean, etc.),

(two for encoding, records

possibly

overhead

for

This

overhead

data

type.

and In use

each

for

structure

avoid

the

decoding),

embedded

basically

To

to minimize

two with

in

heavy

but

for

structures), addition

represents

number

and languages. For simple, predethere is a four-instruction overhead

the

complex there

to

the

tagging

interprocess

is

composite also

encoding and

sent

across

of its

linearization

communication,

of messages

the

the split

types

(i.e.,

a four-instruction components. of a complex ADH

through

is designed abstraction

reuse. conclusion,

while

of a structured

dispatching trade-off However,

client between we

have

addressing

user

Chiron’s

interface

architecture, functional

object and

experienced

ACM

Transactions

an

and

on Computer-Human

objectives,

performance performance

Interaction,

the

a message-based

separation

potential

unacceptable

design (ADH),

a client–server

advantages

not

high-level hierarchy

represents

a

penalties. lag

in

Vol. 2, No. 2, June

any 1995.

136

R. N. Taylor

0

et al.

[1 9431.m1T1$mm6TF41kl —

x-.@z=o,

RB, m::rY – I >

LCCRTIM

S

14

vlu9T1@.

tel.

15

KXT.lO.

16

lNT.lO.

17.

FW !H

9 := Elm

18

cmt,m

19

h

[.GI$?

. Val Lm f.x

.>,

(1): !

mk.lm

Gt.n a ... * GILn a value

:>

TEX.1O.WT.L1K

m

*

(1),

(. Exqt,

m

fwt.cmri

...

s4.

B

),

fcr fcr

8, 2 % 1

I

1

:

w>

,,

;/.

. 1

Fig. 15.

system developed dispatchers, and 7. EXAMPLE Chiron

thus far. 16 artists,

applied

students

University

reporting

The flight simulator, exhibi{s acceptable

a violation.

with 10 wrapped performance.

ADTs,

10

USES OF CHIRON

has been

graduate

The Anna Debugger

to a wide

of Colorado,

research groups briefly described

range

at the University the

Chiron-1

both at UCI here. These

of problems,

of California

by undergraduate

at Irvine

development

(UCI)

team,

and

and at the

and

unaffiliated

and elsewhere. Several of these applications are descriptions are designed to illustrate the range

of applications for which Chiron is appropriately the degree to which its separations of concerns istics have been effective in practice.

used, as well as to indicate and other technical character-

7.1 The Anna Debugger The

Anna

affiliated [Luckham

was

the

1987]

assertion The

Debugger with

execution

can of

progressed

then the

from

The

perform

Ada

to a Chiron

which

user

interface

Stanford It

In

fact,

is made

on Computer-Human

of

Anna

the in

three

at the

InteractIon,

programmers that

user

(see and

Debugger’s to

interfaces application

when

question

operations

interface all

by programs

notifies

number The

Ada

assertion

command-line

interface. to use

the

any

program,

University

debugs

debugger

displays

a textual

finally

ACM TransactIons

and

at

project.

assertions.

is violated

user

built

Chiron

an

not

use

Anna

an

Anna

Figure

15).

continue

the

user

interface

has

Xlib

interface,

and

coexist. load

Vol 2, No 2, June 1995

time.

The

choice

The

key

of to

Chiron-1 this

achievement

interfaces

is a clean

to the

application

that

all

three

user

respect.

The Xlib

interface

too difficult not affected

is no longer

being

supported,

as the developers

to upgrade to new versions of X. The Chiron-based because the impact of such a change is isolated

server. Developers tion from switching single

interface

137

.

student

found

it

application is to the Chiron

claim that there was no significant performance degradato the Chiron version. The project was completed by a

within

the course

of a semester.

7.2 ProDAG / TAOS The

Software

Testing

Group

at UCI,

distinct

from

the

Chiron

group,

has

developed a graphical user interface using Chiron for two systems called ProDAG (PROgram Dependence Analysis Graph) [Richardson et al. 1992] and TAOS (Testing ProDAG is a toolset

with Analysis that performs

and Oracle Support) [Richardson 1994]. analysis of dependencies between program

statements. TAOS is an environment that supports the process of software development. Both systems provide grammatic

interface

(API)

to all of their

analysis and testing an application pro-

functionality.

The

GUI

for ProDAG

consists of six Chiron artists that use the API to provide access to all of the tools in ProDAG. In the same manner, four artists are used for the TAOS system. its

In ProDAG,

control

flow

the

graph

GUI

allows

(CFG),

dependency information GUI is used to develop

and

a user then

to analyze

a program,

to annotate

the

CFG

in a variety of ways (see Figure test cases and test data, and then

to display

to display

the

16). In TAOS, the to execute, verify,

and analyze test execution. ProDAG/TAOS consists of 85K lines of code produced by four to six programmers. Forty-nine thousand lines of code are contained remaining

in the API and the supporting 36K lines of code with greater

application. The than 70% of that

GUI takes up the code generated by

Chiron and the Pleiades object management The GUI developer thus wrote about 10K

system [Tarr and Clarke 1993]. lines of code between the two

systems. The API ADT-based

lent itself naturally to Chiron’s was set, the programmer who

developed

approach artists. the

programmers developer

Chiron who

was

used in ProDAG/TAOS In fact, once the API GUI

for

ProDAG\TAOS

developed

able

to make

the

artists and then to generate GLAD layout system speeded was to flesh out the generated the API.

A Chiron each

keyboard

to

did the

so independently

tools.

In

generator

addition,

tools

could then be refined. developer to create the

of the the

GUI

to generate

The initial

an

GUIDE and layout of the

skeleton code to implement that layout. The development of the CFG artist. The final task code to respond meaningfully to calls made on

Tetris Game

developer

players’

for

use of Chiron’s

initial interface quickly that gi1210cal/gab tools allowed the

7.3 Multiplayer

code

produced

screen, rotate

Tetris and

ACM

a multiplayer blocks

position Transactions

the

fall

Tetris into

blocks.

a When

on Computer-Human

artist well.

(see

Figure

The

players

a player

clears

Interaction,

17). use a row

Vol. 2, No. 2, June

On the of 1995.

138

R. N. Taylor

.

et al,

EEa out

0w15

Rematnder

Inter-m ed!ate c.< heq, n

3

wh,le

Cur. Try

Q

— —

Effectively

--

fcr

N,.,

DImt

B

wh,le

blocks, this row, at the appears although not

ProDAG

16.

minus bottom

players

of

the

13

Netit

that

interact

with

other’s falling blocks), The run-time configuration

players.

Brrnq

>-

.20.

mxt.

d,c

“al”, - 20 -

Ste D_5,za

1

,COP

St,,

s,,,

Next

S,2,

+2

D,Q, t + 1

mea

We ha”.

cu>

::

––server events handlers must have the signature: –procedure (Object CSL.Object_Type; —— Event : CSL,Chmon-Event_Ptr); ——

40 41 42 43 44 45 46

––client events handlers must have the signature -– procedure (Event : Client_EventJ%r);

ACM

Transactions

on Computer-Human

InteractIon,

Vol. 2, No. 2, June

1995

Chlron-1

procedure

HandleSlider

FloatResult:

(Object Event

: “CSL Object_Type; : ‘Chiron_Event_Ptr)

141

.

47 48 49

M

Float;

50 51 52

begin –– User has moved the slider, get the new value from the event –-information and convert it to type Float range 0.0 to 1,0. FloatResult := Float(Event.Num_Val) / 100.0; ––Update throttle ADT Wrapper_Throttle_Module.

Adjust_Throttle

:: 55 56 57 58 59

(FloatResult);

end Handle511der;

:!? :;

begin --task accept

u

body

StartArtist

(ID SelfAptr DisplayName

: CSL.Artist_lD_Ty address, : CSL,Str) do

66 67

pe;

% 70 71

Self-Ptr := address.to_artist( SelfAptr); LocalArtist.lD := ID; LocalDisplay := DtsplayName; -–> appropriate dispatchers here

--this

artist does not receive ADT–based

;: 74 75 76 77 78 79 80 81 82 83 84 85 86 87

events

end StartArtist;

–->

––Upon startup, a base frame will be created that will ––be used to hold panel window.

% Artist_Frame

,= ‘Atmlv(ADLBase-Frame, .. .. create, Frame_Label Show_Footer x Y

-– Upon startup, a panel window –-be used to hold the slider. Artist.Panel

:= ‘Apply

––Upon startup, --attributes. Throttle

90 91 => => => =>

“Throttle True, 10, 773);

Control”,

:: 94 55 96 97 98 99 100

will be created that will

(ADL_Panel, create, Parent => Foreground => Background=>

101 102 103 104 105 106 107 108 109 110 111 112 113

Artlst_Fra me, Black, Black);

a slider will be created with the following

:= “Apply

(ADL_Slider,

‘create, Parent Label Slider-Value

ACM

Transactions

=> => =>

Artist-Panel, “Throttle”, 43

on Computer-Human

Interaction,

Vol

2, No, 2, June

1995

142

R. N. Taylor

.

et al. Mln.Value Max_Value Show_Value_F!eld Foreground Sllder-Width

‘Apply ‘Apply

114 115 116 117 118

6, 100, True, White, 200),

119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

ADL}anel, ArtW_Panel, ADL_wlndow-fk), ADLBase_Frame, Artist.Frame, ADL_windowJlt),

I

set behaviors of graphical to server events here

–– => => => =>

method

Artlst_Frame,

here

>>

start_processing),

loop select accept

Notify _Cllentlvent Cllent-Event HandlerRoutme

(

Not~b~e~tver_Event

(

Cllent_Events address);

Cllent-Event_Ptr,

or accept

Serve r..Event HandlerRoutine

CSL,ObJect_Type, : CSL.Chlron_Event-Ptr; address),

or accept TerminateArtist do ––destroy all graphical obJects “Apply (AD L_base_frame, artist_fra me, destroy, artist.frame), end TermlnateArtlst; end select, end loop; end Throttle_ModuleArtlst, end Throttle-Mod

uleArtist,

ACKNOWLEDGMENTS

Mary

Cameron,

original made

Chironby

John

improvements

Ruedi 1

Keller,

and

architecture.

Dennis Other

Troup important

Self, Craig Snider, and Robert were made by David Levine.

were

key

contributors

contributions

Zucker.

Critical

to the have

been

performance

REFERENCES 9X MAPPING/ REVISION TEAM. Inc., Cambridge, Mass. Sept.

ADA

ACM

Transactions

on Computer-Human

1993.

Ada

InteractIon.

9X Reference

Vol

IWarud,

2. No 2, June

Version

1995

4.0. Intermetrlcs,

Chiron-1

ANSON, E.

1982.

The

16, 3 (July),

Graph.

device

model

of interaction.

In

Proceedings

.

of SIGGRAPH

143

82. Comput.

107-114.

BARR, J., BERNARD, A., AND WETTLAUFER, J. 1992. Description. Visix Software Inc., Reston, Va.

Galaxy

Application

Enuz,ronment

Technical

BROWN, M. H. 1992. Zeus: A system for algorithm animation and multi-view editing. Tech. Rep. 75, Digital Systems Research Center, Palo Alto, Calif. Feb. CAGAN, M. R. 1990. The HP SoftBench environment: An architecture for a new generation of J. 41, 3 (June), 36–47. software tools. Hewlett-Packard of the 3rd Annual DEWAN, P. 1990. A tour of the suite user interface software. In Proceedings Symposium

on User Interface

York,

57-65.

GASKINS,

T.

1992.

bastopol,

Software

PHIGS

and

Programmmg

Technology Manual,

2nd

A. AND ROBSON, D.

Addison-Wesley,

Reading,

Proceedings

1983,

Smalltalk-80:

ACM,

ed. OReilly

and

Associates,

Language

and

Its

of ACM

Tke

SIGSOFT

92:

5th

E. V.

1992.

Symposium

(Tyson’s Corner, Vs., Dec 9-11). HARBISON, S. P. 1992. Modula-3.

ACM, New York,

HILL,

S. L.,

R. D.,

dezvous

BRINCK,

T.,

Hum. M.

interface M.

A.,

New

Inc.,

Se-

MAYBEE,

R.,

for

AND

CALDER,

system

for

Computer

for software

Science,

S.

1991.

Univ. CLIM:

system.

In

En uironments

N.J. W.

1994.

applications.

1988.

R.

Interviews:

Univ.,

Stanford,

1989.

Composing

Annotating

S. D.

environment

of Colorado, The

M,

Ada

The

ACM

1990.

RenTrans.

C +t

graphical

July.

user

interfaces

Reference

with

Manual.

Berlin.

Q: A multi-lingual

implementation.

Boulder,

A

CaIif.

Programs:

vol. 260. Springer-Verlag,

M., OSTJIRWEIL, L. J., AND Swum,

nications

J. P.

a Language Science,

Cliffs,

multiuser

Stanford

8-22.

AiVNA,

presentation

Development

81-125.

22, 2 (Feb.),

in Computer

Proteus

J. F., AND WILNER,

constructing

AND VLISSIDES,

J. M.,

Comput.

1987,

Notes

Implementation.

130-138.

Englewood

Rep. CSL-TR-88-358,

VLISSIDES,

D.

Lecture

P.

Tech,

IEEE

LUCKHAM,

language

The

on Software

PATTERSON,

1, 2 (June),

CALDER,

toolkit.

InterViews.

and

Interaction

A.,

Prentice-Hall,

ROHALL,

architecture

Comput.

McIQY,

Oct. 3-5).

Mass.

GRAHAM, S. L., HARRIS, M. A., AND MUNSON,

LINTON,

Utah,

Calif.

GOLDBERG,

LINTON,

(Snowbird,

Tech.

interprocess

commu-

Rep. CU-CS-476-90,

Dept.

of

Colo. June.

Common

Lisp

Interface

A system

for

displaying

Manager.

Commzm.

ACM

34, 9 (Sept.),

58-59. MYERS,

B. A.

(July),

1983,

MYERS,

B. A.

call-backs.

1991. In

Technology MyERS,

Separating

data

code

from

of the 4th Annual

ACM

Symposium

S. C., Nov.).

New

Proceedings

(Hilton

Head,

application ACM,

structures.

A., AND MARCHAL,

interactive

user

NEURON DATA.

interfaces.

1991.

P.

1990.

IEEE

Neuron

Garnet:

Comput.

Data

23,

toolkits:

Comput.

York,

Eliminating

Graph.

17, 3

spaghetti

of

Software

and

211-220.

Comprehensive 11 (Nov.),

Open Interface

the

on User Interface

VANDERZANDEN,

B. A., GUISE, D. A., DANNE,NBERG, R. B.,

MKXISH,

Alto,

Incense:

115-125.

B., KOSBIE,

D. S., PERVIN, E.,

support

graphical,

for

highly

71–85.

Technical

Oueruiew.

Neuron

Data

Inc.,

Palo

Calif.

NIES, K., MACFARLANE, 1.4. Arcadia California, O’REILLY,

Tech. Irvine,

T.

C., CAMERON, M., AND BOLCER, G. Rep.

Calif.

1992.

Xlib

UCI-93-07,

Dept.

1993.

of Information

Chiron-1 and

user

Computer

manual. Science,

Version Univ.

of

Sept. Reference

Manual,

2nd

ed. O’Reilly

Management

Systems.

and

Associates,

Inc.,

Sebastopol,

Calif. PFAFF,

G., Ed.

1983.

User

Interface

many, Nov.). Springer-Verlag, REED, D. R.

1992a.

Efficiency

In

(Seeheim,

Eurographics

Ger-

New York. considerations

in C +t,

part

1. C +t

Rep.

4, 3 (Mar. /Apr.),

27-30. REED, D. R.

1992b.

Efficiency

REISS, S. P.

1990.

Connecting

Softw.

7, 4 (July),

considerations tools

using

m C +t, message

part passing

2. C +t in the

Rep. 4, 5 (June), Field

23–27.

environment.

IEEE

57-66. ACM TransactIons

on Computer-Human

InteractIon,

Vol

2, No 2, June

1995.

144

.

R. N. Taylor

RICHARDSON, D. J. 1994 Aug.).

ACM

user

A., and

SNIDER, C.

1991.

a generic

C. T.,

M.

(Hilton

AND AHA, In

In

Proceedings

[ISSTA)

S. L.

Proceedings (Tyson’s

Inst.,

GLAD

user’s

Science,

Univ.

P. N.,

of the

(Seattle,

1992.

of ACM

Corner,

Wash..

Developing SIGSOFT

Vs.,

Factors

May)

SEITZ,

Pittsburgh,

layout

J

De.

and 92: 5th

9-11).

ACM,

Arcadia

ACM,

package.

New

construction

Conference

York, C.

ACM,

set

on Human

73-74. 1991.

PICASSO

The

ACM Symposium New York.

on User Interface

ESD-TR-89-08, Rep.

Version

Carnegie-Mellon

Integrating

Softw. T.

3,

1993

(Amsterdam,

of Information

User’s

manual

for

In

generation

Proceedings

24-29).

3.0 User’s

program-

10– 18.

A second

Apr.

Guzde

Dept. Note

access-oriented

1 (Jan.),

architecture.

Deueloper’s

Tech.

1.0.)

1986.

IEEE

UCI-91-15,

Oct. (Arcadia

KAHN, K. M.

Systems

display

the

AND LIU)

S.,

Tech.

Irvine,

and runtime

Windows

of

Pa. Aug.

D , AND GRIFFIN,

The model

Open

S.C , Nov.).

manual.

m Computmg

1991.

SUNSOFT

The AT&T

proceedings

Rep. CMU/SEI-89-UG-2,

environment.

FOLEY,

envu-onment:

C.,

of California,

graph

a multlparadigm

SUKAVIRIYA,

1992.

In

Calif.,

B.

Head,

Tech.

J., BOBROW, D. G., AND

into

(UIMS).

SMITH,

overview.

hierarchical

Human

support.

Analysw

In Proceedz ngs of the 4th Annual

Engineering

and Computer

design

and

Erunronments

(Monterey,

A.,

J.

Technology

Serpent

Software

STEFIK,

MOORE,

envu-onment.

system

Systems

framework.

1989.

Univ.

and oracle

Testing

A. L., AND WITT MAN, C. A.

KONSTAN,

application Software

0.,

Arcadia

management

m Computmg L.

analysis

138-153. T.

Dec,elopment

J. P., BovmMN,

Factors

ming

York,

in the

with

on Software

109-119.

interface

ROWE,

Testing

OMALLEY,

on Software

York,

ROTELLA,

New

J.,

ProDAG

Symposium New

Taos:

Symposzurn

Press, D.

integrating

SEI.

1994.

International

RICHARDSON,

et al

ACM,

Guzde

user

interface

of the Conference New

SunSoft,

York.

on

375-382.

Mountain

View.

Calif. SZCZUR, M. signer

R,

(Monterey, SZEKRLY, tools. Apr TARR,

1992.

workbench. Calif.,

P., Luo,

Transportable In

May).

P.

ACM,

New

New

York,

environments.

Foundations

of Software

A.

WARNOCII, Systems WIECHA, WILEDEN,

Apr.

Calif.

Park,

on Software

builders:

Model-based

m Computmg

Development

de-

Systems interface

(Amsterdam,

of concerns

Proceedings

24-29).

ACM

management.

New

Eruw-onments

Inf

(Boston,

1989.

P. L.

Proceedl Lzsp,

S.

Mass.,

Testing,

Analysis,

and

on

York, user

Manual,

1990.

the

56-70, interface

Factors

in

ITS:

7th

ed. Adobe

A tool

for rapidly

204-236.

PGRAPHITE: SIGSOFT

Nov. 28–30).

An experiment

88: 3rd

ACM,

3rd ed. Addison-Wesley,

Verzfzcatzon

software

367-374.

1988.

ngs of ACM

New

on Human

8, 3 (July),

YOUNG, M., TAYLOR, R. N., FORESTER, K., ANDBRODBECK, D. A. analysls m a software development envmonment. In proceedings on Software

ACM,

Reference

Syst.

for

Symposium

in the Chiron-1

York,

Language

ANDTARR, In

the

of the Conference

ACM,

Trans.

system

of

Dec. 7-10).

S., GOULD, J., AND GREENE,

P. H. AND HORN, B. K. P.

Symposium

Systems

management

Proceedings

Calif.,

Separations In

L., FISHER, C. D.,

object

object 93:

Postscript

applications.

J. C., WOLF, A typed

1992.

W., BOIES,

mteractwe

in persistent WINSTON,

(Amsterdam,

An

(Los Angeles,

1993

C.

C., BENNETT,

interface

interface

Factors

SIGSOFT

system.

Inc.,

developing

Pleiades:

Engzneerzng

J. AND GESCHKE, Menlo

user

m Computmg

Beyond

on Human

ACM

and management Systems

plus

Factors

231-232.

1993.

1993 In

TAYLOR, R. N. AND JOHNSON, G. F. Computing

(TAFJ

on Human

383-390. L.

engineering

development

York,

R.

of the Conference

AND CLARKE,

environment

of the Conference

P., AND NECHES,

In Proceedings ) ACM,

applications

proceedings

Sympostum

New York, Reading,

130–142.

Mass.

1989. Integrated concurrency of the ACM SZGSOFT 89 3rd

( TAV3).

ACM

Softw.

Eng.

Notes

14, 8, 200-209, YOUNG, M., user

Received

ACM

TAYLOR, R. N.,

interface

February

TransactIons

facihties.

1994;

AND TROUP, D. B. IEEE

Trans

accepted

on Computer-Human

Softw.

December

1988. Eng.

Software 14, 6 (June),

environment 697–708.

1994

InteractIon,

Vol

2, No 2, June

1995

architectures

and

Suggest Documents