24
il STARS The BOEING Company CDRL 00850 D613-20850 AD-A240 475 Software Technology for Adaptable, Reliable Systems (STARS) .DTIC Submitted to: ELECTE I Electronic Systems Division: SEPI 1 1991 Air Force Systems Command, USAF: Hanscom AFB, MA 01731-5000: C Contract No: F-19628-88-D-0028 CDRL 00850 Peer Review Capability Description February 2, 1990 The Boeing Company Space and Defense Group 00 Boeing Aerospace and Electronics V " [ P.O. Box 3999 iz g Seattle, Washington 98124 Approved for public release - disfribution is unlimited Peer Review Capability Description )61 3-20850 909 4046

Software Technology for Adaptable, Reliable Systems … · Software Technology for Adaptable, Reliable Systems (STARS).DTIC Submitted to: ELECTE I Electronic Systems Division: SEPI

Embed Size (px)

Citation preview

il

STARS The BOEING Company CDRL 00850D613-20850

AD-A240 475

Software Technology for Adaptable,Reliable Systems (STARS)

.DTICSubmitted to: ELECTE I

Electronic Systems Division: SEPI 1 1991

Air Force Systems Command, USAF:Hanscom AFB, MA 01731-5000: C

Contract No:F-19628-88-D-0028

CDRL 00850Peer Review Capability Description

February 2, 1990

The Boeing CompanySpace and Defense Group 00

Boeing Aerospace and Electronics V "[

P.O. Box 3999 iz gSeattle, Washington 98124

Approved for public release - disfribution is unlimited

Peer Review Capability Description)61 3-20850

909 4046

REPORT DOCUMENTATION PAGE [ Form ~frovedrnoic ttpov, b~ovowtO *,$ ns oiicm ntra~k OeWn to iVWA;* I hW: Pat I&SPOr". 9=0Aq M bne 0 IeWWXI Vnf~u=%t. SW~inq W.53n; oa sOwI. qarflr arbc mantannt he Oita n40. A-1Cnopen alnee~wo N* Icscoolnoa.Srd ccm-nntoreg*.ig hs bwden .- niole 0: any doN =9_C acI S cto o l rtbrma.oWI gion somIt reduoti N bxnder,.I *aSNlbn~ Hoai~jaie'sSe-~1=1 f~or'a nbrmaoa.o O*-p& s . Rap~ot. 1215 form~ Dam io say. So 1204. Anintz VA 2=24MD~ av be* Me~ cd Magenr and Bu~ Pa~twokdcwt. t Plooed (C704.OI6S.. VWa~I3W

I. AGENCY USE ONLY (LesvebfJnk) 2 REPR 02-FEB9 3. REPORT TYPE AND DATES COVERED

4.71LE AND SUBTITLE I 2FB&0S FUNDING NUMBERS

Peer Review Capability Description C: -F19628-88-D-0028

6.AUTHOR S)--

Margaret J. Davis TA: BR-40

7. PERFORMING ORGANIZATIDN NAME(S) AND ADDRESS(ES) 8.PERFORMING ORGANIZATION

The Boeing Company REPORT NUMBER

Boeing -Aerospace and-Electronics DivisionSystems and Sc'ftware Engineering D-613- 20850P.O. Box 3999

-Seattle, Washington 981249 SPONSOTRNG1 MON.TORING AGENCY NAME(S) AND ADDRESS(ES) 10. SPONSORING IMONMT0RING

ESD/AVSAGENCY REPORT NUMBER

Bldg. 17-04Room 113

- Hanscom Air Force Base, 01731-5000II. SUPPLEM~ENTARY NO7ES

