Programming Process Coordination in Little-JILy 1 ... - CiteSeerX

83 downloads 20 Views 151KB Size Report
University of Massachusetts. Amherst, Massachusetts 01003. (flerner, ljo ..... Research Studies Press, Ltd., Taunton, Somerset, England, 1994. 2] G erome ...
Programming Process Coordination in Little-JILy

Toward the Harmonious Functioning of Parts for E ective Results Position Paper Barbara Staudt Lerner, Leon J. Osterweil, Stanley M. Sutton Jr., and Alexander Wise Computer Science Department University of Massachusetts Amherst, Massachusetts 01003 (flerner, ljo, sutton, [email protected]) March, 1998

1 Introduction Process programming remains a challenging problem for software process technology support. The complexity of process languages and the e ort of process programming using these languages has hindered both the development and adoption of process programming technology. We are addressing these problems of process language design and development through a three-part strategy: 1. Focusing on a subset of process requirements related to coordination, in particular, to the coordination of activities and agents 2. De ning appropriate abstractions (and language constructs) to capture important coordination aspects of software processes 3. Devising visual yet rigorous representations to facilitate the e ective use of the language This research was supported by the Air Force Research Laboratory/IFTD and the Defense Advanced Research Projects Agency under Contract F30602-97-2-0032. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the ocial policies or endorsements, either expressed or implied, of the Defense Advanced Research Projects Agency, Air Force Research Laboratory/IFTD or the U.S. Government. y Submitted to the European Workshop on Software Process Technology, September 1998 

1

By focusing on coordination, we address a necessary aspect of all software processes. Moreover, our experience suggests that the programming of activity and agent coordination is largely sucient for software processes in many contexts. Additionally, we can reduce the complexity of the language and supporting technology, simplifying their de nition and development, and facilitating their application and evaluation. Based on our experience with earlier process programming languages (our own and others), we have identi ed the following kinds of abstractions and language features as especially important for programming coordination:       

A multi-paradigm control model A few basic but general constructs for proactive control Preconditions and postconditions on process steps Resource speci cation, modeling, and management Flexible exception handling Explicit, controlled data ow Agent speci cation, binding, and delegation

We have found these useful for programming a variety of software and other processes, including work ow and knowledge discovery processes, among others (robotic coordination is planned). The main sorts of features that are missing from the above list are the usual features of a general programming language, such as varied imperative commands and data type de nitions; also missing are constraint (or rule) speci cations, which are common in process languages. These omissions help to focus our approach on coordination and to simplify language de nition and implementation. Given an appropriate set of abstractions, the need to rely on general programming-language constructs to support coordination is reduced. Additionally, we have found that many processes decompose into high-level coordination and low-level computations. We propose using a coordination language to program the high-level coordination aspects, while using a computational process language (such as JIL [11]) or a standard programming language (such as Java), to implement the computational elements. Coordination-style operators are found in some more traditional process languages (e.g., [2, 11]), and coordination is also a feature of black-board style languages (e.g., [9]). Finally, to facilitate use of the language, we have adopted a visual syntax. An important characteristic of this syntax is that it is automatically interpretable according to rigorous execution semantics. While there are many graphical process de nition languages, most lack adequate semantic depth or rigor to support automatic execution. Exceptions include Petri-net-based systems and a few others (e.g., [1, 6, 4, 12]). A distinguishing characteristic of our approach is the style of program representation, which emphasizes the hierarchical composition of individually simple 2

steps rather than the typical approach of arbitrarily complex, nested ow graphs. In our experience this has helped to promote the clarity and understandability of our process coordination programs without sacri cing expressiveness. In the following section we give an overview of Little-JIL, a process coordination language that we have developed according to the three-part strategy outlined above.

2 Example To demonstrate the coordination abstractions of Little-JIL, we will use a high-level description of Booch's object oriented design (BOOD). In BOOD, designers rst identify classes and objects from the requirements and insert them into a data dictionary, then identify their semantics and the relationships between them, and then \implement" the classes by elaborating their design either by reusing an existing design or if no existing design is usable via custom implementation. This process repeats until all of the classes are elaborated in sucient detail. Figures 1 and 2 show a partial implementation of BOOD. We will highlight how Little-JIL supports coordination by discussing the example, leaving many details unexplained. Also, it is important to realize that this is not a complete de nition of BOOD. The Little-JIL editor allows the user to selectively hide information to avoid a cluttered presentation and allow a concise high-level picture of a process. A detailed understanding is gained by selectively displaying detail. Each step in a process is visually represented in Little-JIL by a step name surrounded by several graphical badges which represent aspects of the step. The black bar below the step represents the control of a step's sub-steps. The left-most badge in the step bar de nes the proactive control

