
MELD: A Multi-Paradigm Language with Objects, Dataflow and Modules Gail E. Kaiser Columbia University Department of Computer Science New York, NY 10027 David Garlan Tektronix, Inc. Computer Research Laboratory Beaverton, OR 97077 December 1987 CUCS-281-87 Abstract This technical report consists of the two most recent papers from the MELD project. Melding Software Systems from Reusable Building Blocks describes MELD as a declarative language that combines facilities from the package library, software generation and object-oriented language approaches to reusability. MEWing Data Flow and Object-Oriented Programming emphasizes the multi-paradigm nature of MELD and introduces overriding of inherited facilities and generic features, and discusses compile-time error detection. Prof. Kaiser is supponed in pan by grants from AT&T Foundation, ffiM, Siemens Research and Technology Laboratories, and the New York State Center of Advanced Technology - Com­ puter & Infonnation Systems, and in pan by a Digital Equipment Corporation Faculty Award. When this research was conducted, Dr. Garlan was supported in pan by the United States Anny, Software Technology Development Division of CECOM COMMIADP, Fort Monmouth, NJ and in part by ZTI-SOF of Siemens Corporation, Munich, Gennany. Melding Software Systems from Reusable Building Blocks Gall E. Kalser. Columbia Ulliversity Dayid GanAD. Cantetie MeDoa Ulliversity cannot easily be expanded to meet unan­ ticipated needs. To realize the potential of larae-scale software reusability. three charactensucs urrent apprOKhes to software are reqwred: rewe have nO( lived up to reusa­ • Unauaae independence. to avoid C bility's pocaatiaJ to dramatically early implementation dedsions. Of improve software productivity and main­ course. every notation is a "Ianauaae." ThIs declamth>e tamability. but it is bat to avoid ronCfele representa­ TM shortCOftliIllS of the three m06t tions and control mu"ures until actual language taka the popular aPJ)foaches are discuued in the reuse. when the most effident solutions best /eatura from the bolt on p. ". The pnmary deficiency of can be chosen. three ,.., popular these approaches is that they tiahtly cou­ • Composition of components. to build ple reusable components to their oriainaJ larle software systems to meet complex reusabUlty~ con tal. Either tne reusable components requirements. Procedural invoation of but Ol'efComes their arc _ritlC1l In one l&nluaac and c:anftOt separately developed components works cully be rewed in aDOCber lanluaac or to some extent. but it does not promote /laws. It supports tbey implemau a specirlC abstract data rewe of larle-scale components. language independence, t )1)e aDd/or f uDCtion and c:annot euiJy be • Flexibility. to expand reusability component cOfl1POl!jitba, coaYaUd into the subtly c1iffemu require­ beyond the capabilities and appliations ments of another appliation - or even anticipated by the oriaina! implementor. and toUorfng. the oriJ1Dal appticarjoa - hen it is repaired MOQ ~0ICba reqwre that the complete or mhanad. Fun.bermore. the optioas for set of taiJorina options be dermed when the tlliorinia reusable component are deter­ reusable component is created. These rruncd _hen the component is wnllen and options are not always sufficient. July 1987 17 We have developed a new approach to ~oreover. unlike Ada packages. fea· guage or executed on a new architecture reusable software that has these three tures have the flexibility of classes. A fea­ simply by reimplementing the translator characteristics. The basis of this approach ture's interface impons a group of and runtime suppon. is Meld. • a declarative language that can features. making the classes exponed by Thus. Meld combines the advantages of be translated to an efficient implementa­ these features available within its Imple­ libraries. software generation. and object­ tion in a conventional programming mentation. There. an imponed class can oriented programming - without assum· language. be merged. either with a locally defined ing the limitations of these approaches. An entire software system can be writ­ class or with another imponed class. However. there are cenain important ten in Meld and then translated to the Merging has the effect of inheritance: issues in software reusability we did not desired programming language_ System One class inherits (reuses) all the facilities address. Meld is no better than the Widely maintenance is done with the Meld repre­ already defined for another class and can used approaches at helping programmers sentation rather than the implementation augment and replace any subset of these determine if a particular component IS language. Or an individual component can facilities. suitable for reuse in a particular applica­ be written and maintained in Meld. and its tion. Meld also does not address the sepa­ translation intearated into an application Action equations. Unlike classes, how· rate problem of catqorizinl and retrieving written in a conventional language. Thw. ever. features can combine. as weU as aug­ reusable components. but we are working old code can be combined with compo­ ment and replaA:e, inherited methods. This on this. USinl a conceptual clustering nents written in Meld. is accomplished by writing methods as approach derived from research in artifi­ action equations. Action equations should cial intelligence. Overview of Meld not be confused with mathematical equa­ tions. They were developed to extend Meld is an object~riented lanlUaae in An extended example that it suppons the encapsulation of data attribute p-amman for semutia procesI­ The imponant aspectS of Meld can be and operations as objecu defined by ina of proaramminl environmenu. I iIIwtrated with an extended eumple. classes and the inheritance of separately Actioa equations derIDe (1) me reWioo­ defined data and operations from ances­ ships that must hold amOI1l objects and M..", .......... Suppose a proaram· tor classes. In the context of object­ amon. partS of objects and (2) the mer wuu to implement a facility for load· oriented languaaes. such data arc called dynamic iDlmICtion amon. objects and in, and storinl arbitrary entities to disk. instance variables and such operations are b«weeD objecu and external qcnu (1UCh Traditionally. he miaht modify the entities methods. as users. tbe operatin. system. ud themselves to suppon memory manage­ But Meld hu two essential asP«ts that utilities). malt. Or he milht add the facility directly set it apan from other object-or"iented Ian­ When classes mer.e. separately to the runtime suppon of the program· guages./NtllfU and actio" ftlJMltioflS. inherited methods can be combined by min. Ianauaae. perhaps as a generic assipina them the same selector (the same puk.... Fn....... Fealu.ra arc rcu.sabIc buiJdina method name). Because methods define Neither approach promotes reusability. blocks. Like Ada packqa. their inter· relationsltips and dynamic interactiolU in In the first C&$C. memory manaaement is faces are separate from the imp&emalta­ the aband - u ICtioa equatiolU - specific to the entities. In the second case. tion. A feature bundles a colJec:tioa or rather thaD by • sequence of swemenu. the memory manaaer is reusable only in interrelated classes in iu impiemmtaDon. the behavior oftbe methods is combtDed the seDJC that a text editor or a compiler is: The interface uporu a subMt of thae implicilly. The resultin. compolite I use it today on one file. you use it tomor· classes and I subset of their IDllbodiI behavior doa no« depend on any sequen­ row on IIlOther me. This memory man­ tial ordainl of the methods. IJeT cannot be tailored to the particular I n effect. I (eaturt is a reusable I&Dk needl or the application. larger (hln I subroutiM. on appr'Ou. mat ely the wne scUe. u Ada pack.... I ..... ' ....... Meld is implcmcftted However. with Meld the prOl1ammer by truslaun. ach feature into a convas. COnJU'\ICU a reuaable buildin. block that (hat permits the reuII of the aJlM amon. tiona! prosrunmin. lanauqc and by be incorporated into any system that subroutines (methodI, aDd. in flit:l.1IDOftI a can S1*ial Nfttime mvironmalt thai supporu requires memory manqement. abstract datarypes (cIaIaes). A aeneric rea­ execulion or systems built from features. The Memory Manqer describes the (ure is similar to a aeneric !)Kk. because implanenwion world u seen (rom a simple memory the Inter(ac.c can be instantiated accordina We dIri¥ed the aJeorithma from prev;ous worll on software pnera­ manqcr's point or view. The world con­ to the requirements of the ~red appli. tion, specificaUy luauqe-bued editon, sists or a collection of memory-managed . cation. where performucz .. toad • handc:oded entities Iroupcd under a memory· editon I\u been ac:ttiC'Yed. manqcd rcoc. Eacb memory·managed This imi*mentaUon technique mswa entity hal a unique identifier, a disk loca· -nw cba~ ~ of •• ~ •••, "!IId ~ IMauaP independcnc:e and portability tion, a desianation or whether it is loaded wftl... Of "to __." Mad uo.uds rOf Mu1Itpk because all aimn. feat Urel can be in con Of not, and a time stamp rCllrcsent· EIIladatIOftS or LAIII\&IIII Dacn~. wl\ldl wu wUCSIed by o.nd ...... 0-. produced in a new implementation lan- in. the most recent acceu to it. 18 IEEE SOFTWARE What's wrong with the popular approaches Three approaches to software reusability have achieved Widespread use suo· routine Ilbranes, software generation, and oblect'Ortented programming None has achieved marked gains In productiVity outside of a small set of applI· cation
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages21 Page
-
File Size-