121. [XSTRIBU7ION! AVAILABILIY STATEMENT 12b. DISTRIBUTION CODE

Approved for public release - distribution unlimited. A

13. ABSRACT (MhzilllI200 wod)

This document describes the prototype peer revidw, capability that was developed aspart of the BR40 Repository Integration task. The peer review capability uses apublic domain structure editor to support the peer review of Ada source code. Thecapability includes an Ada program to translate Ada source in ASCII text to theintermediate form used by the editor. The editor supports embedding peer commentsin the Ada source in a form that is acceptable to -an Ada compiler and processableby a SGML parser.

Besides describing the source peer review capability, this document containsrecommendations for use on a repository and for productization.

14. SUBJECT TERMS 15. NUMBER OF PAGES

Keywords: STARS 23peer review 13. PRIC.E CODE

structure editor17. SECURITY CLASSIFICATION 18.S SCURITY CLASSIFICATION 19. SECURITYCLASSIRICATION 20.1LIMITATION OF ABSTRACT

OFREPORT 0FTHfS PAGE OFABSTRACT

Unclassified Unclassified Unclassified None

NSN 740.0.2805500Ptbed. by ANSI Sid 239-18

296-102

STARS The BOEING Company CDRL-00850.D613--20850

Peer Review Capability Description-

Pr._pared byMargaret J. -DavisChief Programmer (R40)

Reviewed byJames E. KingSystem Architect

Reviewed byJohn M. NeorrDevelopment Manag~er

Approved byWilliam M. HodgesSTARS Program Manager

Peer Review Capability D~escription1)61 3-20850)

STARS The BOEING Company CDRL 00850

ABSTRACT

This document describes the prototype peer review capability that was developed aspart of the BR140 Repository Integration task. The peer review capability uses a publicdomain structure editor to support the peer' review of Ada source code. Thecapability includes an Ada program to translate Ada source in ASCII text to theintermediate form used by the editor. The editor supports embedding peer commentsin the Ada source in a form that is acceptable to an Ada compiler and processable bya SGML parser.

Besides describing the source peer review capability, this documents containsrecommendations for use on a repository and for productization.

KEYWORD STRINGS

peer reviewstructure editor 0

AceeSftloa Yor

TA I&~setmaed .

Just iflottat 1.,

By.Distributl-l/ _

Av ilabllity Codes

Dl~t]$elEst sporci~A

Peer Review Capability l)cscription1)61 3-20850 3

STARS The BOEING Company CDRL 00850-

PREFACE

This document describes the fourth and fiial version in the series of prototypes of apeer review editor for Ada source code.

Note: The contents of this document are available in electronic form from a STARSrepository.

Peer Review Capaiility Description1)613-20850 4

STARS The BOEING Company CDRL -00850

TABLF OF CONTENTS

Section -1

SCOPE1.. ................................................... 6

Section2

RlIFFREN(:EI D)OCUMENTS.................................... 7

Section 3

USERjGUI)E TO A1)A1PERMACS -OPERATION..................... 8

3.1 Operational Concept......................................... 83.1. l asic Notions........................................... 83.1.2 T'ypical E~dit. Cycle....................................... 10

3.2 Functionality................................................13..1Tree editing and Motion -Functions........................... 13

31.2.2 Other Useful Functions.................................... 163.2.3 Templates............................ ................ 16

Section 4-

RECOMMENDATIONS....................................... 19

4.1 Lessons L earn~ed................................................194.1:. Regarding GNU -Emacs................................... 194.1 .2 Regarding Structure Editing................................ 194.1.3 Regarding Editor Presentation.............................. 20

4 2 Suggestions for Repository Installation........................... 214.3 Suggestions for -Further Work......................... ........ 21

P'eer Review Capability D~escription~1)613-20850 .5

STARS The BOEING Company CDRL 00850

1. SCOPE

The purpose of this document is to describe the prototype peer review capability forAda source code that was developed as part of BR40 Repository Integration. Besidesdescribing the operation of the prototype, this document contains information related toinstallation on a repository and recommendations for further work.

One objective of the STARS Program is to institutionalize peer review of source codeand technical documentation as part of the system development process. Thisprototype tool tests the concept of a folded tree editor to support on-line peer reviewof Ada source code.

The capability, named AdaPEERmacs was developed from a public domain editorknown as GNU l:macs IGNUI. The tree editing functions were obtained from theUniversity of Illinois. Basic descriptions and motivational material for tree rather thanlanguage-sensitive or syntax-directed editing are covered by I'RI-E].

Section 2 lists referenced documents; Section 3 describes the prototype operation in theform of a user guide; and. Section 4 contains recommendations.

