The Little-JIL Process Definition Language Leon J. Osterweil (ljo@cs.umass.edu) Lab. For Advanced SE Research (LASER) http://laser.cs.umass.edu University of Massachusetts Amherst, MA USA USC Center for Software and Systems Engineering 17 March 2008 USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Different People “Do Process” in Different Domains for Different Reasons • • • • • • • Good Communication Effective Coordination Greater Efficiency Effective use of Automation Better Education and Training Continuous Improvement Reinvention thru Understanding USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Different People “Do Process” in Different Domains for Different Reasons • • • • • • • Good Communication Effective Coordination Our main interests Greater Efficiency Effective use of Automation Better Education and Training Continuous Improvement Reinvention thru Understanding USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Yields two complementary sets of issues • Macro view – What does it do/how does it behave • Micro view – How does it effect its behavior Each benefits the other USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Process as Object Outputs Input Artifacts Artifacts Effects Resources: People Money Tools Time USC CSSE 17 March 2008 Process Other Behaviors Cost Time Errors Copyright L. Osterweil, all rights reserved Macro Focus Outputs Input Artifacts Artifacts Effects Resources: People Money Tools Time USC CSSE 17 March 2008 Process Other Behaviors Cost Time Errors Copyright L. Osterweil, all rights reserved Micro-Process Focus Outputs Input Artifacts Artifacts Effects Resources: People Money Tools Time USC CSSE 17 March 2008 Process Other Behaviors Cost Time Errors Copyright L. Osterweil, all rights reserved Each Benefits the Other Outputs Input Artifacts Artifacts Effects Resources: People Money Tools Time USC CSSE 17 March 2008 Process Other Behaviors Cost Time Errors Copyright L. Osterweil, all rights reserved Bridging Micro- and Macro• Explain how behaviors are produced • Suggest changes, predict their effects • Validate changes before they are made Each has interests in all of these Each knows it needs the other’s approach USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Analogy to other disciplines • Economics • Physics – Thermodynamics – Electricity • Medicine/biology USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved What we learn from the analogies • • • • Macro- approach comes first Limited success in engineering Micro- approach/theory follows Facilitates more effective engineering – Improved predictability – Reduced uncertainty – Fewer surprises USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Overview of Our Micro Approach • Processes are Software • Engineer them the way we engineer software – Define them in a rigorously defined language – Reason about them using software analysis – Execute them – Employ continuous process improvement • Starts with need for language(s) – To materialize processes – To provide execution semantics – Make them amenable to analysis and improvement USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Language Desiderata • • • • Precise Detailed Broad in scope Clear USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Language Desiderata • • • • Precise Detailed Broad in scope Clear Diagrams and pictures won’t do USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Some Key Process definition issues • Blending proactive and reactive control • Coordinating human and automated agents – Without favoring either • Dealing with exceptions • Specification of resources • Real time specification • Assignment of agents • Scaling • Reuse • Novel transaction notions – Long, nested USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved The Little-JIL Process Language • Vehicle for exploring language abstractions for – Reasoning (rigorously defined) – Automation (execution semantics) – Understandability (visual) • Supported by – Visual-JIL graphical editor – Juliette interpreter • Evaluation by application to broad domains • A third-generation process language • A “work in progress” USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Four parts to a Little-JIL Process • • • • Coordination diagram Artifact space Resource repository Agents USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Little-JIL Language Architecture Agents Steps Actors Activities Coordination Artifacts Resources USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Hierarchy, Scoping, and Abstraction in Little-JIL • Process definition is a hierarchical decomposition • Think of steps as procedure invocations – They define scopes – Copy and restore argument semantics • Encourages use of abstraction – Eg. process fragment reuse USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Hierarchy, Scoping, and Abstraction in Little-JIL • Process definition is a hierarchical decomposition • Think of steps as procedure invocations – They define scopes – Copy and restore argument semantics • Encourages use of abstraction – Eg. process fragment reuse These have all been very successful USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved The “Step” is the central Little-JIL abstraction Interface Badge (parameters, resources, agent) Prerequisite Badge Postrequisite Badge TheStepName X Handlers Substep sequencing Exception type Artifact flows continuation USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved An Example: Open Cry Auction USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Proactive Flow Specified by four Sequencing Kinds • Sequential – In order, left to right • Parallel – Any order (or parallel) • Choice – Choose from Agenda – Only one choice allowed • Try – In order, left to right Iteration usually through recursion Alternation using pre/post requisites USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Pre- and Post-requisites • Steps guarded by (optional) pre- and postrequisites • Are steps themselves • Can throw exceptions • May be executed by different agents – From each other – From the main step USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Exception Handing: A Strong Feature of Little-JIL • Steps may have one or more exception handlers • Handlers are steps themselves – With parameter flow • React to exceptions thrown in descendent steps – By Pre- or Post-requisites InterfaceFiles – Or by Agents Don’tCompile DevelopInterfaceFiles InterfaceFilesCompile USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Four different continuations on exception handlers • Complete –Handler was a “fixup”; substep is completed • Continue –Handler cleaned up; parent step is completed • Restart –Handler cleaned up; repeat substep (deprecated) • Rethrow –Rethrow to parent step USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Artifact flow • Primarily along parent-child edges – As procedure invocation parameters – Passed to exception handlers too – Often omitted from coordination diagrams to reduce visual clutter • This has been shown to be inadequate – Artifacts also need to flow laterally – And subtasks need to communicate with each other USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Data Channels and Lateral flow • • • • • • Data Channel is like a queue in some ways Can specify step(s) that can add artifacts And steps that can take them All artifacts must be of the same type Queue semantics are only ones allowed Generalizations of these are needed USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Resources • Entities needed in order to perform step • Step specifies resource needed as a type – Perhaps with attributes, qualifiers • Resource instances bound at runtime • Exception when “resource unavailable” USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Resources • Entities needed in order to perform step • Step specifies resource needed as a type – Perhaps with attributes, qualifiers • Resource instances bound at runtime • Exception when “resource unavailable” Much research is needed here USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Examples of Resources • Access to artifacts: shared document, locks on databases • People: various kinds with varying skills • Tools: compilers, CASE tools • Agents: Each step has a distinctly identified unique resource responsible for execution of the step (and all of its substeps) May be complex relations among them USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Resource Request Example Agent: OODDesigner;expert tool: ClassDiagramEditor artifact: DiagramReposLock IdentifyRelationships SpecifyRelationships RefineRelationships Resource request is a query on the Resource specification repository USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Agents • Collection of all entities that can perform a step – Human or automated • Process definition is orthogonal to assignments of agents to steps – Path to automation of process • Have freedom to execute leaf steps in any way they want USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Try and Step Kinds support human (agent) flexibility Implement Reuse_Implementation Look_for_Inheritance Custom_Implementation Look_for_Parameterized_Class Look_for_Objects_to_Delegate_to USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved An Articulate Process Can Help Answer These Questions Where does output go? Requirements What to do when reviews fail? What causes this rework? High-Level Design What portion of activity should be done? Low-Level Design Code Test How do we break this cycle? USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved High-Level Process USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Trivial Example Elaboration of Requirements Step USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Trivial Example Elaboration of Design Step USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Requirements Rework USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Requirements Rework Invocation of step originally defined as substep of Requirements USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Requirements Rework Same exception thrown Invocation of step originally defined as substep of Requirements USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Requirements Rework Same exception thrown Invocation of step originally defined as substep of Requirements USC CSSE 17 March 2008 Different invocation context -> different response Copyright L. Osterweil, all rights reserved USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Timing • Step has (optional) deadline specification • Exception when deadline exceeded • Parent can proceed – Child may be unaware of this USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Timing • Step has (optional) deadline specification • Exception when deadline exceeded • Parent can proceed – Child may be unaware of this Much research needed here: A major oversight in most process languages USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Transaction Semantics Needed • There is a need to specify atomic tasks • And to deal with the need for – Rollback – Compensation • Nested Transactions • Long Transactions USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Verification of Four Key Characteristics • Precise – From FSA definitions of step semantics • Detailed – From hierarchical elaboration capability • Broad in Scope – Exceptions, abstraction, timing, resources, concurrency, channels, artifact flow, etc. • Clear – Visual – Use of abstraction USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Using Little-JIL to drive User Interfaces • Process execution used to control multiple graphical user interfaces (GUIs) • Involves communication between Little-JIL and user’s screen • Communication done through a “Dispatcher” capable of interfacing to different types of GUI platforms. • Dispatcher controlled by a binding script • Script is capable of describing multiple types of GUI platforms (desktop or web) with a high-level syntax USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Architecture User Interfaces screen changes process directives Dispatcher QuickTime™ and a TIFF (LZW) decompressor are needed to see this picture. QuickTime™ and a TIFF (LZW) decompressor are needed to see this picture. QuickTime™ and a TIFF (LZW) decompressor are needed to see this picture. user interactions Executing Little-JIL Process process updates Binding Script USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved High Level Design USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Issues from Barry USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Process V&V • Rigorous Little-JIL semantics support definitive analyses • Automatic generation of flowgraph • Finite state verification for process defects – Propel used to define properties – FLAVERS used for analysis • Fault tree generated from Little-JIL – FTA and FMEA analysis of Fault Tree • Automatic generation of discrete event simulations • Applied in medical process analyses, election process analyses USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Ambiguity Tolerance • Little-JIL program has four “factors” – Activities – Agents – Resources – Artifacts • Each can be developed at a different rate • Leaf steps can be left unelaborated • Resources are left as types, not instances – Late-bound at run time • Some analyses of incomplete definitions • Different simulations with different resource loadings USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Little-JIL Scalability • Largest process definitions so far: – Chemotherapy Process » 426 total steps » 381 step declarations + 45 references » 270 leaf step declarations – Brainstorm » 109 step declarations » 55 step references » 51 leaf step declarations • Generate flowgraphs with tens of thousands of nodes and edges USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Extensibility • Processes are quite extensible, but language extensibility is much harder • Process extensibility by – Elaboration of leaf steps » E.g. by reference to existing steps/modules – Augmenting resource model and repository • Language extensibility – By modification of FSAs that define step kind semantics – Resource model and request language are orthogonal and more easily extensible USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Coverage • As a management vehicle – Management and Operations process are defined as being in parallel » Report travel across channels » Management decisions and resources too – Reporting data gathered from channels • Step cost, schedule annotations can be basis for projections using static analysis • Steps are modules – Facilitates reuse – Facilitates extensibility – Facilitates comprehension USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Dynamism • Exception handling is a key feature – React to runtime exceptions • Facility for catching and reacting to signals/events • Resources are late bound – Resource instances can be added/removed during execution • Analysis support continuous process improvement USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Processes in Other Domains • Mechanical Engineering • Ecommerce – Processes such as auctions – Online license renewal • Robotics • Digital Government – Labor/management negotiation – Elections • Medical/nursing processes • Distributed scientific statistical data processing – The Analytic Web Project USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Some Observations • Process engineering is important, feasible • Effective process languages are possible – Borrowing from programming languages helps » Abstraction, scoping, exception management, concurrency, etc. – Transactions and Real-time are needed too • Analysis is feasible for detecting defects – Basis for systematic process improvement • Process guided execution has value – Needs process guided user interface management USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Little-JIL Process Development Process Programmer Process Definition Various Editors Resources Definition Artifacts Definition USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Editors • Coordination Diagram Editing – Visual JIL (for version 1.3) is available – Visual JIL/Eclipse (for version 1.5) soon (?) – Textual “viewer” » Also “outline form” views • Resource Editor – Is under development • Artifact Editor – Currently use Java Beans USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Little-JIL Execution Architecture Process Programmer Process Definition Various Editors Resources Definition Artifacts Definition Coordination Structure Resource Repository Artifact Repository Execution Engine (Juliette) Agenda Manager Agendas Agents USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Execution Engine • Version 1.3 – In use – Prototype, undistributable • Version 1.4/1.5 – In late development – Expected to be distributed USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Static Analysis of Little-JIL Process Process Programmer Analyzers Properties Flavers Fault Tree Analyzer Simulator Process Definition Various Editors Resources Definition Artifacts Definition USC CSSE 17 March 2008 Coordination Structure Resource Repository Agenda Manager Artifact Repository Copyright L. Osterweil, all rights reserved Analysis/Reasoning is Key Goal • Before execution, be sure the process is “suitable” • Various analyses for various kinds of suitability • No limit to possible analysis • Integration of capabilities needed USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Analysis Examples • Finite State Verification – To find process defects • Fault Tree Analysis – To understand consequences of incorrect performance • Failure Mode Effects Analysis (FMEA) – To determine ripple effects • Discrete Event Simulation – To evaluate different execution strategies (eg. resource loading decisions) • And more….. USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Interfacing with Little-JIL Agents Process Programmer Process Definition Various Editors Resources Definition Artifacts Definition Coordination Structure Resource Repository Artifact Repository User Interface Manager USC CSSE 17 March 2008 Execution Engine (Juliette) Agenda Manager Agendas Agents Copyright L. Osterweil, all rights reserved Little-JIL Environment Architecture Process Programmer Analyzers Properties Flavers Fault Tree Analyzer Simulator Process Definition Various Editors Resources Definition Artifacts Definition Coordination Structure Resource Repository Artifact Repository User Interface Manager USC CSSE 17 March 2008 Execution Engine (Juliette) Agenda Manager Agendas Agents Copyright L. Osterweil, all rights reserved Juliette • The Execution Engine for Little-JIL processes • Implements coordination among agents – Human – Machine – Internal components • Moves artifacts around • Acquires resources as needed USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Status • Little-JIL – Version 1.5 defined – Version 1.4 editor working • Juliette – Version 1.3 interpreter works » Not distributable – Version 1.4 working now » Eventually distributable • Resource Manager – Crude prototype only • User Interface Dispatcher – Prototype works – Eventually distributable USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Engineering: Partial Gear Train Design Process • Allows reworking previous design steps with new constraints • Drives novice design/training tool • Based on concrete design activity USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Gear Design Optimization Process USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Robot Coordination Process USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved The Future: Full Process programming Environment • • • • • Editors for creating processes Execution engine Analyzers of all kinds Powerful and comfortable user interfaces Superior integration of all of the above USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Major Components • Agents – The actors in processes • Agenda Management System – Manages communication between agents and processes • Step Interpreters – Enacts processes • Resource Manager – Optimizes allocation of agents and other contended entities • Artifact Manager – Enables the creation and manipulation of work products USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Juliette Runtime Architecture USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Resource Management • Resource Model – Represent structure of resources – Their interrelations – Their constraints • Resource Manager – Maintain a repository of resource instances – Accept requests for resources – Provide (optimal?) instances – Dynamic state management USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Resource Research Issues • • • • • What is a resource? How to model resources? How to represent resource constraints? How to request resources? How to do resource allocation? USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Proposed Architecture Specify User Resource Object Repository Resource Model 1 Resource Modeling Component Resource Model m ... Consult System Using the Resource Manager Consult Resource Request Interpreter Resource Request Resource Constraints Processed Request Consult/ Update Match maker Scheduler Assignment Consult Update Allocation Table USC CSSE 17 March 2008 Resource Allocation Component Copyright L. Osterweil, all rights reserved ODR Process – Process Variation Examples » Levels of Anonymity » Role of the Mediator USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Process Fragment: Administer USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Process Fragment: Change Phase USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Process Fragment: Add Option Example of a sub-process with leaf steps. Performed by a human agent. USC CSSE 17 March 2008 Performed by a software agent. Copyright L. Osterweil, all rights reserved Binding Script Example agent: Participant * item: Contribute Items.POSTED action: Contribute Items.START action: setCurrentPage(“ParticipantBrainstormPage”) action: showComponent(“ContribueItemComponent”) item: View Items.POSTED action: View Items.START action: displayArtifactInComponent(“state BrainstormState”, “ContributeItemComponent”) USC CSSE 17 March 2008 Copyright L. Osterweil, all rights reserved Little-JIL Environment Architecture Process Programmer Analyzers Properties Flavers Fault Tree Analyzer Simulator Process Definition Various Editors Resources Definition Artifacts Definition Coordination Structure Resource Repository Artifact Repository User Interface Manager USC CSSE 17 March 2008 Execution Engine (Juliette) Agenda Manager Agendas Agents Copyright L. Osterweil, all rights reserved