+ All Categories
Home > Documents > EAGLES: An Interactive Environment for Scientific Computing

EAGLES: An Interactive Environment for Scientific Computing

Date post: 24-Sep-2016
Category:
Upload: r-m
View: 231 times
Download: 2 times
Share this document with a friend
4
IEEE Transactions on Nuclear Science, Vol. NS-34, No. 4, August 1987 EAGLES: AN INTERACTIVE ENVIRONMENT FOR SCIENTIFIC COMPUTINGt B. S. Lawyer, D. W. O'Brien, Al. E. Poggio, R. Al. Shectman Engineering R search Diuisio01n Larwre nce Livermore National Laboratory Po Box 5504 L-156 Lzvcrmorv, Calif. 94550 Abstract The EAGLES Project is creating a computinig systemli anid interactive environment for scientific applications using object- oriented software principles. This software coiicept, leads to well defined data interfaces for integrating experiment coiitrol with acquisition and anialysis codes. Tools for building object- oriented systems for user iinterfaces and codes are cliscussecl. Also the terms of object-orienited programiiiniilg are iintroduiiced and later defined in the appenidix. These termis include obj'ects, methods', messages, encapselationt aIti iiheriitatice. Using object-orienited software principles beinefits the cotle's niodularity alnd developmelnt costs. Addinig tools for auitomiiat- ilng the designi aind use of objects is also importanit. EAGLES first developed tools for designing anid prototyping user iinter- faces. Later it examiined the idea of a wrapper or funictioni to convert ai olbject inito a form that a FORTRAN library funiic- tioii could process. By automiating a wrapper generator it is possible for a user with no knowledge of objects to conistruct wrappers for inew library funictionis. With tools like the wrapper genierator and the miieiLu gemi- erator, a niew data analysis code can be developed in a fractioni of the tiimie it takes without object-orientedI tools. Introduction EAGLES is a project whose goal is to identify antI apply better software tools aind principles to the problenms of user aindl data itnterfaces. We were obligated to suipport both VAX/VMS aind UNIX operating systems anti a variety of graphics teruini- nals. In a typical computer enlviroiinmentt for scienitific applica- tionls, the user is facetl witlh remembering wlhich tlata files can be used by wlhich codes and which stranige commiiiianid sequenice works. Both of these seeminig differenit problemis have a very similar solutions and are actually closely relateti becatuse they are part of the setLup phase of most coiimputer cotles. By treat- ing data as objects the initernal strtucttire is uniil)ortanlt when supported by mncthods to transformii and manipulate the data.. Our tools for creating anti usiiig objects were easy to develop and maintaini. For instaince itn the EAGLES environment, all objects inhlerit miethods for readiing aind wrriting theemselves. Here the software developer never dtesigns antI cotles software to move tdata from oine applicatioin to aniother. In maliy ap- plicationis, this is a large portion of thle application andl ilmust be imlodiified every time a new' enitry is atdletl to the data file whether it is requireti by this cotle or not. When imioving ob- jects between codes the ihlieriteti methods allow t,he developer to ignore new tlata fieltis in the object. Objects Objects or object-orienited prograiliniiiilg [2,31 is niot niew in fact the principles can be traced to some of the earliest Iain- guages and most good high level laingutages cain be uisecI to (le- velop object-oriented applicationis. It is syntactically ea.sier to use a true object-orieinted laniguage to eniforce object rules thiain to rely on the code developer. The SnialIlTalk systenif41l has doine the mi1ost to popularize the principles of object-oriented programmining. The mnajor difference betweeni object-orien1ted program11- miiing and functioinal languiages like FORTRAN is the view takeni by the developer. In functional latnguages the developer first defines functioins to process data anid tlhein massages thle data to interface oine fun-ctioni to another. In ol)ject-orienlted languages the developer first defines objects (data) aii th1en1 messages (calls) the objects to com-ipute results. Since the ap- plicatioIn is iIO loinger passing ctata in object-oriente appfli- catioins, the mnachiine represeintation of the (tata is nO loinger imilportaint to the application. Chanlges to) the internal formn of data (objects) tlo not affrct the apl)plicationl so errors atid thie cost of maintenance are lower. t This work was performiieti under the atuspices of the U.S. Department of Eniergy by the Lawrence Livermiiore Laboratory tiundler Contract W-71405)-EIg-48. 0018-9499/87/0800-0928$01.00 © 1987 IEEE 928
Transcript
Page 1: EAGLES: An Interactive Environment for Scientific Computing