Peer Review Capability Description1)61 3-20850 6

STARS The BOEING Company CDRL 00850

2. REFERENCED DOCUMENTS

This section lists all documents referenced herein.

[GNU] "GNU Emacs Manual", Fifth Edition, Emacs Version 18, October 1986,Richard Stallman.

tTREE] "The TREEMACS tree editor and its applications", Computer ScienceDepartment, University of Illinois at Urbana-Champaign, Samuel Kamin andDavid Hammerslag, -Draft January 5, 1989.

I2nd] "Ada as a second language", Norman H. Cohen, McGraw-Hill BookCompary, 1986.

Peer Review Capability Description)61 3-20850 7

STARS- The BOEING Company CDRL 00850

3. USER GUIDE TO ADAPEERMACS OPERATION

3.1 Operational Concept

3.1.1 Basic Notions

The basic concept underlying AdaPEERmacs is the notion of maintaining the Adasource code and peer commentary in a tree-based intermediate representation. Theintermediate representation stores nodes as a single-rooted pre-order tree. Each nodemay have any number (f child subtrees and represents either an Ada languageconstruct or a peer commentary construct.

The display that the user sees uses indentation to indicate subtrees. Constructs with thesame amount of indentation are all siblings or cousins of siblings. For instance, in thecode fragment show below, the "with" and "procedure" constructs are siblings sharing a"comment" construct as their parent. The "while" construct is a cousin to "begin --I.ineSum' since their parents ("begin -- SumASCILCodes" and "function" construct)are siblings.

-- This is page 458 from Ada as a [2ndl languagewith BasicjO; use BasicjO;procedure SumASCII_odes is

Sum : Natural := 0;Length : Natural;I.ine " String( 1 ..I32);function l.ineSum (Line : IN String) return Natural is

Result: Natural := 0;begin -- LineS-um

for i in l.ine'Range.loopResult := Result + Character'Pos(Line(i));

end loop; -- for loopnull:

return Result;end LineSum;begin -- SumASCII_Codes

while NOT lEndOfFile loopGet.l ine(Line, Length);Sum := Sum + Line.Sum(ine=>l.ine(l..Iengih));

end loop: -- while loopPut(Sum):Newjl ine;

end SumASIL _Codes; -- procedure body

Peer Review Capability )escription)613-20850 8

STARS The BOEING Company CDRL 00850

The major difference between a syntax-directed editor and AdaPEERmacs is thatAdaPfEERmacs does not require that the tree be syntactically and semantically correctAda. The construct insertion functions support entering the correct syntax because theyuse a strategy of user prompting and template insertion, but they do not enforce Adasyntax. Syntactic and semantic checks are user initiated by invoking a command thatsends an ASCII representation of the tree-io an Ada compiler. This is a compromisebetween the minimal support that an experienced Ada programmer would desire in aneditor and the maximal support that a novice Ada programmer would receive from asyntax-directed editor.

The notion of a folded display is also critical to comprehending what AdaPEERmacsputs on the screen. The AdaPEERmacs display may hide subtrees just as if someonefolded a piece of a paper to cover up portions of printed material. The text below is-afolded version of the code fragment previously displayed. The text for "functionLineSum" and the statements following "begin -- SumAS(IICodes" have beenfolded out of view.

-- This is page 458 from Ada as a I2ndI l.anguagewith BasicIO: use 13asicjO;procedure Sum_.ASCIICodes is

Sum : Natural := 0;Length : Natural;Line : String(1..132):function I oineSum (Line : IN String) return Natural isend l.ineSum;begin -- SumASCIICodes

end Sum.ASCIllCodes: -- procedure body

Storing the Ada program as node.% also permits AdaPll-ERmacs to maintain otherinformation about the source code beside.s the type of construct each node represents.Since one objective for this prototype is support of peer review., AdaPI-'RMA('S alsostores the login name of the person ,ho created the node, the login name of the personwho last modified the node, the date that the node was created, and the date that thenode was last modified. This admini.trative information is automatically displayed forpeer comments but not for Ada construct.%. I lowever, the date information can be usedto selectively display either Ada or peer commentary node. that have been entered ormodified after a specified date. Perhaps this administrative information vill be used ina future configuration control or repository asset management application.

