United States Patent Application20040015833
Kind CodeA1
Dellarocas, Chrysanthos Nicholas ; et al.January 22, 2004

Computer system and computer implemented process for representing software system descriptions and for generating executable computer programs and computer system configurations from software system descriptions
Abstract
A computer software system includes interdependent collections of software components. That is, at the architectural level, software components and their interdependencies are two distinct equally important entities. The software components represent the core functional pieces of an application and deal with concepts specific to an application domain. Interdependencies relate to concepts orthogonal to the problem domain in most applications, such as transportation, sharing of resources and synchronization constraints among components. An architectural description language which represents activities and dependencies between activities as separate entities. Dependencies are managed by coordination processes associated with the dependency. Activities and dependencies are connected through ports which encode interfaces between activities and coordination processes. The language may also represent resources which may be understood as the output of some activity beyond the scope of the system. Each entity, i.e., activity, dependency, port or resource, may also have attributes which are name value pairs, specifying additional information about the entity. Attributes may be inherited. That is, activities and dependencies may be specialized into particular versions of an activity or dependency. The attributes for a particular activity are inherited by its specializations. An editor repository and design assistant may be based on this language to provide a system that automatically generates executable code.

Inventors:Dellarocas; Chrysanthos Nicholas (Boston, MA), Malone; Thomas W.  (Weston, MA)
Correspondence Name and Address:FEDERAL RESERVE PLAZA 600 ATLANTIC AVENUE
WOLF GREENFIELD & SACKS, PC
BOSTON
MA
02210-2211
US
Series Code:002480
Filed:November 1, 2001
U.S. Current Class:717/106; 717/107
U.S. Class at Publication:717/106; 717/107
Intern'l Class:G06F 009/44

Claims


What is claimed is:
1. A computer-implemented method for automatically generating computer code for a software system from a representation of the software system, the method comprising for editing representations of software systems, comprising: identifying at least one associated computer program for each activity and dependency for implementing the activity or managing the dependency, wherein the representation is defined by activities, dependencies, and ports through which activities are connected to dependencies; and combining the associated computer programs to provide the computer code for the software system.

Description



CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a continuing application which claims the benefit under 35 U.S.C. .sctn.120 of copending application Ser. No. 08/820,913, filed Mar. 19, 1997, and under .sctn.1119(e) of prior provisional application serial No. 60/013,694, filed Mar. 19, 1996, which are hereby incorporated by reference.

FIELD OF THE INVENTION

[0003] The present invention is related to computer systems and computer implemented processes which allow a user to define representations of software systems. The present invention is also related to computer systems for storing multiple alternate implementations of computer programs. The present invention is also related to computer systems and computer implemented processes for generating computer program code from a high level description of a software system.

BACKGROUND OF THE INVENTION

[0004] The design and specification of software systems has been studied from many perspectives. Research in software architectures has lead to several languages for architectural description of software systems, including representing architectural taxonomies and specific software architectures.

[0005] Software development research has provided a variety of approaches to building software systems, including module interconnection languages, open software architectures such as software bus architectures, object oriented programming, coordination languages and application frameworks. An application framework includes an application programming interface and a set of protocols that guide the way calls to the application programming interface should be used inside components. Research in software reuse has also resulted in the development of software schemas such as the Programmer's Apprentice, and program transformation systems which translate programs between computer programming languages.

[0006] Other areas of research in software development include operating systems and concurrent and distributed systems. Additionally, numerous computer related software engineering tools, i.e., automated tools that support various phases of software design and development, also have been developed.

[0007] The present invention applies coordination theory to the representation of software systems. Coordination theory focuses on the interdisciplinary study of the process of managing dependencies among activities, in particular, business processes, operation research, organization theory, economics, linguistics, psychology and computer science. Coordination theory has been used as the basis for a representation and design of business processes in a process handbook, as described in PCT publication WO94/19742, published Sep. 1, 1994, also incorporated by reference. This reference does not discuss entities such as ports and resources as described below and how to generate executable code or system configurations from process representations.

[0008] Current programming languages and computer system design tools fail to recognize component interaction as a separate design problem, orthogonal to the specification and implementation of the core function of a component. That is, many software components have the built in assumptions about coordination, interoperability and architectural characteristics. Given a set of software components, designers typically either have to modify the code of existing components or have to write additional coordination software that bridges mismatches among components. Such mismatches include low level interoperability mismatches, such as differences in expected and provided procedure names, parameter orderings, data types, calling conventions and other interface mismatches. Another kind of mismatch is an architectural mismatch, such as different assumptions about the architecture of the application in which the components appear. Such mismatches include differences in expected and provided communications protocols, different assumptions about resource ownership and sharing, different assumptions about the presence or absence of particular operating system and hardware capabilities, etc. As design moves closer to implementation, current programming tools increasingly focus on representing components. At the implementation level, software systems are sets of source and executable modules in one or more programming languages. Although modules come under a variety of names and flavors, e.g., procedures, packages, objects and clusters, etc., they are all essentially abstractions for components.

[0009] By failing to provide separate abstractions for specifying and implementing interconnection protocols among software components, current programming languages force programmers to distribute such protocols among the interdependent components. As a consequence, code-level components encode, apart from their ostensible function, fragments of interconnection protocols from their original development environments. These fragments translate into a set of undocumented assumptions about their dependencies with the rest of the components in a system. When attempting to reuse components in new applications, such assumptions have to be identified manually and modified, in order to match the new interdependency patterns at the target environment. This often requires extensive modifications of existing code, or the development of additional coordination software.

[0010] To this date, there has been no uniform framework for describing the various kinds of component mismatches, or systematic set of rules for dealing with them. Designers generally rely on their own intuition and experience and the problem of component composition is still being confronted in a largely ad-hoc fashion.

SUMMARY OF THE INVENTION

[0011] The present invention provides a mechanism for easily integrating existing software components into new applications. It is based on a recognition that a computer software system includes interdependent collections of software components. That is, at the architectural level, software components and their interdependencies are two distinct and equally important entities. The software components represent the core functional pieces of an application and deal with concepts specific to an application domain. Interdependencies relate to concepts which are orthogonal to the problem domain of most applications, such as transportation, sharing of resources and synchronization constraints among components.

[0012] An architectural design language is provided which has linguistic support for representing and transforming software architecture diagrams. This language enables a clear separation of the core functional pieces of an application, herein called activities, and their interconnection relationships in context of the application, herein called dependencies. The language also supports entity specialization, a mechanism through which software architectures can be described at various levels of abstraction.

[0013] In addition, a design handbook of dependency types and associated coordination processes is provided. Such a handbook is based on the observation that many interconnection problems and software applications are related to a relatively narrow set of concepts, such as resource flows, resource sharing, and timing dependencies. These concepts are orthogonal to the problem domain of most applications, and can therefore be captured in an application independent vocabulary of dependency types. Similarly, the design of associated coordination processes involves a relatively narrow set of coordination concepts, such as shared events, invocation mechanisms, and communication protocols. Therefore, coordination processes can also be captured in a design space that assists designers in designing a coordination process that manages a given dependency type, simply by selecting the value of a relatively small number of design dimensions. The design handbook combines the vocabulary of dependencies in a design space of coordination processes. Such a handbook may reduce the specification and implementation of software component interdependencies to a routine design problem, capable of being assisted, or even automated, by computer tools.

[0014] A process for constructing and transforming architectural diagrams of software architectures to integrate executable design elements into code modules is also provided. The process involves applying a series of transformations to an architectural description of a target application. This architectural description may be defined in the architectural design language provided above. Generally speaking, the transformation process includes constructing application architecture diagrams, interactively specializing generic activities, interactively managing unmanaged dependencies between the activities using coordination processes from the design handbook, and integrating executable design elements into code modules.

[0015] As a result, the architectural design language, design handbook and transformations provide a system which can accurately and completely describe nontrivial applications and facilitate code-level and architectural-level software reuse.

[0016] Accordingly, one aspect of the present invention is an architectural description language which represents activities and dependencies between activities as separate entities. Dependencies are managed by coordination processes associated with the dependency. Activities and dependencies are connected through ports which encode interfaces between activities and coordination processes. The language may also represent resources which may be understood as the outputs of activities that are beyond the scope of the defined software system. Each entity, i.e., activity, dependency, port or resource, may also have attributes which are name value pairs, specifying additional information about the entity. Attributes may be inherited. That is, activities and dependencies may be specialized into particular versions of an activity or dependency. The attributes for a particular activity are inherited by its specializations.

[0017] Another aspect of the invention is a computer system which allows a user to define a software system specification, or entities thereof, in the architectural description language in terms of activities and dependencies and their interconnections through ports.

[0018] Another aspect of the invention is a computer system which permits entities in this architecture description language to be combined.

[0019] Another aspect of the invention is a computer system which checks for compatibility of connected entities in the architectural description language.

[0020] Another aspect of the invention is a computer system for storing and accessing stored representations in the architectural description language, including specializations and decompositions of selected representations.

[0021] Another aspect of the invention is a computer system which receives definitions of a computer system in terms of its activities, dependencies and ports indicating their connections and specializes a description of generic component elements.