IEEE Transactions on Nuclear Science, Vol. NS-34, No. 4, August 1987

EAGLES: AN INTERACTIVE ENVIRONMENTFOR SCIENTIFIC COMPUTINGt

B. S. Lawyer, D. W. O'Brien, Al. E. Poggio, R. Al. ShectmanEngineering R search Diuisio01n

Larwre nce Livermore National LaboratoryPo Box 5504 L-156

Lzvcrmorv, Calif. 94550

Abstract

The EAGLES Project is creating a computinig systemli anidinteractive environment for scientific applications using object-oriented software principles. This software coiicept, leads towell defined data interfaces for integrating experiment coiitrolwith acquisition and anialysis codes. Tools for building object-oriented systems for user iinterfaces and codes are cliscussecl.Also the terms of object-orienited programiiiniilg are iintroduiicedand later defined in the appenidix. These termis include obj'ects,methods', messages, encapselationt aIti iiheriitatice.

Using object-orienited software principles beinefits the cotle'sniodularity alnd developmelnt costs. Addinig tools for auitomiiat-ilng the designi aind use of objects is also importanit. EAGLESfirst developed tools for designing anid prototyping user iinter-faces. Later it examiined the idea of a wrapper or funictioni toconvert ai olbject inito a form that a FORTRAN library funiic-tioii could process. By automiating a wrapper generator it ispossible for a user with no knowledge of objects to conistructwrappers for inew library funictionis.

With tools like the wrapper genierator and the miieiLu gemi-erator, a niew data analysis code can be developed in a fractioniof the tiimie it takes without object-orientedI tools.

Introduction

EAGLES is a project whose goal is to identify antI applybetter software tools aind principles to the problenms of user aindldata itnterfaces. We were obligated to suipport both VAX/VMSaind UNIX operating systems anti a variety of graphics teruini-nals. In a typical computer enlviroiinmentt for scienitific applica-tionls, the user is facetl witlh remembering wlhich tlata files canbe used by wlhich codes and which stranige commiiiianid sequeniceworks. Both of these seeminig differenit problemis have a verysimilar solutions and are actually closely relateti becatuse theyare part of the setLup phase of most coiimputer cotles. By treat-ing data as objects the initernal strtucttire is uniil)ortanlt whensupported by mncthods to transformii and manipulate the data..Our tools for creating anti usiiig objects were easy to developand maintaini. For instaince itn the EAGLES environment, allobjects inhlerit miethods for readiing aind wrriting theemselves.Here the software developer never dtesigns antI cotles softwareto move tdata from oine applicatioin to aniother. In maliy ap-plicationis, this is a large portion of thle application andl ilmustbe imlodiified every time a new' enitry is atdletl to the data filewhether it is requireti by this cotle or not. When imioving ob-jects between codes the ihlieriteti methods allow t,he developerto ignore new tlata fieltis in the object.

Objects

Objects or object-orienited prograiliniiiilg [2,31 is niot niewin fact the principles can be traced to some of the earliest Iain-guages and most good high level laingutages cain be uisecI to (le-velop object-oriented applicationis. It is syntactically ea.sier touse a true object-orieinted laniguage to eniforce object rules thiainto rely on the code developer. The SnialIlTalk systenif41lhasdoine the mi1ost to popularize the principles of object-orientedprogrammining.

The mnajor difference betweeni object-orien1ted program11-miiing and functioinal languiages like FORTRAN is the viewtakeni by the developer. In functional latnguages the developerfirst defines functioins to process data anid tlhein massages thledata to interface oine fun-ctioni to another. In ol)ject-orienltedlanguages the developer first defines objects (data) aii th1en1messages (calls) the objects to com-ipute results. Since the ap-plicatioIn is iIO loinger passing ctata in object-oriente appfli-catioins, the mnachiine represeintation of the (tata is nO loingerimilportaint to the application. Chanlges to) the internal formn ofdata (objects) tlo not affrct the apl)plicationl so errors atid thiecost of maintenance are lower.

t This work was performiieti under the atuspices of the U.S. Department of Eniergyby the Lawrence Livermiiore Laboratory tiundler Contract W-71405)-EIg-48.

0018-9499/87/0800-0928$01.00 © 1987 IEEE

928

Page 2: EAGLES: An Interactive Environment for Scientific Computing

929

Another advanitage of object-oriented programDmDing is op-erator overload, which means for exaimiple the method displayis different for a menu object and samiiple object. One displaysa miienu for isiput oIn a termiiinal while the other displays a plotof samples versus timne oIn a graphics device. With inhleritainceit is possible to create new objects from more basic objects byinheriting the data storage, and methods aiid overridiing thosemethods that need to have a differenit. meaining.