This extra information AdalPElE-macs is maintaining can be u.sed to select to what isdisplayed on the screen. In the current ver.ion, there are functions that permit the userto selectively display (i) all node.%. which is the default: (2) only Ada nodes; (3) onlyAda PI)I. nodes; (4) only peer commentary; (5) only node-s that have modified datesdifferent than their creation dates: or (6) only node.s whose creation or modification

Peer Review Capability l)cscription)61 3-20850 9

STARS The BOEING Company CDRL 00850

date is later than a user-specified date. Nodes not selected for display appear asblank lines. This means that the tree-point cursor (and text cursor) will seem to stopat random spots when cursor motions are requested. For this reason, the bottom lineof the Adal'lE-ERmacs display gives information about the node at the current position.

Furthermore, since the GNU Emacs editor upon which AdaPEERmacs is based candisplay separate windows, AdaPEERmacs also provides functions to automaticallysplit the current window into two facing windows with different selective displays.(Facing windows means that the two displays appear as left-right facing pages in abook.) Commands that invoke tree cursor motion will automatically invoke cursormotion in all facing windows so that the pages will stay line-aligned. However, thisline alignment will be lost if tree-editing commands are invoked in any facing window.Because of tile control that the Emacs editor exerts over display of updated buffer., thetree cursor po.sition will always remain correct although the facing display may not becorrect. The display can be forced to stay synchronized with the tree cursor byrequiring keyboard input from the user as each facing display is updated. The currentprototype does not force synchronization.

The text below is an example of two facing windows where the left side displays onlyAda construct.,, and tile right side displays only peer commentary. (Note examplecontains -... where elision has been used in order to fit the display on the page.)

procedure Sum ASC...

Sum : Natural :- 0;1--Ipeercomment>i-- This is a sample commentI-- for demonstratio purposes1-- ICreatedBy> mjdavisI-- icreatedOn> Mon Dec 18...I-- LastModified_By>mjdavis1--ILast Modified On> Mon Dec 18...1--liPeercomment>

Length : Natural; ILine: String(l..132); Ifunction Line Sum... Iend LineSum; I

3.1.2 Typical Edit Cycle

The next tyro seLtions de.crihe editing .tarting with a blank display and starting with anon-hlank displa%. The . T,.l. " " before a character means the user holds downthe control key while entering the next character. The symbols M- means tile user

P1cer Review Capability )escription)61.3-208g50 I

STARS The BOEING Company CDRL 00850

enters the escape key.

Just as normal editors maintain a current cursor position for the text being entered,AdaPEERmacs also maintains a position -for the current tree node. The current- textcursor position is known as point and the current tree position is known as tree-point.

Each node of the tree may be thought of as a separate piece of text with its own point.GNU J-macs refers to these pieces of text as buffers. GNU Emacs commands thatposition the cur.or and enter text within a buffer are scoped within the text of the node.For example, the command that positions the text cursor at the beginning of a bufferwill position the text cursor at the beginning of the node's text. Two portioas of anode's display (it,; label and end label) are not within the scope of the node's text.These are %ynthesized I)y AdaPEERmacs from the node's level within the tree (thisalo%.., correct indentation), it, construct name, and possibl)y administrative informationor information derived from its; parent node. The most basic construct isada-statement. which has a label consisting only of indentation spacing and a closelabel of '". Other construct-; have more elaborate labels or close labels. F-orinstance, the label for peer comments is "--jIIeercomment> and its close labelcontains all the administrative information.

3.1.Z.1 Blank Display

Starting with a blank display, the goal is to insert Ada constructs, to create an Adaprogram.

I. Since the tree representation starts with a sin!e riol. it is convenient iti beginby inserting an Ada comment. 'his is acccomplished l)y entering the keysequence (-cC-t-" or "M-x ada-comment". AdaPEiERmacs will create anode labeld 'ada-comment. will update the display with 3 lines starting with-- and then position the text cursor at the middle line after the -- "he

user may then enter text for the comment.