[0022] Another aspect of the invention is a computer system which receives a definition of a software system in terms of its activities, dependencies and ports and which decouples dependencies which cannot be managed independently of other dependencies to generate another definition of the software system.

[0023] Another aspect of the invention is a computer system for storing a library of coordination processes, including a representation of specific computer programs, each of which is a specialization of a process for managing a dependency, such as resource sharing dependencies, flow dependencies and timing dependencies. It should be understood that there are many types of dependencies, of which the following description includes particular examples. The various combinations of one or more of these example dependencies is an aspect of this invention.

[0024] Another aspect of the invention is a computer system which generates executable computer program code from specialized generic software component elements described as combinations of activities, and dependencies having ports for interconnection.

[0025] Other aspects of the invention include the various combinations of one or more of the foregoing aspects of the invention, as well as the combinations of one or more of the various embodiments thereof as found in the following detailed description or as may be derived therefrom. It should be understood that the foregoing aspects of the invention also have corresponding computer-implemented processes which are also aspects of the present invention. It should also be understood that other embodiments of the invention may be derived by those of ordinary skill in the art both from the following detailed description of a particular embodiment of the invention and from the description and particular embodiment of a system in accordance with the invention.

[0026] The various aspects of the invention enable reuse of code-level components. Designers can generate new applications simply by selecting existing components to implement activities, and coordination processes to manage dependencies, independently of one another. The development of successful frameworks for mapping dependencies to coordination processes reduces the step of managing dependencies to a routine one, and enables it to be assisted or even automated by design tools. Overall, new applications can be generated with minimal or no need for user-written coordination software.

[0027] The various aspects of the invention also enable reuse of software architectures. Designers can reuse the same architectural description in order to reconstruct applications after one or more activities have been replaced by alternative implementations. A designer simply may semi-automatically remanage the dependencies of the affected activities with the rest of the system. Furthermore, designers may reuse the same set of components in different execution environments by managing the dependencies of the same architectural description using different coordination processes, appropriate for each environment.

[0028] The various aspects of the invention also enable insight into software organization alternatives. The description of software applications as sets of components interconnected through abstract dependencies may help designers to structure their thinking about how to best integrate the components together. A design space of coordination processes for managing interdependency patterns may assist them to explore alterative ways of organizing the same set of components, in order to select the one which exhibits optimal design properties.

BRIEF DESCRIPTION OF THE DRAWING

[0029] In the drawing,

[0030] FIG. 1 is a block diagram of a process repository in an application development system in accordance with one embodiment of the present invention;

[0031] FIG. 2 is a block diagram of tools and clients that may access the process repository in FIG. 1;

[0032] FIG. 3 is a block diagram of a computer system with which an embodiment of the present invention may be implemented;

[0033] FIG. 4 is a block diagram of a system as viewed in accordance with an architectural description language as used in the present invention;

[0034] FIG. 5 is a diagram illustrating an example dependency decomposition;

[0035] FIG. 6 is a diagram illustrating a coordination process associated with a flow dependency;

[0036] FIG. 7(a) illustrates a generic activity containing a generic producer port;

[0037] FIG. 7(b) illustrates an executable specialization of the activity of FIG. 7(b);

[0038] FIG. 7(c) illustrates an alternative executable specialization of the activity of FIG. 7(a);

[0039] FIG. 8 is a diagram illustrating an example of a resource entity;

[0040] FIG. 9 is a diagram illustrating a generic pipe transfer dependency and its decomposition;

[0041] FIG. 10 illustrates a data structure for an entity object;

[0042] FIG. 11 illustrates a structure for a specialization object or table;

[0043] FIG. 12 illustrates the structure of a decomposition representation;

[0044] FIG. 13 illustrates a structure for representing a connector;

[0045] FIG. 14 illustrates sample component descriptions for describing software components associated with the activities shown in FIG. 4;

[0046] FIG. 14 is a diagram representing component definitions in accordance with one embodiment of the invention;

[0047] FIG. 15 illustrates a constraint on attributes for a dependency;

[0048] FIG. 16 illustrates constraints on attributes for an activity;

[0049] FIG. 17 represents pseudocode describing how compatibility of activities and dependencies is checked;

[0050] FIG. 18 illustrates an example process where interface dependencies force joint management to flow dependencies;

[0051] FIG. 19 is a diagram illustrating the augmentation of an activity by introducing a caller;

[0052] FIG. 20 illustrates an augmented activity having a procedure wrapper;

[0053] FIG. 21 illustrates the introduction of a executable caller into an activity;

[0054] FIG. 22 illustrates the introduction of an executable wrapper in an activity;

[0055] FIG. 23 illustrates the introduction of a graphical user interface function and caller in an activity;

[0056] FIG. 24 illustrates additional activities that are introduced by a packaging algorithm;

[0057] FIG. 25 is a flow chart describing how an application is generated from a representation of the application as activities and dependencies;

[0058] FIG. 26 is a flow chart describing how interface dependencies are decoupled;

[0059] FIG. 27 is a flow chart describing how generic design elements are specialized;

[0060] FIG. 28 is a more detailed flow diagram of the flow chart of FIG. 27;

[0061] FIG. 29 is a flow chart describing how all modules are connected to a source of control;

[0062] FIG. 30 is a flow chart describing how executable code is generate from specialized generic design elements;

[0063] FIG. 31 is a diagram of a set of design dimensions of flow dependencies; and

[0064] FIG. 32 is a diagram of a specialization hierarchy of timing dependencies.

DETAILED DESCRIPTION

[0065] The present invention will be more completely understood through the following detailed description which should be read in conjunction with the attached drawing in which similar reference numbers indicate similar structures.

[0066] Referring now to FIGS. 1 and 2, components of one embodiment of the present invention are shown. FIG. 1 illustrates one embodiment of a process, or entity, repository 34. This repository includes a database 32
for storing representations of entities defining a process and a process repository engine 34 that accesses and interprets these representations in order to allow a user to create new process definitions, modify existing process definitions and/or read process definitions. The process repository also causes properties defined for an entity to be inherited by its specializations, as will be described below. A user accesses operations of the process repository engine via an application programming interface (API) 36. The API may be accessed over a network to provide a form of client/server interaction, including over the Internet. The process repository, as described in more detail below may be implemented, for example, using a relational database as the database system 32, or using an object-oriented application development system as the database system 32, or by using other techniques. The object-oriented application development system has the capability to control the specialization of process entities. Using a relational database, such specialization is performed by the process repository engine 34 using appropriate software with functionality similar to the object-oriented development system.

[0067] The process repository 30 is connected, as shown by arrows 31, to other applications as shown in FIG. 2. In particular, a user may access the process repository 30 using various tools 38 or user interfaces 40
that provide primarily viewing capability. One of the tools, an editor 42, allows a software architecture to be defined on the computer by a user using an architectural description language defined according to a process representation described in more detail below. This language represents a process by specifying entities which define a process, such as activities, dependencies, ports and resources. These entities may be decomposed into other entities and/or may be specialized or specializations of generic kinds of entities. Additionally, editor 42
includes a component description language editor which is used to represent executable components that may be associated with the individual entities. An example editor 42 will be described in more detail below in connection with FIG. 17.

[0068] Another tool is a code and configuration generator 44 which transforms process descriptions into executable program code, configurations of enterprise software packages, workflow systems or object frameworks. This code generator also facilitates reuse of software components and can be used for rapid prototyping of software applications from existing software components. A similar tool is a process model translator 52 which translates a process description into a description in another language, such as for a computer aided software engineering (CASE) application program 56 or other modeling tools 58. As will be described below, the process representation used in the present invention defines an architectural description language and can be readily translated to other formats using standard parsing techniques.

[0069] The user interface clients 40 typically provide for retrieval and viewing of process descriptions, such as a process viewer 46 typically using a browser interface such as an HTML browser or a drawing tool, such as VISIO from Shapeware Corporation. More functionality may be provided by a design assistant 48 which permits a user to see various decompositions and specializations of a process, in particular for comparison and selection of processes that implement coordination processes as described below. Other client programs, such as a process handbook navigator may be used to view processes, their decompositions and their various specializations, particularly enabling comparison of alternative processes for performing a task.

[0070] A computer system which may be used to implement the present invention will now be described in connection with FIG. 3. This diagram illustrates components of a general purpose computer system that can be used to implement the present invention. This description is provided by way of example only and is not intended to be exhaustive or limiting. This computer system includes a main unit 61 which is connected to an output device 68 such as a display and an input device 66, such as a keyboard. The main unit generally includes a processor 60 connected to a memory system 62 via an interconnection mechanism 64. The input device and output device also are connected to the processor and memory system via the interconnection mechanism.

[0071] It should be understood that one or more output devices may be connected to the computer system. Example output devices include a cathode ray tube (CRT) display, liquid crystal displays (LCD), printers, communication devices such as a modem, and audio output. It should also be understood that one or more input devices may be connected to the computer system. Example input devices include a keyboard, keypad, track ball, mouse, pen and tablet, communication device, audio input and scanner. It should be understood the invention is not limited to the particular input or output devices used in combination with the computer system or to those described herein.

