6"~lmput & Graphics, Vol, 2, pp, 235-239. Pergamon Press, [977 Printed in Great Britain
A NETWORK-ORIENTED LANGUAGE--A NEW APPROACH TO NETWORK DESIGN, USING INTERACTIVE GRAPHICS N. MAROVAC~ and W. S. ELLIOT2 'School of Computer Science, McGill University, Montreal, Canada, H3A 2L6. and 2Department of Computing and Control. Imperial College of Science and Technology. London SW7 2BT, U.K.
(Recei~'ed2 December1976) Abstraet--A language is proposed for the design of any network, using interactive graphics as an aid to the design process. The language, NOL-I, is a higher level problem-oriented programming language. It is based on the network definition language NEDLAN (see [1] and [8]) and associated mechanisms, and it incorporates definition, decision and control, dynamic graphical input and output and analysis statements. Combining all these statement types with due regard to ergonomic factors in the use of interactive graphics for designing networks, a network-oriented higher levee language to be used with interactive graphics is obtained. 1. ma'~oauc'noN 1.1 The pictorial view of interactive graphics Efforts have been devoted during the last decade to making interactive graphics simpler, easier to use and more effective. Some of this work has been applied to 'graphical' languages, although there has not been general agreement on what these should be, and from the point of view of solving real problems in CAD, the efforts have met with limited success, In our view one of the factors affecting this success has been that work was mainly concentrated on pictorial descriptions; interactive graphics has often been treated merely as a convenientmeansofdrawingpictures--as an automated drawing-board in fact. Gnatz[2], for example, stated "Computer graphics is nothing more than constructive geometry"; this quotation illustrates the great concern with line drawing and other constructs on the display. On the other hand, in the use of interactive graphics in CAD, three distinct activities have been defined (for example in [3]) as follows: (a) Interactive building of the model of a process which is to be designed or analysed; graphical input is easier and far less prone to error than the more conventional methods restricted to keyboard or punched card; as an illustration of this point Kamel and Liu[4] show how extremely effective graphical input may be in structural design, (b) Pictorial presentation of intermediate and final results to the designer of a process or artefact, in a form far easier to understand than long print-outs of numbers. (c) Fast and ready communication with, and run-time modification of, the user's programs. This is a most important aspect indeed in CAD and one to which, sometimes, not enough importance is given, In summary, interactive graphics should be treated as a very effective two-way communications transducer between the user (the designer if the application is to CAD) and the computer, mediating the conversation between the user and the computer program, 1.2 Fusing the pictorial definition and the process semantics Obsession with the pictorial view of interactive
graphics has resulted in artificial separation of the purely pictorial representation of a process from the non-pictorial attributes. When a process designer, for example, draws a part of his process on paper he also carries a mental picture of attributes, and some of these he often specifies on the drawing by explicit titles or in other ways. He may, having drawn one part, wish to specify all the non-pictorial attributes of that part, before moving on to another part. It follows that there would be considerable merit in fusing into one the purely 'pictorial' definition and the non-pictorial process semantics. In the case of network design this fusion has been assisted by the use of a single data and display structure[5] and by the use of the network definition language 'NEDLAN'[1]. A further step towards the unification of the pictures and the processes they represent is the network oriented language NOL-1 proposed in the present paper.
1.3 l~'splay calls and handlers Another factor affecting success in establishing 'graphical' languages has been limited understanding and communication between computer professionals, especially language theoreticians, and most practical CAD users. The formal theory of languages and automata has had little influence on display calls and handlers which are most commonly used in CAD to provide a form of 'graphical' language.
1.4 A 'universal' graphic language It has been suggested that there should be a 'universal' graphical language from which particular languages would be tailored; instead of particular problem-oriented languages developed special-to-requirement. Very different problems arise however in, for example, ship hull design and in networks, requiring different information structures and different languages for their problem-definition. In the following section we set out the requirements for a language oriented to one particular problem area-networks. 235
236
N. MAROVACand W. S. ELLIOT
2. REQUIREMENTSFOR A NETWORK-ORIENTEDLANGUAGE 2.1 Definition of 'network' We use the term 'network' to mean a physical or abstract system comprising a set of objects (items) and a set of relationships between them. This is a wide class, We introduce a restriction for practical purposes and consider only cases for which the pictorial representation is non-dimensional, i.e. in which the geometry of their representation does not affect the process in the system, We include for example PERT networks, communication networks and economic networks; networks representing structural lattices are dimensional and therefore excluded.
2.2 Language requirements The language should enable ~, user-designer to define a class of networks of curren! est, i.e. to specify the properties of all objects in ~work to be designed, their attributes, and the relat dps between these objects within the network, to ~ : a model of a particular network within the defined c i ,s, to request any analyses and to perform all necessary communication with the programs during continued evaluation of the network.
between himself and the programs in the computer bridges the gap between graphical programming languages and graphical conversational languages. This is particularly important as the designer can re-tailor the conversational language during the run, i.e. during the conversation with the computer, by means of the conversational language itself. NOL-1 is network-oriented; it is understandable by and dedicated to the discipline of the network designer. Its statements resemble the commands he would use in a conversational man-machine environment provided by programming in a non-problem-oriented language.
3.2 NOL-I statements NOL-I statements are concise and result in very compact, easy to write and read, programs, although the programs enable quite complicated communication language sentences. Many NOL-I statements have already been implemented and two examples are given below: INSERT
ELEMENT, NETWORK, SET
A user action which is meaningful during the exploration of one class of network may be redundant when used with another. A user must therefore be able to modify the syntax and semantics of his actions according to the class of problem in hand.
which means 'insert the element named ELEMENT into the set denoted by SET of the network denoted by NETWORK';
3. TIlE NETWORK-ORIENTEDLANGUAGENOL-I 3.1 NOL-I facilities The network oriented language NOL-I is for the design of any member of the wide class of networks defined above, making use of interactive graphics at all stages of the design process. It is a higher level problemoriented programming language which enables a network designer who is a non-computer specialist: (i) to define the structure and properties of networks of his interest, and (ii) to define and develop his graphical network desig-
which reads 'merge network nodes NODE 1 and NODE 2 into NODE 1'. The structure of the NOL-1 language is based on the network definition language NEDLAN and its associated mechanism[l]. It was noted in Ref. [1] that there exists a degree of similarity between NEDLAN statements and the declarative and data statements in, for example, FORTRAN, where they are used to define the type, structures and values of alphanumeric data. These data in turn describe a physical process which is investigated by the FORTRAN program. NEDLAN statements are used to define: (i) the nature and the structures of the networks; (ii) the properties and relationships of the objects in these networks; and (iii) the graphical (pictorial) aspects of the two-way user computer communication and the meaning of the user's actions. In view of this, other statements equivalent to the assignment, I/O, logical and control statements in a higher level programming language, such as FORTRAN, have been incorporated together with NEDLAN in NOL-I. The dynamic graphical manipulation statements such as to create an object, move a single or a set of connected objects (a sub-network) and so on, replace the assignment statements in FORTRAN. Statements used to recognise graphical interactive events relevant to network sematics--as, for example, a light-pen hit of a connection encountered whilst drawing another connection together with various network orien-
her-computer communication (conversational) language. Through this communication language the designer 'talks' to the computer in the process in which they are together designing networks. The designer can define different communication languages for different classes of networks, for different design techniques on the same class of networks, and for different choices of relationships between his actions and the corresponding responses. The language enables him to modify the structure of the types of networks of his interest and to edit the communication language, in a limited way, during run time. For example, he may wish to selectively enable or disable some requests to the computer resulting from his actions, In practice, this modification can be done either on-line or off-line without any changes in the program written in NOL-1 language by the network designer, This facility which enables the network designer to define and develop the graphic conversational language
MERGE
NODE 1, NODE 2, NODE 1
A network-orientedlanguage--a new approach to network design, using interactive graphics ted statements--play the role of decision and control statements. Graphical dynamic assignment statements--such as are used to assign values of attributes of networks parts, as well as graphical output statements to display the results of various analyses in the form of graphs, alphanumeric strings or some optical visors--serve the purpose of I/0 statements, General facilities for the calls to various analysis routines correspond to arithmetic statements and to internal functions of a higher level language (sin (x), log (x) for example). NOL-1 is the result of combining the above statements and facilities in a manner most consistent with ergonomic considerations in the use of interactive graphics for network design. 3.3 Structure and generality of NOL-I Though the structure of NOL-I somewhat resembles that of FORTRAN, it is entirely problem-oriented. The statements are brief, and indicate actions without specifying the different ways in which the actions are to be performed as determined by the different objects, NEDLAN provides the means for decisions as to how certain of the actions are to be performed. The NEDLAN mechanism: (i) analyses the structure of any item and the nature of the relationships in which the item participates in the class of networks being currently investigated (as defined previously by NEDLAN statements); and so (ii) provides a tool for obtaining any needed property information of the item. This facility introduces considerable generality and flexibility into NOL-I, as will be illustrated by the following two examples: MOVE OBJECT is an NOL-I statement. NEDLAN provides answers to the following questions: (a) does the object referred to possess a relative position? (b) if it does, what part of the representation of the object in the model of the network affects the relative position and where is this part stored in the representation of the object? The mechanism passes this information to the call which moves an object on the screen. If the object does not possess the property of relative position, then the request to move it is ignored. If it does possess the property, then the "MOVE' part of the software takes any necessary information to enable it to move the object. Furthermore, the NEDLAN mechanism can determine whether the object has any topological properties, and if so, how many, and how are these properties represented. Using this information the mechanism can determine the whole connected group, on which the MOVE software operates. The 'MOVE' process can thus be completely general; there is no need to have one call to move one-terminal elements, another to move two-terminal elements, and a separate call to move connections, and so on. The following example illustrates the point even further, and deals with sets of items. Suppose we wish to insert object A into the second set owned by another
237
object B. Again, the mechanism associated with NEDLAN analyses the structure of the object B to determine if it possesses two or more sets, and if so, which part of the structure is associated with the second set, and the whereabouts of this part in the structure; also, it checks whether the insertion of object A into the set of B implies any positional changes, i.e. setting some component of position of object A relative to object B. Having obtained all this information, the part of the software which inserts objects into sets of other objects can act accordingly. 3.4 Tailoring the communication language The semantics of some of the network designer's actions change as the definitions of items are altered. This was illustrated in [1] by the difference between connection lines in electrical lumped networks and communication lines in data communications networks. NEDLAN provides means for a network designer to tailor the graphical communication language to his needs; the designer can change the definition of networks and the visual command features, using NEDLAN, and can do so either when programminga software system in NOL-I or during the run of the system. 4. IMPLEMENTATIONOF THE LANGUAGE 4.1 Modes of operation NOL-I statements, graphical manipulation, graphical control, graphical I/O and analysis statements are mixed together in a program, with NEDLAN statements preceding any other type statements, in a network design interactive package. Any such package can be written and modified by an inexperienced computer-network designer. The NEDLAN definition statements may alternatively be extracted (left outside the program) and at run-time read into the program and compiled to produce an interactive package driving table; or an already compiled driving table can be read in [1]. This feature produces further flexibility of programs written in NOL-I. 4.2 Analysis statements Although we do not explicitly discuss here all the types of NOL-I statements, a few words should be said about the analysis statements in order to illustrate the way in which the full generality of network analysis is achieved in programs written in NOL-I. A general statement to perform an evaluation of a network has the form: ANALYS
PERT, VARSET, ANTYPE, ASTAGE, ASTATE.
This statement calls for a critical path analysis; the arguments either determine the type of the analysis or the next step in the analysis or a further step in the evaluation. They are defined as follows: PERT asks for critical path analysis. (If, for example, ACGAIN was used instead of PERT, a frequency response of an electrical network would be performed.) VARSET is an argument passed back by the analysis
238
N. MAROVACand W. S. ELLIOT
routine and determines which set of variables are associated with this analysis and which are to be displayed after the analysis is performed. They are displayed as light buttons to enable a network designer to ask for the desired results to be shown to him. For example, with the critical path of a network, the following variables are associated: EARLIEST EVENT TIME, LATEST EVENT TIME, TOTAL FLOAT and INTERFERING FLOAT. ANTYPE, ASTAGE, and ASTATE define the nature of the analysis, the further stage of the evaluation and the next state of the analysis, correspondingly. These arguments are used to determine further steps in the evaluation as well as the further re-entry to the same analysis routine, if needed, A detailed description of the purpose of these arguments and of the way they influence the flow of the evaluation process, and a fuller description of other types of NOL-1 statements will be presented in [6]. The ANALYS statement is general; when another analysis routine is developed (written in any language), it can easily be introduced in a software system programreed in NOL-1. The range of names of the first argument of the ANALYS statements is then expanded to include the name of the new routine. The other arguments, such as VARSET, ANTYPE, ASTAGE and ASTATE need to be defined for that routine. This is all that is required in order to embed the new routine into the programming system, The analysis features of- NOL-I comprise mainly of the existing self-contained analysis routines within the system. A proposal for some novel analysis features in NOL-I is made below in section 5.
bet in the set and pass it back in NXTADR when any member of a set is known (defined by ADR)'. FNDSET MEMBER, SETOWR, 'find the object owning the set and pass it back in SETOWR when any member of the set is known (defined by MEMBER)'. The third level is the network-oriented level, and it is built upon the second level. It is completely machine and information structure dependent. It comprises statements such as: URCNCT CONECT, DELTAX, DELTAY, 'update the shape of a connection defined by CONECT, to new x and y displacements DELTAX and DELTAY correspondingly'. and the previously mentioned statement: MERGE NODE 1, NODE 2, NODE I The implementation of NOL-1 in three levels enables a user, if he wishes, to program at either one of the three existing levels, or he can program on all three levels at the same time should he, for example, wish to change some of the network-oriented third level statements. The three-level implementation also makes it easy and simple to transport from one machine configuration to another, whereby only the first level, which is reasonably small, needs to be re-programmed. The present implementation of NOL-I is not based on a compiler--which would require greater implementation effort--but as a macro library superstructure over the DEC PDP-15 assembler. When a user writes a program in NOL-1, the macro library precedes his program at macro assembly, and his program is expanded to calls to executive NOL-I routines. The user need not be aware of this; as far as he is concerned, he performs a straightforward compilation. s. nyrtr~ WORg--Acor~cra,r oF A UNtV~RS~ NETWORK DESIGN LANGUAGE
4.3 3-Level implementation The language is presently implemented on a DEC PDP-15 24k computer and a DEC VT-15 display. It is developed in three levels, The first level is the basic display and manipulation level, and in the present implementation is programmed directly in DEC PDP-15 and VT-15 display assembler language. It comprises calls, such as to set the local display intensity and to create line vectors. Examples of calls in this level would be: SITLOC ADDRESS, ILEVEL, 'set the intensity level given by ILEVEL at the location given by ADDRESS'. FDPPOS X, Y, 'determine the current display spatial position on the screen', The second level is the NOL-1 information structure level. The information structure is a network oriented single data-display structure[5, 7]. This second level is built as a super-structure on the first level; as such it is completely machine-independent but obviously datadisplay structure dependent. It comprises statements to traverse through the structure and for manipulation within the structure. It contains calls such as: NXTBLK ADR, NEXTADR, 'find the next mere-
NOL-1 as described and implemented, is an openended set of statements. Its only restriction, as we see it, is in mathematical processing power. Its analysis power is restricted to the existing self-contained, special purpose analysis routines, such as to perform critical path analyses of a project network or frequency analyses of an electrical network or to obtain the time response of a digital network. This means of course that a user can only do the analyses for which the routines have been built in and then of course only within the scope of these routines. To remove this restriction, two alternatives have been considered: Firstly, the language could be extended to include a set of basic mathematical statements which would be required for on-line conversational analysis, such as invert a matrix, multiply two matrices, calculate the integral of a function over a defined interval, find the solution of a matrix equation Y = A X + BZ, and so on. The alternative would be to develop a universal network design language by a suitable mixing of NOL-I and a high level conversational mathematical language such as APL. The language would still comprise ANALYS statements to call any existing special purpose analysis routines, but also it would enable the user to improvise during a session a flexible analysis of a network, which
A network-oriented language--a new approach to network design, using interactive graphics had been built up interactively on the screen. The user could thus combine fixed and flexible analysis routines to satisfy his network evaluation needs as they arise. He could start the evaluation with one of the existing fixed routines and after some point could go further using the APL type mathematical statements, Implementation of such a language need not be complicated. It could be achieved if NOL-1 is implemented on a machine having APL or if NOL-1 is running on a display computer satellited to a host machine on which APL is implemented. Then if a suitable interference between APL and programs in NOL-I is designed--such as to enable access to the working space of APL--the matrices of networks built interactively by NOL-I packages can be passed to the APL working space. This would enable a network designer to switch to and from APL as need arises during his progress round the designevaluation loop. He would have a powerful tool to assist him in this progress.
6. CONCLUSION A network design language to be used with interactive computer graphics has been presented. The language enables a network designer to define the various classes of networks of his interest, to use interactive graphics to help specify each particular network in a given class, to analyse these networks in various ways and to observe the results of the analyses on-line in visual forms. It also enables him to tailor to his needs a communication
239
language to be used in the dialogue between him and the computer during the design session. Acknowledgements--The research reported in this paper was initiallysupported by S.R,C. of Great Britain, and is supported at present by N.R.C. of Canada. The authors wish to express their thanks to both institutions. ~rv_,nv~c~ I.N. Marovac, A method for defining general networks for CAD, using interactive computer graphics, Comput. J. 17, No. 4(1974). 2. R. Gnatz, On the basic concept of higher graphic languages, Graphic Languages, Proc. [FIP Working Con[erence on GraphicLanguages, Vancouver 1972 (Edited by F. Nake & A. Rosenfeld). North Holland, Amsterdam t1972). 3. N. Marovac, The use of computers and interactive graphics for the design of general networks. Ph.D. Thesis, London University (1973). 4. H. A. Kamel & D. Liu, Application of the finite element method to ships structures, Comput. & Struct. l. 103-130 (1971). 5. N. Marovac, A single data-display structure: a new view on interactive computer graphics in CAD, Comput. J. 16 tMay 1973). 6. N. Marovac & W. S. Elliott, The structure and semantics of NOL-1, a network oriented design language using interactive graphics(to be submitted). 7. N. Marovac, A Network Oriented ln[ormation Structure; Networks.Semantics and Structures, Report 73/7 of the Networks Laboratory, Department of Electrical Engineering, ImperialCollege, London (March 1973). 8. N. Marovac, The structures of the network definition language NEDLAN. Its use in defining networks in CAD using interactivecomputer graphics, Comput. &Graph. 2,23-29(1976).