2. "lhe next step is to enter an Ada construct. Ihe key sequence specifying atemplate ('C-c("-t)- may be entered followed by the key indicating whichtemplate is desired or the key sequence 'M-x" followed by the desired constructname may be entered. AdaPlEl-Rmaes will prompt for the information neededit) fill in the template and will ask if the template is to he inserted a, nested ornot. Responding 'y" will create a child nide and responding n will create asibling node. Since the tree only contains a root node. respond '" to create achild node. Note that one template may generate multiple tree nide. Forinstance, the ada construct ada-function-ody will in.ert a node for itself, anada-declare node Cor its return value declaration, an ada-begin-ntend node.and ada-statement node whose text is 'return RISUI'i'.LNAMi - and anada-statement node whose text is 'null-. The template in.sert these as childrenor siblingt nodes as is appropriate io represent the control or declaration flow

Peer Review Capability l)Description)613-2085(0 I1

STARS The BOEING Company CDRL 00850

each construct represents.

3. All the remaining steps repeat the template invocation (step 2). There are keysequences for positioning the current tree-point where the user desires to insertthe template. "C-cC-yu" moves up the tree "ia children and siblings;"C-cC-yd" moves down the tree via children and sibling (depth-first motion).Both of these sequences may fold/unfold the display. The sequences"C-cC-yC-u" and "C-cC-yC-d" move more quickly by only Moving sibling tosibling (breadth-first motion).

4. The editor may be exited and the file saved by entering C-xC-c.

3.1.2.2 Non-blank Display

Starting with a non-blank display of Ada source, the goal is to enter peer reviewcomments.

1. The first step is to position the tree-point at the construct to which the commentwill apply. "C-c('-yu" moves up the tree via children and siblings; "C-cC-yd"moves down the tree via children and sibling (depth-first motion). Both ofthese sequences may fold/unfold the display. The sequences "C-cC-yC-u" and"C-c'-y(-d" move more quickly by only moving sibling to sibling(breadth-first motion). At the beginning of an editing session the tree-point ispositioned at the root. The last line of the display lists the construct of thetree-point and its creation date.

2. The next step is to enter an ada-peer-comment cunstruct. The key sequencespecifying a template ("C-cC-t?") may be entered or the key sequence "M-xada-peer-comment" may be entered. AdaPElERmacs will put the label andclose label for an ada-peer-comment on the display and position the textcursor after a middle line contain '[he text for the comment can now beentered. Every time a "Return" key is entered, the text will be updated with anewline containing the necessary amount of indentation space and a "--" If thetree-point where the comment is to be inserted is ,an ada-peer-comment oralready has a child that is an ada-peer-comment, the template will insert aconstruct known as ada-peer-followon. This allows a history of comments tobe collected.

3. All the remaining steps repeat the steps I and 2.

4. The editor may be exited and the file saved by entering C-x('-c.

Peer Review Capability l)escription1)613-20850 12

STARS The BOEING Company CDRL 00850

3.2 Functionality

3.2.1 Tree editing and Motion Functions

The tree editing commands and motion functions that can be invoked by enteringCTI -C followed by CTL-Y followed by the key identifying the function are (note thatthey can also be invoked by M-x followed by function name):

"p" !parent -- Move tree cursor (tree-point) to parentnode

"u" !up -- Move tree cursor (tree-point) to next node upin tree (left sibling or parent node)

"C-u" !up-condensed -- Move tree cursor (tree-point) toparent or left sibling node

"C-d" !down-condensed -- Move tree cursor (tree-point) toright sibling node

"'d" !down -- Move tree cursor (tree-point) to next nodedown in tree (child or right sibling)

"c" !child -- Move tree cursor (tree-point) to child node

"I" !left -- Move tree cursor (tree-point) to leftsibling node

r !right -- Move tree cursor (tree-point) to rightsibling node

"C-f" !char-right -- move text cursor 1 character to rightin current node

"C-b" ichar-left -- move text cursor 1 character to left incurrent node

'.c-p" !previous-line -- move text cursor to preceding linein current node

"c-n" !next-line -- move text cursor to following line incurrent node

"C-l" !redraw-display -- redraw the display