[0072] The computer system may be a general purpose computer system which is programmable using a high level computer programming language, such as "C, or "Pascal." The computer system may also be specially programmed, special purpose hardware. In a general purpose computer system, the processor is typically a commercially available processor, of which the series x86 processors, available from Intel, and the 680.times.0 series microprocessors available from Motorola are examples. Many other processors are available. Such a microprocessor executes a program called an operating system, of which UNIX, DOS and VMS are examples, which controls the execution of other computer programs and provides scheduling, debugging, input/output control, accounting, compilation, storage assignment, data management and memory management, and communication control and related services. The processor and operating system define a computer platform for which application programs in high-level programming languages are written.

[0073] The memory system 62 in a typical general purpose computer system usually includes a computer readable and writeable nonvolatile recording medium, of which a magnetic disk, a flash memory and tape are examples. The disk may be removable, known as a floppy disk, or permanent, known as a hard drive. A disk has a number of tracks in which signals are stored, typically in binary form, i.e., a form interpreted as a sequence of one and zeros. Such signals may define an application program to be executed by the microprocessor, or information stored on the disk to be processed by the application program. Typically, in operation, the processor causes data to be read from the nonvolatile recording medium into an integrated circuit memory element, which is typically a volatile, random access memory such as a dynamic random access memory (DRAM) or static memory (SRAM). The integrated circuit memory element allows for faster access to the information by the processor than does the disk. The processor generally manipulates the data within the integrated circuit memory and then copies the data to the disk when processing is completed. A variety of mechanisms are known for managing data movement between the disk and the integrated circuit memory element, and the invention is not limited thereto. It should also be understood that the invention is not limited to a particular memory system.

[0074] It should be understood the invention is not limited to a particular computer platform, particular processor, or particular high-level programming language. Additionally, the computer system 20 may be a multiprocessor computer system or may include multiple computers connected over a computer network.

[0075] Referring again to FIGS. 1 and 2, the entity repository 30, tools 38 and user interface clients 40 all may be implemented using computer programming language tools and/or data management tools. Each of these components uses and/or manipulates a representation of processes or software architectures, which also may be called an architectural description language. This architectural description language will now be described in more detail. The following description is based on the representation of software architectures, however it also is generally applicable to other processes.

[0076] The architectural description language clearly separates core functional pieces of an application from their application specific patterns of interdependencies. This separation can be provided by supporting two distinct language elements: activities, for representing a core functional parts and dependencies, for representing interconnection relationships among activities.

[0077] The language also separates the specification of the system architecture from the implementation of the elements being structured. In particular, activities may be associated with an optional code level component, such as a source code module, an executable program, or a network server. Similarly, dependencies can be associated with an optional coordination process, representing a protocol for managing the relationship described by the dependency. Such a separation enables components for implementing activities to be selected or replaced independently of one another. This independence is possible because the specification level interdependencies do not change. However, different component implementations might influence the implementation of interaction protocols. This separation also allows an application to be ported to different configurations. Again, this portability is possible because specification level relationships of activities do not change. Rather, the implementation of interaction protocols is most likely to change across configurations.

[0078] This architectural inscription language also makes it possible to connect the specification of a system architecture to the implementation of the elements being structured through well-defined structural transformations. As a result, executable applications can be generated directly from a software architectural diagram, as will be described in more detail below. In one embodiment of the invention, a mechanism herein called entity specialization allows generic application architectures to be transformed to executable systems by selection of successively specialized activities and dependencies contained in the architectural decomposition.

[0079] The architectural description language also supports the specification and confirmation of compatibility restrictions and configuration constraints on the interconnection of the application elements. That is, when connecting or transforming language elements in an architectural description, a limited static checking of compatibility of these elements is performed, similar to type checking in programming languages. This capability facilitates the construction of correct architectural descriptions and helps designers focus their attention on more complex issues. In one embodiment of the invention, this specification and confirmation of compatibility restrictions and configuration constraints is based on a mechanism which matches attribute values of the language elements to be connected. This mechanism is described in more detail below after a more detailed description of the architectural description language and the entity specialization mechanism.

[0080] One embodiment of an architectural description language in accordance with the present invention will now be described in connection with a representation of an example application using this language. FIG. 4 illustrates the structure of the file viewer application 70 independent of the implementation of its elements, i.e., it illustrates a generic specification-level view of the application. A file viewer generally allows a user to input a code number and in response to view the contents of a retrieved file having a file name matching the user supplied code number. Such a system includes three application subsystems, each of which corresponds to different activities. These activities include select files 72, retrieve file names 74 and view files 76. These activities are interconnected by dependencies 78 and 80. Activity 72 is atomic while activities 74 and 76 are composite, i.e., they decompose into patterns of simpler elements. The entire application 70 is also defined as a composite activity. Dependencies 78 and 80 encode relationships among the activities and connect producers and consumers of data resources. In this application, they indicate that user supplied code numbers flow from the user interface to the file name retrieval subsystem. Likewise, retrieved file names must flow from the file name retrieval to the file viewing subsystem.

[0081] Activities and dependencies are connected together via ports which are connected at 82, 84, 86 and 88. Activity ports are connected to a corresponding dependency port using an object called a wire, drawn as line segments in the diagram. Within activity 74, ports connected at 90
and 92 connect the open database 94 and retrieve file name 96 activities via prerequisite dependency 98. Similarly, in activity 76, ports connected at 100 and 102 connect the start viewer 104 and view new file 106 activities via prerequisite dependency 108. The dependency has an associated resource not shown, which in this case is a file.

[0082] This example application illustrates four primary elements of the language, namely activities, dependencies, ports and resources. Any of these four elements may contain an arbitrary number of additional attributes. Attributes are name value pairs that encode additional information about the element. They are used to express compatibility restrictions that constrain the connection of elements. Each of the entities, or a specialization of it, has a corresponding implementation level entity that implements the intended functionality of the entity. These are defined as attributes of the respective activities, dependencies and ports and are called software components, coordination processes, software connectors, respectively. For resources, these attributes may represent data, control, hardware or system resources.

[0083] More details of this language will now be described in connection with FIGS. 5 to 16. As stated above, there are four primary elements of this language: activities, dependencies, ports and resources. Activities represent the main functional pieces of an application. Interconnections among activities are explicitly represented as separate language elements, called dependencies. Activities must always connect to one another through dependencies. Both activities and dependencies have a set of ports, through which they interconnect with the rest of the system. As a consequence, every activity port must be connected to a compatible dependency port.

[0084] Activities

[0085] Activities are defined as sets of attributes which describe their core function and their capabilities to interconnect with the rest of the system. The two most important activity attributes are a decomposition and a component description. Decompositions are patterns of simpler activities and dependencies which implement the functionality intended by the composite activity. The ability to define activity decompositions is the primary abstraction mechanism in the language. A component description connects an activity with a code-level component which implements the intended functionality. Examples of code-level components include source code modules, executable programs, network servers, configuration files for enterprise systems, etc. Component descriptions are described in more detail below in connection with an example implementation.

[0086] Depending on the values of the decomposition attribute, an activity is either atomic or composite. Atomic activities have no decomposition. Composite activities are associated with a decomposition into patterns of activities and dependencies. Depending on the values of the component description attribute, an activity is either executable or generic. Executable activities are defined at a level precise enough to allow their translation into executable code. Activities are executable either if they are associated with a component description, or if they are composite and every element in their decomposition is executable. Activities which are not executable are called generic. To generate an executable implementation, all generic activities must be replaced by appropriate executable specializations. A primitive entity is both atomic and executable.

[0087] Activity decompositions are subject to structural restrictions. In particular, all free ports (described in more detail below) of activities contained in the decomposition, i.e., ports not connected to other decomposition elements, must be connected to compatible ports of the composite activity. In other words, the external points of interaction of a composite activity with the rest of the system are equal to the points of interaction of its decomposition, minus the interactions that are internal to the decomposition. Another restriction is that dependencies contained in an activity decomposition can have no free ports. In other words, if a dependency is included in a decomposition, all of its ports are connected to activities included in the same decomposition. Dependencies that span composite activities are defined outside of any of them because of the restriction that activities are connected to one another through intermediate dependencies.

[0088] As discussed above, executable activities are ultimately implemented by associating them with software components that perform the desired functionality. Software components are code-level software entities, such as source code modules, executable programs, user-interface functions, network services, etc. Dependencies and ports, on the other hand are associated with coordination processes and software connectors, respectively. While the latter may be more easily represented in this system, in order to properly integrate software components into executable systems, this representation should have some information about their interfaces, source and object files, and other related attributes. A notation, herein called a component description language (CDL) may be used to describe the properties of software components associated with executable activities. These definitions are stored in the corresponding executable activity.

[0089] One implementation of the component description language will now be described in connection with FIG. 14. This figure illustrates sample component descriptions of the components associated with the five executable activities in FIG. 4. In general, a component description includes information about the kind of component, the provided interface of the component, the expected interfaces of other components, source and object files needed by the component, and additional attributes specific to the component. Each part of the component description will now be described more detail.

[0090] Definitions of arbitrary kinds of software components, such as a source module, executable program, user-interface function, etc., may be supported by representing each component kind by a different keyword. Table I describes some example component kinds, and is not intended to be either exhaustive or limiting. This table could be extended, for example, by adding a component type for representing configuration files for enterprise software packages or workflow systems.