These characteristics of object-oriented systeimis allow de-velopers to build a system with less code that is easier to uncder-stalid and maintain. Also code reusability becomes an actualfact aind Inot just a desired goal for better productivity. Thereare several good books on SlmiallTalk and soniie adlditioinal def-iiiitioins are giveni il the appeiidix.

Object database

Data collected from vario)us types of inistrumiiieints and cooni-puter systems must be processed by one or more analysis codes.Data input, validationi and conversion miust be done before ainycalculations can be performiied. This setuip process iiiust bedone for each new type of data and mlay nieed to be included inall codes that wish to use the data. A lower cost alternative isto pre-process ilew types of data iInto a system stailidardI forinatthat existing and uiinnodified codes cani process. A standarddata format for data is very similar to the concept of objects.Each rnew input has a translator or wrapper writteni which con-verts the data to an object.

A generalized standard database of objects was used byEAGLES to develop several dlifferent codes wlhich processedthe objects. Using object-oriented tools we are able to makechainges to the objects without modifying anly of the codes. Inour case, a new value frequency response was added after miuchof the ainalysis codes were comnplete and verified. Tue pre-processors were able to add frequency response to the objectsand only those codes which computed resutlts that iised thevalue of frequtency response were modified. All others remnainedunmnodified and verified. Since the object-orienited tools thatEAGLES Lused included imiethlods for readiing and writing, weused those miethods to read anid write our system staiidarddatabase. As an addled bonitus this imethod ruins oni severaldifferent UJNIX systems besides VMS ancd the database fileswere idlentical and interchangeable betweeni all syst.ems.

User interface

The discussioin so far is about objects and their relation-ship to data. The EAGLES user iinterface also tises object-orieiited tools. Our utser interface iincludes objects wlhiclh defiinepanels which act like winidows, nmenlls for selection and formsfor data iilput. Each portioni of the user initerface is a differ-ent object with miietlhods for displaying and liniking this part toother parts to make ani interface. For exanmple, the objects fora miienu iincltode the location of the promnpt striilg, its conteiits,what to do if sooneonie selects this prompt, what to do when thecursor imioves and displayiisg help to describe the requiredl tiserresponse. A inieiu selectioii may resuilt in additioiial inipuit suachas aniother iiieinu or forml, starting another ta.sk or returniing aselection value. Figure 1 slhows a, iniemiti witlh aniother iinenltipulled dowii ancd a help panel displayed.

EAGLES/CONTROLSControls Edit OA Setup Information Exit

Text editor

HELP

TEXT

The text editor currently used is EDT, a VMS provided text editor. Tomake this selection, move the cursor to this item (using the UP and/orDOWN arrow keys) and then hit the RETURN key.

Figure 1 Menu with help panel.

EAGLES has several tools to iinteractively construct t.heinterface objects to the user code and since tlhese objects canbe read by aniy code which knows about this type of object itis easy to change objects and therefore iinterfaces. This abilityto onodify the objects describing the user iinterface opens upthe possibility of prototypinig user interfaces anid revisiiig oldinterfaces that Ino loinger serve the user.

EAGLES developed both a menu generator for develop-inig pull-down menius and a formii genierator for developinig datainput forms. In addition there are two display test programswhich cain ruin any inmeniu or form. With these progralmls the lookand feel of the user interface can be demonstrated to differentusers and modifications made. What seems obviouis to one usermay be conifusiing and intimidatilg to others. This ability toprototype user interfaces has malde the collection aiid analysisof data easier anid miiore accurate. Eilmpirical data to supportthis last poiInt is costly to collect and we havein't collected any,but we have collected feedback that indicates acceptance anidpleasure with the system. In addition the users indicate thatlong forgotten features and tools are once agaiin available aindused because of a good user interface.