Peer Review Capability Description)613-20850 13

STARS The BOEING Company CDRL 00850

T" !goto-root -- move tree cursor (tree-point) to treeroot node

"e" !tree-edit-current-node -- edit the subtree rooted atthe current node in a separate window (exit by enteringM-C-c)

"g" !goto-node -- go to a specific node

"#" !set-tree-mark -- set the value of mark

"c" !mark-current-node -- remember this node as mark

"M-u" !update -- update the tree with all changes

"E" !show-all -- Make the display show all the nodes

"A" !show-ada -- Make the display show only Ada nodes

"P" !show-adl -- Make the display show only Ada pdl nodes

"C" !show-comments -- Make the display show only peercomments

" !show-modified -- Make the display show only nodeswhose modified date is not the same as created date

"D" !show-after -- Make the display show only nodeswhose created or modified date is after a specified date

"FE" !face-all -- Split the current window into two facingseparate windows and display all the nodes in the new window(exit by entering M-C-c)

"FA" !face-ada -- Split the current window into two facingseparate windows and display only ada nodes in the new window(exit by entering M-C-c)

"FP" !face-adl -- Split the current window into two facingseparate windows and display only ada PDL nodes in the newwindow (exit by entering M-C-c)

"FC" !face-comments -- Split the current window into twofacing separate windows and display only peer commentarynodes in the new window (exit by entering M-C-c)

Peer Review Capability Description)613-20850 14

STARS The BOEING Company CDRL 00850

"FM" !face-modified -- Split the current window into twofacing separate windows and display only modified nodes inthe new window (exit by entering M-C-c)

"FD" !face-after -- Split the current window into twofacing separate windows and display only nodes created ormodified after a specified date in the new window (exit byentering M-C-c)

Other motion and tree editing commands that are only invoked by M-x followed by

function name are:

!delete-tree -- delete the current node and its subtree

!read-over-root -- replace the root node with the specifiedtree from a file

!write-tree -- write the entire tree to disk in both an asciiAda format and its intermediate AdaPEERmacs format

!read-child -- read a tree from a file and add it as a childsubtree of the current node

!write-subtree write the tree rooted at the current node todisk in both an ascii Ada format and its intermediateAdaPEERmacs format

!tree-kill -- delete the subtree rooted at the current node,saving it for later yanking.

!tree-yank -- add a copy of the most recently killed tree asa subtree to the current node

Node text motion commands that may be invoked by the following identifying keysequence (or by entering M-x followed by function-name-) are:

"M-<" !beginning-of-node -- move text cursor to beginning ofnode's text

"M->" !end-of-node -- move text cursor to end of node's text

"C-b" !backward-char -- move text cursor 1 character to left

"C-f" !forward-char -- move text cursor 1 character to right

Peer Review Capability )escriptionf)613-20850 15

STARS The BOEING Company CDRL 00850

"C-p" !previous-line -- move text cursor to preceding line

"C-n" !next-line -- move text cursor to following line

"C-a" display-pretty-printed -- show the entire tree as anascii file in a separate window

3.2.2 Other Useful Functions

Other useful functions that are invoked by entering a specific key sequence or byentering M-x followed by function-name are:

"C-a" display-pretty-printed -- show the entire tree as anascii file in a separate window

"C-g" quit -- discard/abort current command

"C-hC-h" help-for-help -- display an explanation of helpfunctions available

"C-xo other window -- move to the next window (that's aletter o not a number 0)

C-xl delete-other-windows -- close all windows but thewindow where the cursor is located (that's a number 1 not aletter 1)

"C-xC-f" find-file -- find a file (and open it for display)

"C-xC-c" save-buffers-kill-emacs -- offer to save eachmodified file and then exit.

3.2.3 TemplatesAll templates are invoked by entering CTRL-c followed by CTRL-t followed by

template identifier key.

"h" ada-header

ada-comment

"C-a" ada-array

"A" ada-accept

Peer Review Capability Description1)613-20850 16

STARS The BOEING Company CDRL 00850

"a" ada-stmt

"b" ada-exception-block

"D" ada-declare-block

"d" ada-declare-stmt

"c" ada-case