1Table I Component Type CDL Keyword Description Source procedure proc A source code procedure or equivalent sequential code block (subroutine, function, etc.) Source module module A source code module, consisting of one or more source code files and containing its own entry point (main program). Modules interact with the rest of the system through expected interfaces only. Filter filter A source code procedure that reads its inputs from and/or writes its outputs to sequential byte streams Executable exec An executable program DDE server ddes A DDE server embedded inside an executable program OLE server oles An OLE server embedded inside an executable program Gui-Function gui A function provided by the graphical user interface of some executable program, typically activated through a key sequence

[0091] The provided component interface, through which a software component interacts with other components, specifies the input-output interface of the component. Depending on the component kind, such interfaces might correspond to procedure parameter lists, executable program command line invocation interfaces, user interface functions activation key sequences, etc. When associating software components to executable activities, each element of the provided interface is mapped to a corresponding atomic port of the activity.

[0092] Expected interfaces of other components are also represented because most currently used software components make assumptions about the existence of other components or services in the system. For example, a source module might call an externally defined procedure with a specified name and parameter interface. A Microsoft Windows executable program might assume the existence of a DDE server application with given specifications. Such expectations are documented in this section, using a syntax identical to the one used to define the component's provided interface. When associating software components to executable activities, each element of each expected interface is mapped to a corresponding atomic activity port.

[0093] Files needed by a software component are usually pieces of code, residing in one or more source or object files. The relevant set of files to be eventually included in the final application are therefore specified.

[0094] Additional component attributes often need to be specified. Examples of such attributes include the programming language (for source components), the invocation pathname (for executable programs), the service and topic names (for a DDE server component), the activation, event or key sequence (for user-interface services), etc. There are also optional attributes, such as restrictions on the target environment or host machine.

[0095] As an example, referring now to FIGS. 4 and 14, the activity Select Files has a corresponding component description 240. This description indicates that this activity is associated with procedure (as indicated at 240) that provides an interface (as indicates at 244) to a C source code function, called "select_files". This function, for example, may contain an internal loop that repeatedly asks users for a code number. For each user-supplied code number, it calls function view_selected_files, to which it passes the user-supplied code number as an argument. Function view selected_files is not part of this module and is expected to exist somewhere in the same executable, as indicated at 246. Its single parameter "codenum" is mapped to a corresponding producer port of activity Select Files. File select.c contains the source code and data definitions for select_files and any other internal functions it may call, as indicated at 248. Similarly, activities Open DB 252 and Retrieve Filename 254 are associated with Visual Basic procedures defined in file retrieve.bas as indicated at 256 and 258.

[0096] Activity Start Viewer 260 is associated with an executable program (Microsoft Word, a commercial text editor). Enactment of the activity corresponds, in this case, to invoking the program. The component's CDL provided interface 262 describes the command line parameters for starting the program. In this case there are no command line parameters, other than the program pathname.

[0097] Finally, activity View New File 264 is associated with a graphical-user-interface function offered by the text editor as indicated at 266. In order to display a new file, the text editor normally expects to receive a key sequence in its main window, consisting of the character CTRL-O, followed by the required filename, followed by a newline character. Thus, this service expects one abstract data resource (the filename), embedded in a key sequence whose generic format is described by attribute guiKeys. In this example, guiKeys contains the characters {circumflex over ( )}O(=CTRL-O), followed by @1(=the value of the first interface element, in this case the filename), followed by .about.(=newline). Finally, attribute guiWindow specifies the title of the editor's main window, where the activation key sequence must be sent.

[0098] Dependencies

[0099] Having now described activities in some detail, dependencies will now be described in connection with FIGS. 5 and 6. Dependencies describe interconnection relationships and constraints among activities. Traditional programming languages do not support a distinct abstraction for representing such relationships and implicitly encode support for component interconnections inside their abstractions for components. In contrast, in the present invention, interconnections among activities are explicitly represented using dependencies.

[0100] In the example application in FIG. 4, a flow dependency indicates that user-supplied code numbers must flow from the user interface to the filename retrieval subsystem. Likewise, retrieved filenames flow from the filename retrieval to the file viewing subsystem. Prerequisite dependencies (labeled Persistent Prereq) indicate that the filename database is opened (once) before any filename retrieval takes place, and that the file viewer subsystem is initialized (once) before any file can be displayed.

[0101] Like activities, dependencies are defined as sets of attributes. One attribute is an optional decomposition into patterns of simpler dependencies that collectively specify the same relationship with the composite dependency. A second optional attribute is a coordination process. A coordination process is an activity, or a pattern of simpler dependencies and activities that describe a mechanism for managing the relationship or constraint implied by the dependency. Another attribute is an optional association with a software connector. Connectors are low-level mechanisms for interconnecting software components that are supported directly by programming languages and operating systems. An example software connector is the design-time ordering of program statements in the same sequential code block, which manages prerequisite dependencies. As another example, local variable transfer manages flow dependencies. Another example is a UNIX pipe protocol which is a form of transport of data from one process to another. Other examples include procedure calls, method invocations, shared memory, etc.

[0102] Depending on the values in the above attributes, a dependency may be either atomic or composite. Atomic dependencies have no decomposition. Composite dependencies are associated with patterns of simpler dependencies that specify the same relationships. A dependency also may be either managed or unmanaged. Managed dependencies have an associated coordination mechanism, specifying one way of managing the interconnection relationship they represent. Unmanaged dependencies have no associated coordination process. They simply specify the existence of a relationship and must be specialized by appropriate managed dependencies before code generation can take place. A dependency also may be executable or generic. Executable dependencies are defined at a level specific enough to be translated into executable code. Dependencies are executable if one or more of the following conditions hold: (1) they are directly associated with a code-level connector, (2) they are composite and all elements of their decomposition are executable, or (3) they are managed and all elements of their coordination process are executable.

[0103] Arbitrary dependency types may be defined. However, it is preferable to make routine the step of specifying and managing dependencies in the transformation of an architectural description into executable code. For that reason, it is useful to define a standardized vocabulary of common dependency types that covers a large percentage of activity relationships encountered in software systems. Such a vocabulary is described in more detail below. One common dependency is a prerequisite dependency, which requires a first activity to be completed before a second activity may start. A flow dependency represents a producer/consumer relationship between activities. A mutual exclusion dependency is a constraint often imposed for managing access to a shared resource.

[0104] Some dependencies can be equivalently described by patterns of simpler dependencies. Such patterns are called dependency decompositions and are defined as attributes of composite dependencies. FIG. 5 shows an example of a composite dependency 160 and its decomposition. In particular, the dependency represented by a client/server exchange may be further decomposed into two flow dependencies: a first 162 which handles the request from the client (as a producer) and provides it to the server (as a consumer), and a second 164 which handles the reply from the server (as a producer) and provides it to the client (as a consumer).

[0105] Dependencies specify interconnection relationships which translate into needs for interaction among a set of activities. To generate executable systems, dependencies must be managed by inserting appropriate interaction or coordination mechanisms into the system. By providing an abstraction for specifying a coordination process as an attribute of dependencies, the definition of such interaction mechanisms can be localized.

[0106] Coordination processes are patterns of simpler dependencies and activities. In that sense, they are very similar to activity decompositions. Coordination decompositions have ports defined by corresponding dependencies while activity decompositions have ports defined by corresponding activities. Accordingly, coordination processes have structural restrictions, which mirror the restrictions for activity decompositions, discussed above. In particular, all free ports of dependencies contained inside a coordination process, i.e., ports not connected to other elements of the coordination process, must be connected to compatible ports of the associated dependency. In other words, external points of interaction of a coordination process with the rest of the system are equal to the points of interaction of its elements, minus the interactions that are internal to the coordination process. In addition, activities contained inside a coordination process can have no free ports. If an activity is included in a coordination process, all of its ports must be connected to dependencies included in the same coordination process. Activities that span coordination processes must be defined outside of any of them. Dependencies are connected to one another through intermediate activities.

[0107] FIG. 6 shows an example coordination process 170 that implements a pipe channel protocol, i.e., that manages one-to-one flow dependencies. It is a pattern of three activities 172, 174 and 176, and five lower-level flow dependencies 178, 180, 182, 184 and 186.

[0108] Ports

[0109] Having now described dependencies in some detail, the connectivity between activities and dependencies, herein called ports, will now be described in more detail in connection with FIG. 7(a)-7(c). Ports encode abstract interfaces, or needs for interaction among activities. All such interactions are the result of the existence of dependencies among the interacting activities. The existence of a dependency usually requires the introduction of a coordination process to manage the dependency and to ensure smooth interaction of the interdependent components. All connections between language elements are done through ports. Primitive port types include, but are not limited to, (resource) producer ports, (resource) consumer ports, begin ports and end ports. Arbitrary port types can be defined.

[0110] For example, in FIG. 4 the activity Retrieve Filename 74 has three ports. Two of them are data resource ports, encoding the fact that this activity needs to receive data resources of type Integer, i.e., the code number, and that this activity produces data resources of type String, i.e., the filename. The third port is a Begin control port, encoding the fact that flow of control into the activity follows the completion of activity Open DB.