ow. For example, step Booch in Figure 1 contains a sequential badge indicating that its substeps should be executed from left to right sequentially. In contrast, step Reuse Implementation is a choice and indicates that the agent assigned to the step should choose one of the sub-steps as a means of completing the task. Implement is a try step which requires alternatives to be tried sequentially until one succeeds.

Resources are part of a step interface, identi ed by a circle above a step name. (Step interfaces

also include declarations of formal parameters, local objects, and exceptions thrown, which are omitted from the gure.) By default, resources are acquired in mutual exclusion, but we are investigating a variety of forms of sharing and delegation to allow more concurrency. For example, the Data Dictionary is updated when identifying classes and objects. It is declared therefore as a resource for that step, ensuring coordinated use of the data dictionary. The arrows drawn next to the arcs connecting Booch to its sub-steps represent the data ow between the steps. (Most of the data ow is elided in this example.) In particular, Identify Relationships produces a class diagram (declared in step Booch), that is referenced when designing 3

Booch More_Abstractions_Needed dict: Data_Dictionary Class_Diagram

...

Identify_Classes_and_Objects

Class_Diagram

...

Identify_Semantics

No_More_Abstractions_Needed

...

Identify_Relationships

Reuse_Implementation

...

Implement

...

Custom_Implementation Designing_for_Java

Reuse_via_Inheritance

...

Reuse_via_Delegation

...

Reuse_via_Parameterized_Class Not_Designing_for_Java

Figure 1: The Booch Process (BOOD) in Little-JIL the implementation of the classes in the diagram. Little-JIL steps may have preconditions and postconditions. Preconditions are represented by downward pointing triangles to the left of the name of a step (for example, step Reuse via Parameterized Class) and postconditions by an upward pointing triangle to the right of the step name (for example, step Implement.) Conditions are checked at the beginning and end of the execution of a step to ensure that the step can be, or was, executed correctly. If a condition fails, it throws an exception either preventing the step from executing, or preventing it from completing successfully. For example, Reuse via Parameterized Class has a precondition precluding this choice from being selected if the design will be coded in Java. We have elided many of the preconditions and postconditions in the example.

Exception handlers are identi ed by an \X" at the right end of the step bar. An exception

handler may specify a step to be executed when the exception is raised and how the step should continue after handling the exception. The Reuse Implementation step for example, reacts to the Designing for Java exception (which is thrown by the Not Designing for Java precondition) by requiring the designer to try another alternative (indicated by the arrow) to get reuse. Figure 2 highlights features of Little-JIL regarding agent coordination and reactive control. It shows an extension of BOOD to coordinate multiple designers. Each Little-JIL step has an agent associated with it. An agent may be human or automated (a robot or infobot, for example). Agents 4

agent: Project_Manager Multi-Designer Booch

NoMoreAvailable NoMoreNeeded Requirements_Update

agent: Designer

...

Booch

...

Propagate_Changes Multi-Designer Booch

Figure 2: Multi-User BOOD: Agent Coordination in Little-JIL are treated as special types of resources and are therefore declared in the same way as resources. If a step does not declare its own agent, it uses the same agent as its parent. In Figure 2, we see two agents: a project manager and a designer. We also see a common Little-JIL idiom: resource-bounded parallelism. In this example, a project manager assigns tasks to individual designers. Each designer can begin work in parallel with the manager making more assignments (represented by the parallel control operator). At any point the manager can stop making assignments or the project could run out of designers to whom assignments can be made. The parallelism is limited by the number of designers available; since designers are resources, this represents resource bounding. The nal feature of Little-JIL presented in this example is reactive control represented by the \lightning bolt" in the center of the step bar. This represents asynchronous reactions to global events. For example, when the requirements change, a step is started that propagates the changes to the a ected designers. The syntax of Little-JIL is unique and therefore requires some learning. We have found, however, that it provides a very concise, high-level picture of a process while allowing details to be expanded selectively. Furthermore, the precisely de ned semantics of the constructs, although not fully described here, allow meaningful discussion and rigorous analysis of process de nitions.

3 Discussion The Little-JIL strategy focuses on coordination while deemphasizing computation. This is most appropriate for processes that rely on elements that are external to the process program. This includes processes that are largely manual or otherwise agent based, where the agents can bene t from coordination or where the process can bene t from agent control. It also includes processes that require coordinating use of independent tools, artifacts, etc. The approach is generally applicable where coordinative and computational aspects can be separated, or to processes that are 5