"C-e" ada-elsif

"e" ada-else

"C-k" ada-package-spec

"k" ada-package-body

"C-n" ada-en.try

"C-p" ada-procedure-spec

"p" ada-subprogram-body

"C-f" ada-function-spec

"f,, ada-for-loop

"i." ada-if

"I" ada-loop

"o" ada-or

"C-r" ada-record

"C-s" ada-subtype

"s" ada-select

"S" ada-separate

"C-t" ada-task-spec

"t" ada-task-body

Peer Review Capability )escription)613-20850 17

STARS The BOEING- Company CDRL-00850

"C-y" ada-type

"C-u" ada-with-use

"C-v" ada-private

"C-w" ada-when

"w" ada-while-loop

"C-x" ada-exception

"x ada-exit

I"ada-pdl

?" ada-peer-comment

K'ada-peer-response

Peecr Review CapabilIit~y D~escription1)61 3-20850) 18

STARS The BOEING Company CDRL 00850

4. RECOMMENDATIONS

4.1 Lessons Learned

4.1.1 Regarding GNU Emacs

Our expectations regar:., k'.'e extensibility and power of GNU Emacs were fulfilled.Adding new co'imar .- L r..Jing commands to keystroke combinations, replacingcommands, -and ad,'" .,7 'e; !', ,ew commands are all relatively simple modifications.However, the buffer/w, 1. . ", metaphor that GNU Emacs -uses :s not as conducive tofacing page editing as we ,oped, but we used Emacs' extensibility to overcome most ofthe problems.

The remaining problem ':.., the omount of control GNU Emacs exerts over d'splayupdating interferes .ith ke ping the f.tcing displays synchronized as a user scrolls. Thedisplay may not be updated to reflect the actual cursor position. Requiring keyboardinput from the u:,e, in the form of question-response can force the update, but otherinformational messages may mask the questions. The user can also force an update byswitching to the facing display and requesting a display update. Perhaps it would bebetter to abandon the concept of automatically keeping the facing displays synchronizedand leave display scrolling entirely to the user. This solution is the one used by highperformance workstations that provide multiple, simultaneous editing sessions on thesame file by the same user.

4.1.2 Regarding Structure Editing

The l:mac.. vxtensions we used from .oftware furnished by the University of Illinois[TREE] pro ded thlie basic capability fur editing the Ada source code as a tree of Ada

language construct.,,. Since checking conformance of the Ada source code to L,., ectsyntax and semantics is not part of structure editing, selecting the optimum le'el ofabstraction for the Ada language constructs was the most difficult task. We chose thelevel of abstraction that is used iy prcttyprinters (flow of control and declarations).Whether this is optimum or not will have to be tested by deployment.

Structure editing has some similarity with context sensitive editing (such as DIANAsupports) in that the editor is maintaining information about the structure. Thesoftware provided by the University of Illinois enabled us to also associateadministrative information with each construct represented in the tree. Thus, we wereable to customize the editor to selectively display only certain construct: (Ada, Adacomments, peer comments. etc) and to selectively display by creation and modificationdates and user identification. This information would be relevant to tools that wereresponsible for tecess control and configuration or asset management. If the STARSinfrastructure were to be standardized on DIANA or IRIS as an intermediaterepresentation, it would be useful if' the* editor supporting the intermediaterepresentation also automatically collected the administrative information.

Peer Review (:apa)ility Description)613-20850 19

STARS The BOEING Company CDRL 00850

4.1.3 Regarding Editor Presentation

AdaPE3ERmacs implements several techniques in its display:

explicit structure presentation,selective presentation,folded page presentation, andfacing page presentation.

We mimicked the indentation style of prettyprinters to reveal the structure of the Adasource code. It seened most comfortable for an experienced programmer. Thischoice also let us partially support some of the Ada syntactic rules as an aid to noviceprogrammers vhile not constraining experts. / person entering code should be able toconcentrate on the "what" of the program bei, Z built rather than on the "what" of theAda syntax. Most of the syntactic support is L.:ing piovided by the st;,rt and end labelsprovided for each construct. Beginning keywords, such as "loop", are usually assignedas the start label. The Ada statement terminating ";" along with ending keywords areusually assigned as the end label. The only subtlety in creating this type of indentedstructure presentation i.s the correct display of nested control such as loops withinloops.