[0111] As is the case with activities and dependencies, ports may be distinguished into composite and atomic ports. Composite ports act as abstract port specifications, describing the logical role of the port in the system. They decompose into sets of simpler ports, which might themselves be composite or atomic. Atomic ports map directly to an element of some implementation-level component interface, as will be described below. A user may define new ports as specializations of other types of ports, or define completely new port types, just as activities and dependencies may be defined.

[0112] A built-in port hierarchy implies that atomic ports are either input or output ports of data or control. Atomic data ports are mapped to atomic interface elements of software components or executable coordination processes. The mapping is performed by setting an attribute, e.g., "MapsTo," at the port to a string indicating the respective interface element. Depending on the component kind, an atomic port might thus correspond to a source procedure parameter, a command line argument, a user-interface-function activation key sequence, an event detected or generated by a program, an object generated or used by an executable program, etc. All atomic data ports contain an attribute named Resource, which lists the data type expected to flow through the port.

[0113] Atomic control ports, on the other hand, model the flow of control in and out of an activity or coordination process. Every activity has at least one pair of control ports modeling the beginning and end of execution of the activity. These ports are called the Begin and End ports. Complex activities might have additional control ports, modeling, for example, periodic calls to other activities that take place during the life of the original activity.

[0114] Sets of atomic ports may be grouped inside composite ports. Arbitrary port types may be defined. For example, producer and consumer ports specify the production and consumption of abstract resources. Designers might want to use composite ports for two reasons. First, they may be used to indicate sets of logically related interface elements in a given implementation. Second, they may be used to indicate generic needs of interaction when designing generic entities. Different specializations of a given generic entity might contain different decompositions of the same composite port, corresponding to the variety of interfaces by which a given abstract need for interaction can be implemented. An example of the use of composite ports will now be described in connection with FIGS. 7(a)-7(c), using the example application of a "File Viewer" from FIG. 4
which processes the contents of an input file.

[0115] One of the activities in the File Viewer application makes the contents of a file available to the rest of the system. Initially in the design process, the exact implementation and interface of the component that will implement that activity is not known. Therefore, a generic activity 188 called Generate Input may be specified, as illustrated in FIG. 7(a), and may include a generic producer port 190 through which the contents of the input file are made available to the rest of the system. In the application diagram, that producer port is connected to dependency ports connecting it to the consumer activities.

[0116] There are at least two ways to implement the Generate Input activity. FIG. 7(b) shows a filter implementation. The activity 192 is associated to a component using a component description 194 in a form described below. This component writes its output to an externally opened sequential byte stream. The same byte stream is read by consumer activities to retrieve the contents of the input file. In this case, the composite producer port 196 is decomposed into a data input port 198, corresponding to the file descriptor of the sequential byte stream that must be passed to the filter. In this case, a composite producer port, i.e., output port, decomposes into an atomic data input port.

[0117] FIG. 7(c) shows another way to implement the Generate Input activity. In this example, the activity 200 is associated with a component using component description 202. For each line of the input file, the second implementation calls a procedure which is expected to have been defined externally. The activity 200 passes the current input line as a string parameter to the procedure. In this case, the composite input port 204 decomposes into a data output port 206, corresponding to the string parameter of the procedure called by the component.

[0118] By default, every composite activity port includes the Begin and End ports of its associated activity in its decomposition. Activity ports are directly connected to coordination process ports. Coordination processes often need to control what happens before or after the execution of an activity. This requires them to have access to the Begin and End ports of an activity. In actual practice, this requirement is frequent enough that Begin and End ports are included in the decomposition of every composite activity port by default.

[0119] Resources

[0120] Having now described activities, dependencies and ports, another kind of entity, herein called a resource, will now be described in connection with FIG. 8. Most interactions among software components center around the flow and sharing of various kinds of resources. In most cases, resources are dynamically produced during run-time, as a result of execution of activities. Such dynamically produced resources are implicitly modeled through producer ports. As mentioned in the previous section, ports contain special attributes which describe the data type, or other properties, of the resources that flow through them. In many software applications, however, some resources have been created outside of the scope of the application. Examples include hardware resources, such as a printer, and resources produced by other applications, such as a database.

[0121] Such preexisting resources may be represented using a special resource language entity. Like activities, resource entities have ports, through which they are connected to the rest of the system. Atomic activity ports, are associated with interface elements of software components. In contrast, atomic resource ports are bound to constant data values, which usually correspond to resource identifiers. FIG. 8 depicts an example of the use of a resource entity 210 which indicates a preexisting database file which is being shared by two activities 212, 214 in this application. The Database resource has a single port 216, which is bound to the filename of the database file as indicated at 218. This filename is made known to the two user activities, through a flow dependency 220, in order for them to be able to access the database.

[0122] Attributes

[0123] All primary entities of the language, i.e., activities, dependencies, ports and resources, may contain an arbitrary number of additional attributes. Attributes are name-value pairs that encode additional information about the element. Attribute values can be scalar, lists, or pointers to other entities. Attributes are useful in determining compatibility of an entity with other entities in the system and for integrating components and coordination processes into sets of executable modules.

[0124] Although arbitrary attributes may be defined, some conventions for attributes used in each entity type have been developed. These conventions are represented in Table II. These conventions are intended to be neither exhaustive nor limiting.

2TABLE II Entity Type Required Attributes Description All Activities Environment execution environment(s) for which activity is compatible Activities associated to Language source programming source module language of module components Executable name of executable where module is to be integrated Activities associated with ExePath pathname of executable program executable program components Activities associated with Service Server DDE service DDE server components name Topic Server DDE topic name Activities associated with guiKeys Format string of graphical user interface activation key sequence function components gui Window Name of window where activation key sequence should be sent All atomic ports MapsTo pointer to interface element corresponding to port Resource type of data flowing through port

[0125] All atomic ports MapsTo pointer to interface element corresponding to port Resource type of data flowing through port All entities inherit not only the decomposition but also all attributes from their specialization parents. In addition, language elements also inherit all attributes defined at their decomposition parents. These features enable attributes that are shared by all members of a composite element to be defined only once at the decomposition parent level. For example, in FIG. 6, the pipe transfer activity 170 has several activities and dependencies contained therein. If this activity had the attribute definition, "Environment=UNIX," denoting compatibility with the UNIX environment, all of the activities 172, 174 and 176, and all of the dependencies 178, 180, 182, 184 and 186 also inherit this attribute. Since ports owned by an element are considered to be parts of its decomposition, ports always inherit all attributes defined at their owner.

[0126] In addition to normal values, attributes can be assigned to attribute variables. Attribute variables are strings that begin with "?". For example, the attribute Resource can be assigned the attribute variable "?res". Attribute variables need not be declared. They are automatically created the first time they are referenced. Unique variables are special attribute variables whose names begin with the string "?unq," e.g., ?unq-var, ?unq1, etc. They have the special requirement that their values cannot be equal to the value of any other variable in the same scope. They are used to express inequality constraints, as discussed in more detail below.

[0127] Attribute variables also are local to each owner entity, whether activity, dependency or resource, but are shared among an owner entity and all its ports. For example, all references to a variable at different ports of an activity refer to the same variable. Setting the variable at one of the ports affects both attribute definitions. Likewise, all references to a variable with the same variable name but at ports of second different activity refer to the same variable, only within the second activity. References across activities refer to different variables. For example, setting the variable at the first activity does not affect the value of a variable with the same name at the second activity.

[0128] Wires

[0129] The last entity of this architectural description language is called herein "wires," which are drawn as simple line segments to indicate that a legal connection has been established between a port of an activity and a port of a dependency. A wire also may be called a connector, but should not be confused with software connectors, relating to dependencies. Every time a new connection is attempted, the system performs a compatibility check, based on unification of corresponding attribute values at the two ends of the connection. Accordingly, establishment of a wire between composite ports implies that a set of legal connections between each of the corresponding subports has been made.

[0130] There are two types of wires in this system, internal wires and external wires. Internal wires connect free ports of decomposition or coordination process elements to compatible ports of their associated composite elements. For example, in FIG. 4, two internal wires connect the two free ports of atomic activity Retrieve Filename 96 to compatible ports of composite activity Retrieve Filenames 74. Establishment of an legal internal wire requires the decomposition or coordination process port, i.e., the internal port, to be equal to or a specialization of the composite element port, i.e., the external port to which it is being connected.

[0131] External wires connect activity ports to dependency ports. An activity port cannot be connected directly to another activity port. Similarly, a dependency port cannot be connected directly to another dependency port. Furthermore, the port at the activity side must be equal to or a specialization of the port at the dependency side. This restriction reflects the coordination perspective on software architecture adopted by this architectural description language, whereby software systems are represented as sets of activities interconnected through explicitly represented relationships. These restrictions on wires define the constraints that determine whether elements are compatible, and whether they can be connected by a designer who is generating an architectural description of a particular program.

[0132] Entity Specialization

[0133] Having now described the entities represented by this architectural description language, a property of inheritance used to implementation this language will now be described in more detail. Object-oriented languages provide the mechanism of inheritance to facilitate the incremental generation of new objects as specializations of existing ones, and also to help organize and relate similar object classes. An analogous mechanism may be used in the present invention to provide what is called herein, entity specialization. Entity specialization applies to all the elements of the language, and allows new activities, dependencies, ports and resources to be created as special cases of existing ones. Specialized entities inherit the decomposition and other attributes of their parents. They can differentiate themselves from their specialization parents by modifying their structure and attributes using editing operations described below. Entity specialization is based on the mechanism of process specialization described in Publication WO94/19742.