simply non-computational. We have found coordination processes to be common in many domains. We have written Little-JIL programs for several software processes, including object-oriented design, formal veri cation, and static analysis, as well as for the various domains noted above. Coordination process programming naturally lends itself to work ow processes, which frequently have the characteristics indicated above (e.g., human agents, existing external tools). We have also been exploring the applicability of Little-JIL to processes of knowledge discovery in databases (KDD) [7]. At a low level, KDD processes can be computationally intensive. At higher levels, though, we have found that KDD processes involve combinations of human and automated agents, management of resource usage, and other elements that make them suitable for coordination process programming. We are also beginning to explore the use of Little-JIL in coordinating teams of recon gurable autonomous robots (or mixed human-robot teams). Even in programs that are primarily coordinative, it is sometimes convenient to express pre/postconditions, control of choices, and termination of recursion with a few simple computational expressions or statements. These actions can be written in conventional programming languages and integrated into the process as agents. Another issue is process deviation and the consistency of internal process models with corresponding external conditions [10, 3]. This issue is especially important for coordinative process languages, which may rely heavily on external agents or other models of the real world (e.g., resource models). Within Little-JIL, pre/postconditions can protect the execution of processes from inappropriate conditions, exception handlers can respond to detected problems, and intelligent agents may be able to control process execution as appropriate to external circumstances. Additional work is needed on environmental support in this area.

4 Status and Directions Preliminary versions of the Little-JIL language and editor have been developed and demonstrated; work is being completed on the rst standard version (1.0). A supporting agenda manager [8] and resource manager are begin developed (prototypes are operational), and work on integrating Little-JIL with AI-based scheduling [5] is in progress. Work on support for visualization, analysis, measurement, and evaluation is beginning. We plan to pursue coordination process programming in a variety of domains. We believe that the simplicity of the approach and generality of the paradigm should make it both readily adoptable and widely useful.

6

References [1] Sergio Bandinelli, Alfonso Fuggetta, Carlo Ghezzi, and Luigi Lavazza. SPADE: An Environment for Software Process Analysis, Design, and Enactment. In Anthony Finkelstein, Je Kramer, and Bashar Nuseibeh, editors, Software Process Modelling and Technology, chapter 9, pages 223{248. Research Studies Press, Ltd., Taunton, Somerset, England, 1994. [2] Gerome Canals, Nacer Boudjlida, Jean-Claude Derniame, Cladue Godart, and Jaques Lonchamp. ALF: A framework for building process-centred software engineering environments. In Anthony Finkelstein, Je Kramer, and Bashar Nuseibeh, editors, Software Process Modelling and Technology, pages 153 { 185. John Wiley & Sons Inc., 1994. [3] G. Cugola, E. Di Nitto, A. Fuggetta, and C. Ghezzi. How to deal with deviations during process model enactment. ACM Trans. on Software Engineering and Methodology, 5, July 1996. [4] S. Dami, J. Estublier, and M. Amiour. APEL: A graphical yet executable formalism for process modelling. Automated Software Engineering, 5(1):61{96, January 1998. [5] Alan Garvy, Keith Decker, and Victor Lesser. A negotiation-based interface between a realtime scheduler and a decision-maker. In Proceedings of Workshop on Models of Con ict Management in Cooperative Problem Solving. AAAI, 1994. [6] Volker Gruhn and Rudiger Jegelka. An evaluation of FUNSOFT nets. In Proc. of the Second Eurpoean Workshop on Software Process Technology, September 1992. Trondheim, Norway. [7] D. Jensen, Y. Dong, B. S. Lerner, L. J. Osterweil, S. M. Sutton Jr., and A. Wise. Represening and reasoning abou knowledge discovery processes. In Fourth International Conf. on Knowledge Discovery and Data Mining, 1998. submitted. [8] Eric K. McCall, Lori A. Clarke, and Leon J. Osterweil. An Adaptable Generation Approach to Agenda Management. In Proc. of the 20th International Conference on Software Engineering, 1998. To appear. [9] Carlo Montangero and Vincenzo Ambriola. OIKOS: Constructing process-centered sdes. In Anthony Finkelstein, Je Kramer, and Bashar Nuseibeh, editors, Software Process Modelling and Technology, pages 33 { 70. John Wiley & Sons Inc., 1994. [10] Stanley M. Sutton, Jr. Opportunities, limitations, and tradeo s in process programming. In Proc. of the Second International Conference on the Software Process, pages 135{146, 1993. [11] Stanley M. Sutton, Jr. and Leon J. Osterweil. The design of a next-generation process language. In Proceedings of the Joint 6th European Software Engineering Conference and the 5th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 142{158. SpringerVerlag, 1997. 7

[12] Patrick S. Young and Richard N. Taylor. Human-executed operations in the teamware process programming system. In Proceedings of the Ninth International Software Process Workshop, 1994.

8

Suggest Documents