Sin,.e structure editing requires an intermediate form wherein information about thestructure is stored, selective presentation is easily implemented. The major decisionrelative to selective presentation is the treatment of material not to be displayed. Wechost, to use blank lines and provide feedback to the user as to cursor position. This isparticularly uscf"i when the cursor is stopped over blanked out areas. This choice wasmade in order to lacilitate facing page presentation

The folded page presentation is also a direct consequen,. .,f tree editing. It can bedisconcerting at first when a command to scroll radically changes the display.However, this confusion is easily removed when the folded concept is e-p.in,,d. Weincreased the utility of the folded page presentation by providing tm ':- o, scrollcommands. One sets scrolls the tree in a depth-first fashion (unfolds) .nj .,: otherset scrolls the tree in a breadth-first fashion (does not unfold). Thi., gives the user achoice in the level of detail displayed. Folded page presentation should be even moreusefu! in document preparation and review because it effectively lets the user scroll anoutline of the docuim:n.

We used the capabilities of GNU -macs for splitting a terminal display into severalscreens to implement the facing page presentation. Facing page presentation isbasically a technique for visually synchronizing selective display,.. It i:. most effectivew%6en one page displays all material and the other displays sClected material. Wesucceeded in automatically keeping the displays synchronized mo:t of the time.. Morein-depth knowledge of GNU Emacs I/O handling would be required to achievesynchronization all the time. The blank line style we chose ',r selective display works

Per Review Capability Description)613-20850 20

STARS The BOEING Company CDRL 00850

well for facing page presentation of Ada source on one side and peer comments on theother because the comments are only associated with a few lines of text. (Refer to page10 for an example of this style.) This may not be satisfactory for peer comments indocuments. A more elaborate scheme that put the peer comment on tile facing pageline that is parallel to the top of the corresponding document element (section, chapter,paragraph, etc.) would be better. It would also insert blank lines after the documentelement if the peer comment required more lines than the document element used. Thisstyle is illustrated below:

Section x.y Recommendations

In light of the new... IThese are not new features.we recommend purchase. IThey are available from Ajax

ISoftware at a cheaper price.,

We also recommend purchase of In-house maintenance would bea maintenance contract from Icheaper and as good.the same company.

4.2 Suggestions for.Repository Installation

The prototype currently is based on a BSI) 4.2 version of GNU lmacs. Installationand trial use at the STARS repository would require porting the prototype to anexisting VMS GNU Emacs implemc: iation. It would also be useful to "bytecompile"as much of the modifications as pos..ible to improve its performance. (Most of themodifications are currently being "interpreted" by the GNU editor.)

It would also be desirable to put a user-friendly "shell" around the editor invocationthat would make the translation to intermediate form and back again invisible to auser. Some of this could be provided by GNU Emacs modifications and some by anoperating system command script.

4.3 Suggestions for Further Work

More work is needed in replacing the standard editor commands to correctly functionwithin a tree node's text. More work is also needed in checking that the deletion andcopying of subtrees works correctly. Presumably these functions were provided by thecode received from the University of Illinois, but we have not tested them.

A version that provided peer review entry for SGMl.-tagged documents would also beuseful. Such an editor would support creation of SGML-tagged documents whilehiding the cumbersome tags from the user's view. The start and end labels could beused for a limited type of WYSIWYG ("What You See Is What You Get")preszntation. Also, it would be beneficial to implement the more elaborate form offacing page presentation discussed in section 4.1.3 above.

Peer Review Caliability )escription)61 .')-20850 21

The Boeing Company

ACTIVE SHEET RECORD

ADDED SHEETS ADDED SHEETS

R SHEET NO. R SHEET R R SHEET R SHEET RSHEET E E NO. E SHEET E NO. E NO. E

NO. V V V NO. V V VL L L L L LT T T T T TR R R R R R

2

34567891011121314141617181920212223

)613-20850

THE BOEING COMPANY

REVISIONS

D)613-20850 23