[0134] The mechanism of entity specialization enables the creation of specialization hierarchies for activities, dependencies, ports, resources and coordination processes. Such hierarchies are analogous to the class hierarchies of object-oriented systems. In specialization hierarchies, generic designs form the roots of specialization trees, consisting of increasingly specialized, but related designs. The leaves of specialization trees usually represent design elements that are specific enough to be translated into executable code. Specialization hierarchies have proven to be an excellent way to structure repositories of increasingly specialized design elements, such as a vocabulary of common dependency types, described in more detail below.

[0135] Apart from enabling the organization of related design elements into concise hierarchies, entity specialization also encourages application development by incremental refinement of generic application architectures. Designers can initially specify their applications using generic activities and dependencies. Such generic application architectures can then be iteratively refined by replacing their generic elements with increasingly specialized versions, until all elements of the architecture are executable. The existence of repositories of increasingly specialized design elements can reduce the specialization steps to a routine selection of appropriate repository elements.

[0136] Accordingly, in a way analogous to object-oriented class creation, entities in this architectural description language are created as specializations of other elements. New elements inherit the decomposition, coordination process, and all other attributes defined in their specialization parent. They can differentiate themselves from their parents by applying any number of the following transformations to their attributes, including either adding or deleting a decomposition or coordination process element, replacing a decomposition or coordination process element with one of its specializations, adding or deleting a connection, adding or deleting an attribute or modifying the value of an attribute.

[0137] FIGS. 9 and 6 illustrate an example of how an executable dependency can be defined as a special case of a generic one by inheriting the coordination process of its parent and then replacing all generic activities and dependencies contained therein with executable specializations. FIG. 9 depicts a generic coordination process 222 for managing flow dependencies using pipes. The process describes the essence of a pipe protocol independently of the particular system calls that are used to implement it in a given environment. It is generic because it contains three generic activities 224, 226, 228 and five unmanaged dependencies 230, 232, 234, 236 and 238. FIG. 6, described above, depicts an executable specialization of the pipe transfer protocol, specific for the UNIX operating system. The specialization 170 inherited the design elements of the original protocol and replaced generic activities and unmanaged dependencies with executable specializations, appropriate for the UNIX operating system.

[0138] Specializing activities allows incremental refinement of architectural diagrams. Designers can specify architectures in very generic terms and then incrementally specialize their elements until an executable design has been reached. Such a process is supported by the ability to maintain hierarchies of increasingly specialized activities, encoding families of alternative designs for specific parts of software architectures.

[0139] From a linguistic perspective, specialization and decomposition impose constraints to ensure compatibility of ports between decomposed or specialized entities are the entities to which their parents connect an activity can be replaced with a specialization only if the new specialization is able both to replace structurally the original activity and to connect legally to all neighbor elements connected to it. If the specialization is composite, the same requirements apply for its decomposition as well. The requirements translate into two port compatibility requirements. First, for each connected port of the original activity, there must be an equivalent port of the specialization. Second, each port of the specialization must be compatible with the dependency port to which the corresponding port of the original activity was connected. These port compatibility requirements are enforced in the process of editing such representations, to be described in more detail below.

[0140] Dependencies also may be specialized. In order to derive executable implementations from such abstract descriptions, designers can follow two alternative paths. First, if a generic dependency has a decomposition, all elements of the decomposition can be replaced with executable specializations. Alternatively, a generic dependency may be replaced with a managed specialization. Managed dependencies are associated with coordination processes, which represent interaction protocols.

[0141] From a linguistic perspective, a dependency can be replaced with a specialization only if the new specialization is able to structurally replace the original dependency and legally connect to all neighbor elements connected to it. If the specialization is managed, the same requirements apply for its coordination process as well. The requirements translate into two port compatibility requirements similar to the ones for specializing activities. First, for each connected port of the original dependency, there must be an equivalent port of the specialization. Second, for each port of the specialization must be compatible with the activity port to which the corresponding port of the original dependency was connected.

[0142] Entities inherit attributes from their specialization parents. In addition, entities may "inherit" attributes from their decomposition parent as well. This features allows an attribute which is shared by all entities of a process to be defined once at the top-level activity and then be automatically inherited by all members of the decomposition. For example, suppose we have an attribute `Company Name`. In a model of a process performed entirely by a single entity, the `Company Name` may be defined once at the parent level. All subactivities of the process automatically inherit that attribute. This capability not only saves the need to manually enter `Company Name` into all subactivities, but also allows some generic activities to be included unchanged in the decomposition, without the need to create different specializations of them, one for each different decomposition context in which they might be used.

[0143] Dependencies optionally may have associated coordination processes. The association is simply encoded by defining an attribute `Coordination Process` at all dependencies and setting that attribute to point to the associated coordination process. Coordination processes must be able to structurally replace their associated dependencies in a given model. Therefore, coordination processes must be port compatible with their associated dependencies. In other words, for every port of a dependency, there must be a port of the coordination process which is equal to or a specialization of the corresponding dependency port.

[0144] One way to ensure port compatibility of coordination processes is by implementing the coordination process as a set of two siblings. One sibling is defined directly under the associated dependency and the other sibling is defined as an activity. The dependency sibling inherits the port structure of the associated dependency, while the activity sibling contains information about the patterns of activities and dependencies that form the decomposition of the coordination process. The connections between decomposition elements of the coordination process and the external ports of the coordination process are also stored in the dependency sibling. In that way, the system ensures that coordination processes are port compatible with their associated dependencies, because, in a way, they are defined as specializations of a dependency entity. The separation of information about decomposition and external port structure into two siblings also allows the same coordination process, i.e., the activity sibling, to be associated with several different dependencies. Coordination processes also may be implemented as a specialization of activities and can be provided with a separate port compatibility checking process that matches its ports with those of its included dependencies.

[0145] Implementation of Process Representation

[0146] Having now described the general entities of the language and the restrictions on their combinations, the representation of a process or software architecture in a computer system will now be described in connection with FIGS. 10 to 14.

[0147] Entities may be represented using many kinds of data structures in a computer program. In the following description we provide equivalent representations of the structures as objects or as relational database tables. Entities may be represented as classes in an object-oriented database or development environment. One development environment is KAPPA-PC development tool, from Intellicorp, Inc., but any other object-oriented system or database which provides the ability to define new subclasses dynamically at run-time can be used. Using the KAPPA-PC development tool, specialization is simply implemented using the properties of object-oriented inheritance. Specialization children are defined as subclasses of existing classes, and thus they automatically inherit all slots which are present in their parent. Multiple inheritance is supported by storing entities with multiple parents as a set of sibling classes. A different sibling class is defined under each specialization parent. Each sibling inherits all slots from its respective parent. Appropriate software coordinates the handling of siblings and combines decomposition and attribute elements inherited by each sibling.

[0148] Entities also may be represented using relational database schema. In the following description, the data structures may be implemented using relational database tables, where the fields in a particular structure are records in a table defined by the illustrated structure. In this implementation, of course, inheritance is implemented by appropriate software that provides similar functionality as the object-oriented development system. The following description does not give an exhaustive list of records for each table, or slots for each object, but only lists the relevant fields that convey the essentials of the implementation.

[0149] The primary kinds of entity, i.e., activities, dependencies, ports, and resources are all defined as specializations of the class PHObject 110, such as shown in FIG. 10. In relational table notation the equivalent representation would be records of a table PHObject. This object includes slots for a unique identifier 112, a name 114, a type or kind 116 (indicating whether the entity is an activity, dependency, port or resource), and any other attributes of the entity, such as its creator 118.

[0150] These four entity kinds share the following properties: they have a name, they are defined as a specialization of one or more entities, and they inherit a decomposition and attributes from a specialization parent. Differences among entity kinds are captured in semantic rules that specify what entities are allowed to be present in a decomposition, specific attributes that are always present in certain entity kinds, etc. It is also possible to provide another type of entity in the representation, called a "bundle," to group together related specializations of a given parent entity. Bundles are used in a Process Handbook representation to control automatic inheritance of properties by specializations of a parent entity. This representation makes it easy to add yet other entity kinds, e.g., actors, which may actually perform a particular activity, or send or receive, information etc.

[0151] Specialization is represented by a parent object or table 120 as shown in FIG. 11, since entities may have multiple specialization parents. In a relational table the parent of a given object, indicated by object identifier 122 is related to the identifier 124 of its specialization parent. For a given object, this table includes one record for each parent entity.

[0152] An entity also may have a decomposition, which is defined as a set of decomposition slots. A decomposition slot may be, for example, a pointer to an entity contained in the decomposition. Alternatively, a decomposition slot may be a pointer to a connector entity, which is a secondary entity that represents connections among primary entities present in the decomposition. In other words, a decomposition generally indicates a list of other entities and a list of connections among those entities. The rules for what kinds of entities and what kinds of connections are allowed in a decomposition depend on the entity kind as discussed above. In addition, all entities can have an arbitrary number of attributes. Decomposition slots may be stored as part of the entity class in an object-oriented system. In a relational table implementation, decomposition slots may be stored in a separate table. A table 130 for a decomposition is shown in FIG. 12. This table includes an indicator 132
of the decomposition "parent" object, or the entity for which the decomposition is defined. In addition a "decomposition slot" 134 of an object has its own unique slot identifier which is separate of both the identifier of its owner (the decomposition parent), and the identifier of the decomposition element itself. A slot value 136 stores the unique identifier for the object that fills the decomposition slot 134. The kind value 138 stores an indication of whether the owner of this decomposition is an entity or a connector. Other information may be stored as indicated at 140 about how to display the decomposition, etc.