EAGLES also provided windowinig capability with theuser interface. The ability to suipport muiltiple windows helpedumnify the user iiiterface. This capability was provided at asoftware layer below the mienu andi form objects. This layer ii-cluded display objects which kinow about wiildows, keyboar(dsand views. Most views were desktop style wlhere each niewmeinu or formn is placed oni top of the existing view. When in-teraction with that view is coiinplete that view is destroyed anidthe previous views are once again visible. Occasionally a viewburied underneath other windows oinight need to be brought tothe top and there are mnethods to iiincover a particular wimndowto miiake it visible.

Obiect Wrappers and WrapperZgeneratorsPerhaps the costliest software task in data collection sys-

temns, is the coniversioni of the collected data inito all of the formswhich applications requiire. The job is coonipouoidedl when dif-ferent languages or coinpputer systems are addel to the lab-oratory emivironinient. Of the four or five popular languagesfor data analysis there is i1o agreement 00 wliat a coniiplexnulmber is amid amiiomig differing conliputer systems there is nioagreemiiemit of the bit representationi of a floating poinit iiutlmi-ber. Iiistead of codinig a special iinterface for each application

Page 3: EAGLES: An Interactive Environment for Scientific Computing

930

to move data from one place to another EAGLES automatedthe wrapper by building a wrapper generator. A standard callinterface solves part of this problein alnd you see soltutions likethis when you interface to large numeric analysis packages orlibraries. A standard object data format futrther silliplifies theproblem by bound(ling the object format. The genieral termil forthis problemii is Remote Procedture Call (RPC') aiid we examii-ined a limited subset of the problem. We, were oinly iinterestedin interfacinig to a set of FORTRAN libraries that used thesamie call interface.

The EAGLES project team and several other groups [7,8]have exaimined buildiing automated interface (wrapper) genera-tors. The purpose of the wrapper generator is, from a interfacedescriptioni supplied user, to construct the interface betweenone data form and aniother. The more general solutioii h1asbeen termiied stub generator where stub meanis that portioni ofcode that maps the data to anid fromii a miiachinie anid languageindependelnt formii. Byte ordering, exponeint range, and preci-sioIi are some of the importaint factors to lhanidle with a stulbgeinerator. The EAGLES wrapper generator and milost stubgenierators have beein built with LEX anid YACC whiicl axe

compiler tools available unider UNIX. The iinterface descrip-tion is yet ainotlher programiiming lainguage usually witlh a muchlsimiipler grammar anid sylntax. The EAGLES wrapper descrip-tioii is eintered by the user via foruos whiclh look simiiilar tothe documentation headers wlhere much of this informiiation isfound. Figure 2 shows the primiiary form which asks generalinformation and leads to additional forimis. Figure 3 shows thehelp painel for the conversioni portioin of the dlescriptioii. Be-hiind the help patnel, you cani see the data coiiversion formn aindbelhindl that you cain see the miiaili wrapper generator formii.

Add FunctionM function name: EIGDescription ( <= 40 chars ): Computes Eigen vectors and values

Number of arguments: 1 Argument worksheet...

Number of returns: 2 Returns worksheet ...

Name of external to wrap: COMQR3Fortran function or subroutine ( f or s ) s

Number of arguments incalling sequence of external: 14 Calling sequence worksheet.

Number of error tests required: 2 Error test worksheet..,

OK,.- I cancel...

Figure 2 Wrapper Generator.

Conclusion

Much of the features elescribed ill this paper exist as partof a user interface mianageimient systemii or ITlMS. Our experi-ence shows that somie features stlch as keyboard driveni ilmenuisare feasible while others sucli as miioutse driveI imienuts await

lower cost hardware or more comiipletely integratedl softwatresystems. A good systemii will support windiows, imienuii anid forlasnot only inidependenit of laniguage but also the com-lpuiter. uTs-ing object-oriented tools allowed our systemi. to remain inile-pendent of lainguage and system. We have come to understaindthe power of objects to handle dlata iisterfaces aind to developuser ilnterfaces.

Add FunctionCalling Sequence Worksheet

paoe 1external SUBROUTINE COMQR3(Xi,X2X3,X4, X5,X6.X7,X8 X9,X9l

HELPExternal Hrgument OperatorLegal operators are

unity (Rn) null operator (unity(An) RAn)re(An) real part of matrix Rnim(An) imaginary part of matrix Anrow(An) # of rows in matrix ancol (An) # of columns in matrix RnnewmatIn,m) defines a new matrix with n rowe

and m columnsconst (c) defines a constant of value cconmat(n,mc)- defines a new nxm matrix with all

elements set to c.n, m, and c can be numeric constants or functions row, colof matrices An. For example:

newmat (10, 20) or newmat (row(RI), col (H2))<CR> to get back ...

_

Figuire 3 Help for data miappingsl in Wrapper Generator.

References

[1.] James D. Foley, Victor L. Wallace, anid Peggy Chan,1 IhleHuman Factors of Comptiter Graphics intereaction Teclh-niquess, IEEE ('onmputer (TGuaphics anid Apbhcation,s, IEEECoimp1uter Society Press, Novenmber, 1984, pP. 1:3-4.

[2.] Grady Booch, Object -Oriented Development, [EEE Tr7ans-actions on Software Eiiguoinecr Ig, Vol. SE-12, No. 2, IEEEComipuiter Society Press, February, -1986, pp. 2-11-221.

[3.] , Objcctive- C Reference llanunal, Productivity ProdcuctsInternational, 1984.

[4.] Adele Goldberg anid David Robinson, Small Talk- 80-TileLainguage anid its Inplemietation, Addison2- We siey, 1983.

[5.] Kenneth I. Joy, A Model for CGraphics Interface F'ool De-velopmneit, Graphics latecrface '85.

[6.] Aral Ege, C'arence A.Ellis. Design anid tmiplenintatioil ofGORDION, ani Object Base Mfa.iiagemeu,l Systemo, EEPThird Data Ezgileeiring Conferce. Feb. 1987.

[7.] DavidI Notkin, Normain Hutchinson, Jan Sanislo and MichlaelSchwartz, Heterogeneous (oinpu ting Ein vironment s: He-poI-t OII the ACMA SIGOPS VV'orkshop otn AccommuodatingHeterogeneity, Cnlan un ication.s of te A( ill, Feb. 1987.

[8.] Plhillip B. Gibbons, A Sttub Generator for A!tlltilangEuageRPC in Ileteirogelneotns En vironmnents, [FE Tr[ansactif)1(5son Soft wart EngiMCec ring, Jan. -1987.

Page 4: EAGLES: An Interactive Environment for Scientific Computing

AppendixObject-oriented programmning

Object-ornei ted programming technlology has evolved over

the last fifteen years. tJntil recently it, was onliy available on

very high cost, experimenital workstationis. Object-orientedprogramiiming is now available in Xerox's SMALLTALK80, Sym-bolic's FLAVORs, and PPI's Objective-C. Object-oriented pro-gramming has provided fresh, iiinovative approaches to sys-temii designi, the most recognizable being Apple's Macinitosh.Object-oriented laniguages employ several inew cooncepts Inotpreviously found in programmiiiinlg laniguages.

An object can be thought of as a data structure with pre-defined behaviors. Classes cotuple this data wit,h a structure ofmethods (functions or algorithmis) providing powerful bhuildingblocks that are are well suited for imnplemienting interfaces (i.e.menus, formis anid wrappers). The ability to "bind" data anid

algorithimis at the tiIme the enginieer runs aIn application offersthe flexibility to browse through the iInpUt, algorithmns and re-

sults ancd to make changes to eaclh, perhaps choosiing a differenit,algoritlmi or method in the niiddle of a probleni's solution.

A hybrid object-oriented language, Objective-C, was se-

lected for developinig the EAGLES environilienit. This languageadds object-oriented constructs to the C' programiiimiing laii-guage. These construicts provide the object/class structure,encapsulation, and inheritance desired while offeriing ftull ac-

cess to the C programminig languiage for more comipuitationiallyintenlsive chores. The features of Objective-C, lenid themnselveswell to the goals of the EAGLES environimien-t.

ObjectsVirtual machiines that requtire anid retaimi some datathemiiselves aind do work. Objects are dlynamically boundat ruil-time. One niiay tlhink of objects as data records

whlich carry the (lescriptions of the funiictionis that imiay

be carried out onI tlhemi, exhiibiting a b)elhavior (e.g.a nmatrix of numblers becomiinlg the tranmspose of itself

tIponi receiving a miessage to do so).

MessagesRequests miade of ani object to exhibit oine of its prede-finied belhaviors (functions).

ClassesTIme collections of related miietho(ds. Classes of miiethodsare built in a hiierarchy or tree structure. This structureallows a miiethod to share data aiid behaviors with allother methods above it in the tree. This is referred toas inhleritance. Every object associated witlh a class can

responcd to any miiessage that invokes a imietlhod in thatclass's inheritanice tree. Classes are also the factoriesthat produce niew objects of a similar type anid conitainthe shared part of these simiiilar objects.

MethodsVarious behaviors or functiolns arraniged in classes ofmiiethods. A metlhod is invoked by messaging an object.

EncapsulationThe powerful by-produtct of the object/class struictuirewhiclh keeps a clean, simiiple program-l interface to arbi-trarily complex objects.

The followitig terms clefiine major cotncepts aii(l the rela-tionslhips between tleni. These definitions have been designedto give somiie uniderstandinig of the concepts to those completelyunfaniiiliar with object-orienlted programmlIiinlg.

931


Recommended