[0153] A slot identifier is used to handle, for example, the case where an activity A contains two subactivities B and C in its decomposition. The decomposition thus contains two "slots", e.g., S1 and S2, which are "filled" with activities B and C respectively. If an activity A' is defined as a specialization of activity A, new activity A' inherits all decomposition slots and their values from activity A. In activity A', however subactivity B is replaced with subactivity B'. By using a separate "slot" id, the replacement is made by modifying the slot value for slot SI from the identifier for subactivity B to the identifier for subactivity B'. In addition to allowing simple replacements, this scheme also permits the system to represent the fact that B' is a replacement of a previously inherited element.

[0154] Another structure called a connector, corresponding to the wire entity, is used to connect elements together. Connectors are displayed as lines linking ports of one entity to ports of another entity. As shown in FIG. 13, each connector 142 has a connector identifier 144. The connector identifier is stored in the decomposition slot of the most recent common ancestor of the two elements that are being connected. The identifier of the most recent common ancestor of the two endpoints of the connection is stored in the owner identifier slot 146. The first endpoint slot 148
includes the path of the first endpoint, i.e., a list of slot identifiers of successive elements that have to be traversed in order to reach the endpoint. The second endpoint slot 150 includes the path of the second endpoint. In a relational database lists can be stored as strings which contain a concatenation of the list elements.

[0155] Basing connectors on lists of slot identifiers, as opposed to lists of successive decomposition object identifiers, has the following advantages. First, the sequence of slot identifiers is traversed to reach a particular endpoint which allows connectors between different instances of the same entity to be defined unambiguously. Second, connectors may be inherited from a parent and remain unaltered after one of more connected activities are replaced by some of their specializations in the child. In other words, specializations may be modified without worrying about connectors.

[0156] Attributes of an entity also may be represented as additional fields of the entity, and may have arbitrary attributes. Attributes have a name, a type, a value, and possibly links to additional information. Example attribute types include scalar values, e.g., numeric, boolean or string, pointers to other Synthesis objects, pointers to system objects, e.g., files or OLE objects, and lists. Attributes optionally may be given a variable as a value. Variables are used to check port compatibility when establishing connections or when replacing entities with specializations, as will be described in more detail below.

[0157] Having now described an architectural description language in accordance with the invention, and one implementation of a representation of architectural descriptions, various systems for using this process representation will now be described.

[0158] There are various user-interface clients that can be provided to read the process descriptions stored in the process repository to generate appropriate displays to users as illustrated above in connection with FIG. 2. Such a system, for example, is described in the PCT Publication WO94/19742. That system could be modified to include the representations of ports and resources as described herein. Its navigational aids may assist in the comparison of alternative designs for implementing activities and their coordination processes.

[0159] Another particularly useful tool is an editor 42 which allows a user to graphically input representations of a software system. Such a system may be provided using several kinds of interfaces, but may use a graphical system such as VISIO, a commercial application for drawing charts and diagrams from Shapeware Corporation. VISIO can act as a graphic server for other applications through a windows protocol called OLE Automation which allows an application to act as a globally accessible application offering a set of methods to other applications. The implementation of a suitable user interface and the provision of editing functions and entity specialization may be performed using systems such as shown in the PCT Publication WO94/19742 and in the U.S. Provisional Application Serial No. 60/013,694 which is incorporated by reference.

[0160] Checking Element Compatibility

[0161] In the editor for this system, when a dependency is connected to an activity a compatibility check is done between the ports of the activity and the ports of the dependency. Such a connection occurs when a new activity or dependency is added to the representation, or when an activity or dependency is modified or replaced. This process will now be described briefly.

[0162] As discussed above, there are several semantic restrictions and constraints on the ability of entities to interconnect. Some of these restrictions are encoded in the syntax of the language. For example, activity ports can be connected only to dependency ports. Furthermore, dependency ports can be connected only to activity ports that are equal to or a specialization of them.

[0163] Other restrictions are specific to the attributes of code-level elements, i.e., components and connectors, associated with executable activities and dependencies. One such restriction is that an activity associated with a source code procedure returning an integer value can only be connected to other activities through dependencies associated with coordination processes capable of transporting integer values. Another such restriction is that flow dependencies managed by local variable connectors can only connect activities whose associated components can be packaged inside the same sequential code block. Similarly, flow dependencies managed by, for example, a DDE transfer coordination process, can connect only with activities whose associated components are packaged in different executables within the same Microsoft Windows-based host.

[0164] These restrictions and constraints are encoded so that a number of compatibility tests can be performed automatically by the language. Hence, a problem similar to type checking in a programming language arises whenever two elements are connected together. Since all connections are between ports, it is desirable to be able to perform compatibility checks at the port level, and when a wire is to be established between two ports.

[0165] Compatibility checking may be based on attributes which specify the compatibility restrictions. Before establishing a connection between two ports, a port matching algorithm that determines port compatibility is performed, as will now be described in more detail in connection with FIGS. 15-17. In this process, the values of all attributes that exist at both sides of the attempted connection are compared. If both attributes have a fixed value then the two values must match. If either attribute is assigned to a variable, a process similar to unification takes place. If at least one attribute fails to match, the connection is considered illegal.

[0166] The semantics and scope rules of attributes and variables discussed above permit a number of compatibility constraints to be encoded into attributes. For example, if an attribute must have a specific value at all neighbor elements, the attribute may be defined with the specified value at all ports where this condition is required. If the condition is required at all ports of an owner element, the attribute need only be defined once at the owner element. For example, a dependency managed by a coordination process encoding a UNIX pipe protocol can be used only to connect components that will run in UNIX environments. Designers can encode this constraint by defining an attribute Environment set to UNIX at the top level of the process. This attribute is inherited by all ports. In order to pass the compatibility check, all connected activities must contain the attribute set to the same value.

[0167] As another example, if an attribute must have the same unspecified value at all neighbor elements, the attribute may be set to the same variable name at all ports where this condition is required. The unification process will only succeed if the equivalent attribute at the other end of all connections has the same value. For example, local variable transfer is the simplest coordination process for managing flow dependencies. However, it can only be used if all its members both produce and use the same data type, and can be packaged into the same procedure. The latter requirement implies that they also have to be written in the same language and be packaged into the same executable program. For example, as shown in FIG. 15, these constraints can be encoded into the attributes 270-273 of the ports 274 and 276 of the associated dependency 278.

[0168] As another example, if an attribute must have a different value at each neighbor element, the attribute may be set to a different unique variable at each port where this condition is required. Since each unique variable cannot be unified to a value given to any other variable, unification will only succeed if the attribute has a different value at each neighbor element. For example, Dynamic Data Exchange (DDE) is one protocol for transferring data among different executable programs in the Microsoft Windows operating system. It does not work properly for transferring data within the same executable. Thus, it can only connect components that will be integrated into different executables. For example, as shown in FIG. 16, this constraint can be encoded into attributes 280, 282 of the ports 284, 286 of the associated dependency 288.

[0169] Attribute unification simultaneously checks constraint compliance and creates equivalence classes of attribute values across a number of elements. For example, an attempt to connect two activities through a dependency managed by a local variable transfer coordination process (FIG. 15), both checks whether the two endpoint activities can be packaged together into the same procedure, and unifies attribute Procedure at both of them to the same equivalence class. Attribute unification is therefore one of the mechanisms used by the system in order to integrate activities and dependencies into sets of executable modules. This aspect of the system will be described in more detail below.

[0170] The process of checking compatibility of activity and dependency ports is illustrated in more detail in FIG. 17. In this process, if the ports are not of identical type, i.e., both composite or both atomic, then the compatibility check fails, as indicated at step 460. If both ports are composite, then the subports are recursively matched in step 462. Next, if both ports are atomic as determined in step 464, then the activity port is compared to the dependency port. If both ports are the same or if the activity port is a specialization of the dependency port, then the attributes at both ports are compared. Otherwise a failure in the compatibility check is indicated at 466.

[0171] The comparison of the attributes is performed by calling a Match Value function when both ends have a value as indicated at 468. If one end has a value and the other end refers to a variable and if this variable has a value, then the Match Value function 468 is also called. If one end refers to a variable and the variable does not have a value, both this variable and its equivalents class are set to the value at the other end of the matching port in step 472 and success is indicated as in step 470. If both ends refer to variables and if one or both variables has a value, then the steps, as indicated at 472, are again performed. If no variable has a value then the process proceeds with step 474 of unifying both variables into an equivalence class and returning success.

[0172] The Match Values procedure takes the value of an attribute at the activity side and a value of an attribute at the dependency side and returns success when the values match and failure otherwise. In particular, if the values are pointers to language elements and if the attribute at the activity side is a specialization of the attribute at the dependency side, success is returned as indicated at 476.

[0173] Constructing Representations of Software Architectures

[0174] Given the linguistic support for defining and checking architectural diagrams, described above, and design support for leveraging the construction of correct diagrams, application architectures may be easily constructed using an editor. In particular, the architectural description language described above supports a set of graphical abstractions as shown in FIG. 4 for defining activities and dependencies, as well as the linguistic means to interconnect them, namely ports and connectors. Furthermore, it supports a compatibility checking mechanism that is able to detect a number of inconsistencies when connecting elements together.

[0175] Apart from linguistic support for specifying activities and dependencies, the construction of application architecture diagrams can be facilitated by assistance on how to decompose an application to simpler functional pieces, and assistance on how to represent interdependencies among application functional pieces.

[0176] Application decomposition can be facilitated by the reuse of generic decompositions for frequently occurring problems. This requires the creation of process repositories, or process handbooks, for storing, searching, and reusing architectural design fragments. The architectural description language provides a number of mechanisms for supporting the construction of process repositories. Architectural patterns can be expressed as composite activities. Through the mechanism of entity specialization, sets of related composite activities can be organized and stored in a specialization hierarchy. Specialization hierarchies are similar to class hierarchies in object-oriented system, and can be used as the basis for structuring repositories of reusable architectural patterns.

[0177] The problem of specifying interdependency patterns among application activities can be similarly facilitated by a repository of dependency types for frequently occurring patterns of interaction. Because interconnection relationships can be described using a relatively narrow set of concepts, orthogonal to the problem domain of most applications, a standardized, but extensible, vocabulary of dependency types, can be used by designers to express the interaction requirements in their applications. The specialization mechanism of the architectural description language can be used to store and structure the vocabulary of dependencies. Such a repository may be considered as a design handbook of representations of coordination processes for managing dependencies of a variety of types. The design handbook may be used to review several instances of different types of coordination processes for managing types of dependencies.

[0178] Implementation of an example entity repository is described in more detail below. The entity repository may have a browser allowing for tree-like views into the hierarchies of the defined coordination processes. The browser may be implemented following the teachings of PCT Publication No. 94/19742. An implementation of a design handbook of coordination processes will now be described.

[0179] Repository of Coordination Processes

[0180] In the design handbook, the different kinds of dependencies in software systems define a design space which maps each type of dependency to a family of alternative coordination processes for managing it. A particular coordination process is selected from that family by specifying the values of a relatively small number of additional parameters called design dimensions. For example, a coordination process for managing a data flow dependency can be selected by specifying the type of carrier resource, e.g., shared memory, file, or pipe, and the paradigm, e.g., push, pull, peer or hierarchy, for managing the embedded prerequisite. Some of the alternatives can be automatically ruled out by compatibility constraints. For example, when designing a data flow between two components running under UNIX, only data transport mechanisms supported by UNIX can be considered as alternatives. This reduces the selection of a coordination process to a routine selection of a relatively small number of design parameters.

[0181] Generally speaking, the design handbook correlates a vocabulary of dependency types into a design space of coordination processes. Dependencies generally encode the need of an activity to interact with other activities, either because they use resources produced by other activities, or because they share resources with other activities. As a result, there generally are flow dependencies between producers and consumers, resource sharing dependencies among consumers of the same resource and timing dependencies which specify constraints on the relative timing of two or more activities. FIG. 31 illustrates levels of design dimensions for flow dependencies. Each of these design dimensions defines a way in which a particular dependency may be specialized. Similarly, there are a small number of timing dependency specializations which are also illustrated in FIG. 32. The design dimensions of flow dependencies will first be described in connection with FIG. 31.

[0182] The design dimensions represented in FIG. 31 also may be used to define bundles of alternative specializations within a particular category. With this kind of construction of the repository, all specializations of a particular bundle may inherit specializations in other bundles automatically. For example, all specializations under the single user flow dependency may inherit as further specializations all flow dependencies which are specializations on the number of producers.

[0183] Specialization of flow dependencies based on resource kind translates into types of useability dependencies. These dependencies represent the simple fact that resource user should be able to properly use produced resources. Similarly, accessibility dependencies specify that a resource must be accessible to a user before it can be used. Such accessibility dependencies may be represented as resource kind dependencies or prerequisite dependencies, or as sharing dependencies.

[0184] Prerequisite kinds of dependencies specify that a resource must be produced before it can be used. As indicated in FIG. 31, persistent prerequisites are one kind of prerequisite that specify that a single occurrence of an activity is an adequate prerequisite for an infinite number of occurrences of a second activity. An example is system initialization. Perishable prerequisites are special cases of permanent prerequisites, but occurrence of a third activity invalidates the effect of the first activity, which then must be repeated. Cumulative prerequisites permit occurrence of two activities to be interleaved so long as the number of occurrences of the second activity is always smaller than or equal to the number of completed occurrences of the first activity. This prerequisite often arises in asynchronous resource flows with buffering. Transient prerequisites specify that at least one new occurrence of a first activity must precede each new occurrence of a second activity. Lock step prerequisites specify that exactly one occurrence of a first activity must precede each occurrence of the second activity. They often occur in resource flows without buffering and are a special case of transient prerequisites.

[0185] Sharing dependencies arise when more than one activity requires access to the same resource. Sharing dependencies arise in different variations on the number of producers, number of users, and whether it involves resource sharing or consumer sharing. Resource sharing considerations arise in one-to-many flow dependencies because more than one activity uses the same resource. Consumer sharing dependencies arise in many-to-one flow dependencies because more than one producer produces for the same consumer activity. Sharing resources may have coordination requirements depending on the divisibility, consumability, or concurrency capabilities of the resource. Several example processes for managing these various types of dependencies are illustrated in U.S. Provisional Application Serial No. 60/013,694, filed Mar. 19, 1996.

[0186] Considering timing dependencies shown in FIG. 32, timing dependencies refer to relationships of two time intervals, shown as X and Y in FIG. 32. Timing dependencies are generally categorized into three types. First, mutual exclusion dependencies limit the total number of the set that can be executing at any one time. Such dependencies typically arise among competing users who share resources with limited concurrency. There are two types of mutual exclusion dependencies, namely prerequisite dependencies and prevention dependencies. Prerequisite dependencies specify that a first activity must complete execution before a second activity begins execution. These prerequisites arise in two general situations, described above, between producers and consumers of a resource. Prerequisites are a special way of managing mutual exclusion dependencies. Prevention dependencies specify that the occurrence of a first activity prevents further occurrences of a second activity. Such prevention may be permanent or temporary. These relationships are closely related to perishable prerequisite dependencies. One specialization of the prerequisite dependency specifies that a first activity should begin execution after completion of a second activity. This specialization imposes a minimum or maximum delay between completion of the first activity and the initiation of the second activity. This is similar to a lock step prerequisite. This dependency is useful in situations where resources produced a finite lifetimes and must be used within a specified time interval.

[0187] Another category of timing dependency is the overlap dependency which specifies that a first activity can only begin execution after a second activity is already in process. Such relationships typically imply resource relationships between the first and second activities. One subcategory of this kinds of dependency is the "during" dependency which specifies that a first activity can only execute during this execution of a second activity. As an example, a network client can only execute successfully during execution of the system's network driver. A starts dependency specifies that a first activity must start execution whenever a second activity starts execution. As an example, a printer driver is often initialized at the same time a word processor program is started. A particular form of this dependency is the simultaneity which specifies that all activities in a set must start execution at the same time. These dependencies can be transformed into many-to-many prerequisite dependencies and managed as such.

[0188] Another kind of timing dependency is a finishes dependency which specifies that the completion of a first activity also causes a second activity to terminate. This dependency is most often used to specify application termination relationships. A particular specialization of this dependency is the simultaneous end dependency which specifies that all activities in a set must terminate if any of them completes execution. As can be seen, many of these timing dependencies can be represented by prerequisite flow dependencies, and can be managed as such.

[0189] More complex composite dependencies can be represented to indicate arbitrary static flow patterns, multiple unit directional flows, exchange dependencies, circular flows, etc. Each of these dependencies has corresponding coordination processes associated therewith. Each of the design dimensions specifies a different dependency type for which there may be several coordination processes. These coordination processes have characteristics which define coordination design dimensions within a particular dependency type. Each point in the coordination design space defines a different coordination process. There are many other ways to represent the design dimensions for coordination processes. Accordingly, the foregoing is neither exhaustive nor limiting of the present invention.

[0190] Automatic Generation of Executable Code from Software Architecture Descriptions

[0191] Given a description of a software system using the above-described architectural description language, executable program code may be generated by transforming a software architecture definition according to a process which will now be described in connection with FIGS. 18-30. Generally, in this process, given an application architecture diagram using the architectural description language described above, generic activities are iteratively specialized. Unmanaged dependencies also are managed iteratively. Executable design elements are then integrated into code modules. Each of these steps now will be described in more detail.

[0192] As discussed above, activities can be generic or executable, which enables designers to specify the architecture of their applications at any desired level of abstraction. However, in order for executable code to be generated, all generic activities must first be replaced by executable specializations. Executable atomic activities, or primitive activities, are associated with some code-level software component, such