1 Introduction to the ToolBus Coordination ArchitecturePaul Klint
2 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
3 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
4 The problem: component interconnectionSystems become heterogeneous because we want to couple existing and new software components different implementation languages different implementation platforms different user-interfaces Systems become distributed in local area networks Needed: interoperability of heterogenous systems
5 Component interconnection: reasonsReusing existing components decreases construction costs of new systems Decomposing large, monolithic systems into smaller, cooperating components increases modularity flexibility
6 Component interconnection: issuesData integration: exchange of data between components Control integration: flow of control between components User-interface integration: how do the user- interfaces of components cooperate?
7 Data integration Data representations differ permachine: word size, byte order, floating point representation, ... language implementation: size of integers, emulation of IEEE floating point standard, ... How can we exchange data between components: integers, reals, record => linear encoding pointers => impossible in general
8 Data integration Assume a common representation RFor each component Ci (with data domain Di) there exist conversion functions fi : Di -> R and fi-1: R -> Di Convert a value di from Ci to Cj by fj-1(fi(di)) Examples: IDDL, ASN-1, ... ToolBus uses ATerms as common representation
9 Control integration Broadcasting: each component can notify other components of state changes Remote procedure calls: components can call each other as procedures General message passing: the most general approach In the ToolBus Tscripts are used to model the interactions between components
10 User-interface integrationThere is a general trend towards multi-threaded user-interfaces (concurrency) There is a general trend to use formal techniques to specify user-interfaces The ToolBus does not address user-interface integration as separate issue but can be used to achieve it
11 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
12 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
13 Brief history of the ToolBusAround 1992 the first implementation of the ASF+SDF Meta-Environment was completed: 200 KLOC Lisp code Monolithic Hard to maintain ... all traits of a legacy system
14 Time line 1992: Unsuccessful decomposition experiments1994: First ToolBus 1995: Discrete time ToolBus 2001: Meta-Environment restructured 2002/3: preparing for the next generation ...
15 1992 Emacs User-interface Graphical Objects Structure & texteditor Structure editor Other parts Other parts Old New
16 1993 Difficult synchronization and communication problems problems start to appear PSF specification of communication; simulation reveals several deadlocks Problems with this specification: complex (> 20 pages) and ad hoc difficult to extend cannot be used to directly coordinate the components
17 1993/1994 Idea of a “ToolBus” as general communication structure appeared First design and implementation Several experiments Feature interaction in telephone switches (RUU/PTT) Traffic control (Nederland Haarlem/UvA/CWI/RUU) Management of complex bus stations (idem) Definition of user interfaces (UvA)
18 1994/1995 Fall 1994: redesign based on this experienceSpring 1995: design and implementation of Discrete Time ToolBus completed First experiments to prototype parts of the Meta- Environment started
19 More recently ... In 2001 a new implementation of the Meta- Environment based on the ToolBus was completed End 2002 we have started on a new generation ToolBus based on these experiences ...
20 ToolBus requirements Flexible interconnection architecture for software components Good control over communication Relatively simple descriptions Uniform data exchange format Multi-lingual: C, Java, Perl, ASF+SDF, ... Potential for verification Use existing concurrency theory
21 Coordination, Representation & ComputationCoordination: the way in which program and system parts interact (procedure calls, RMI, ...) Representation: language and machine neutral data exchanged between components Computation: program code that carries out a specialized task A rigorous separation of coordination from computation is the key to flexible and reusable systems
22 Architectural Layers Coordination Representation RepresentationCooperating Components Coordination Single Component Single Component Representation Computation Representation Computation
23 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
24 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
25 Generic Representation Annotated Terms (ATerms)Applicative, prefix terms Maximal subterm sharing ( DAG) cheap equality test, efficient rewriting automatic generational garbage collection Annotations (text coordinates, dataflow info, ...) Very concise, binary, sharing preserving encoding Language & machine independent exchange format
26 ATerms Term and Annotations
27 A term is ... a Boolean, integer, real or stringtrue, 37, 3.14e-12, “rose” a value occurrence of a variable X, InitialAmount, Highest-bid a result occurrence of a variable X?, InitialAmount?
28 A term is ... a single identifier f, pair, zero a function applicationpair(“rose”, address(“Street”, 12345)) a list [a, b, c], [a, 1.25, “last”], [[a, 1], [b, 2]] a placeholder
29 Matching of terms Term matching is used todetermine which actions can communicate to transfer data between sender and receiver Intuition: terms match if the are structurally identical value occurrence: use variable's value result occurrence: assign matched subterm to variable (only if overall match succeeds!)
30 Example of term matchingBefore match X : 3 Y : 7 Z : 17 Context 1 Context 2 Match f(X,4,Y?,6) and f(3,Z?,5,6) After successful match X : 3 Y : 5 Z : 4 Context 1 Context 2
31 Types The ToolBus uses its own type systemstatic checks & automatic generation of interface code bool, int, real, str list: list with arbitrary elements list(Type): list with Type elements list(int) term: arbitrary term
32 Types Id: all terms with function symbol Id (allows partial type declarations) f accepts f, f(1), f(“abc”,3), ... Id(T1, ..., Tn) f(int, str) accepts f(3,”abc”) but not f(3) [T1, ..., Tn] : list of elements with given types [int, str] accepts [1,”abc”] but not [1,2,3]
33 Types All variables have typesTypes are checked statically when possible Types play a role during matching: I is int variable, S is str variable, T is term variable match f(13) and f(I?) match f(13) and f(S?) match f(13) and f(T?) succeeds fails succeeds
34 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
35 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
36 The ToolBus architectureCoordination Representation Computation Tools ATerms common data exchange format
37 The ToolBus architectureProcesses inside the ToolBus can communicate with each other Tools can not communicate with each other Tools can communicate using a fixed protocol: ToolBus ToolBus ToolBus eval value ack-event do event Tool Tool Tool
38 Configuration knowledgeA typical scenario Configuration knowledge only in ToolBus script UI and DB are completely decoupled UI DB User-interface Database
39 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
40 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
41 ToolBus scripts: processesThe ToolBus: a parallel composition of processes Private variables per process P1+ P2 P1. P2 P1|| P2 P1* P2 :=, if then else All data are terms that can be matched A limited set of built-in operations on terms No other support for datatypes
42 ToolBus scripts: processesSend, receive message (handshaking) Send/receive notes (broadcasting) Subscription to notes Dynamic process creation Absolute/relative delay, timeout
43 ToolBus scripts: toolsExecute/terminate tools Connect/disconnect tools Communication between process and tool is synchronous Process can send evaluation request to tool (which returns a value later on) Tool can generate events to be handled by the ToolBus
44 Hello World The Tscript hello.tb Define the process HELLOIt only prints a string process HELLO is printf(“Hello world, my first Tscript!\n”) toolbus(HELLO) Define the initial processes in the application Start application with: toolbus hello.tb
45 Hello World: string generated by toolprocess HELLO is let H : hello, S : str in execute(hello, H?) . snd-eval(H, get-text) . rec-value(H, text(S?)) . printf(S) endlet tool hello is {command = “hello” } toolbus(HELLO) H will represent the tool S is a string variable Execute hello, H gets a tool id as value Request a text from hello tool Receive it, S gets the value assigned Definition of hello tool: may be written in any language
46 Simple clock with user-interfaceUI CLOCK ToolBus User can push a showTime button Provides a readTime function ui clock Tools User-interface Clock
47 Simple clock with user-interfaceprocess CLOCK is process-expression-1 tool clock is tool-definition-1 process UI is process-expression-2 tool ui is tool-definition-2 toolbus(CLOCK, UI)
48 Get time from clock toolprocess CLOCK is let Tid : clock, T : str in execute(clock, Tid?). ( rec-msg(showTime) . snd-eval(Tid, readTime) . rec-value(Tid, time(T?)) . snd-msg(showTime, T) ) * delta endlet Receive a message from another process Get time from clock tool Reply to the message ( ... ) * delta is an endless loop tool clock is { command = “clock” }
49 User-interface Receive event from ui tool Get the timeprocess UI is let Tid : ui, T : str in execute(ui, Tid?) . ( rec-event(Tid, button(showTime)) . snd-msg(showTime) . rec-msg(showTime, T?) . snd-do(Tid, displayTime(T)) . snd-ack-event(Tid, button(showTime)) ) * delta endlet Receive event from ui tool Get the time Display it in ui tool Processing of the event complete: send acknowledgement tool ui is { command = “wish-adapter -script ui.tcl” }
50 Tscripts: revisited Process communication: messages & notesComposite processes Expressions & built-in functions Time primitives Tools
51 Process communication: messagesMessages used for synchronous, two-party communication between processes snd-msg and rec-msg synchronize sender/receiver Communication is possible if the arguments match There is two-way data transfer between sender and receiver (using result variables)
52 Process communication: notesNotes used for asynchronous, broadcasting communication between processes Each process must subscribe to the notes it wants to receive Each process has a private note queue on which snd-note, rec-note and no-note operate
53 Process communication: notessubscribe to notes of a given form subscribe(compute(
54 Composite process expressionsOne of the atomic processes mentioned above delta (deadlock), tau (silent step) P1+ P2: choice (non-deterministic) P1. P2: sequential composition P1|| P2: parallel composition P1* P2: repetition
55 Composite process expressionsP(T1, T2, ...): a named process (with optional parameters) will be replaced by its definition create(P(T1, T2, ...), Pid?): dynamic process creation V := Expr: evaluate Expr and assign result to V if Expr then P1 else P2 fi if Expr then P1 fi = if Expr then P1 else delta fi
56 Expressions An expression is evaluated in the current environment of the process in which it occurs Constants evaluate to themselves: a Variables evaluate to their current values Lists evaluate to a list of their evaluated elements Some function symbols have a built-in meaning
57 Built-in functions Booleans: not, and, orIntegers: add, sub, mul, mod, less, less-equal, greater, greater-equal Lists: first, next, get, put, join, member, subset, diff, inter, size Miscellaneous: equal, not-equal, process-id, process-name, current-time, quote
58 Time primitives A (relative or absolute) delay or time out may be associated with each atomic process Relative time: delay(Expr) or timeout(Expr) Absolute time: abs-delay(y, mon, d, h, min, s) or abs-timeout(y, mon, d, h, min, s) Example: printf(“expired”) delay(10) printf(“Renew account”) abs-timeout(2004,4,1,12,0,0)
59 Process definitions Process definition: process Pname Formals is PFormals are optional and contain a list of formal parameter names process MakeWave(N : int) is ... All variables (including formals) must be declared and have a type let VarDecls in P endlet introduces variables: let E : str, V : int in ... endlet
60 Tools Tools have to be executed or connected before they can be usedRequires a tool definition: tool ui is { ... } Introduces a new type, e.g. ui Execute a tool: execute(ui, Uid?) Receive connection request: rec-connect(ui, Uid?) Tool identification is assigned to Uid (of type uid)
61 Tools snd-terminate: terminate an executing toolsnd-terminate(Tid) rec-disconnect: receive disconnection request from tool rec-disconnect(Uid) shutdown: terminate the whole ToolBus shutdown(“Auction ends”)
62 Tools initiative: ToolBus initiative: toolsnd-eval, rec-value: request tool to evaluate a term, and receive the resulting value from tool initiative: ToolBus snd-do: request tool to perform some action, there is no reply rec-event, snd-ack-event: receive event from tool, acknowledge it after appropriate processing initiative: tool
63 Tscripts A Tscripts consists of a list of process and tool definitionsa single ToolBus configuration A ToolBus configuration describes the initial set of active processes in the ToolBus: toolbus(Pname1, ..., Pnamen) Eache Pname is optionally followed by parameters
64 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples
65 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves
66 Example: calculator CALC BATCH CLOCK UI LOG ToolBus calc batch ui logTools
67 Example: calculator CALC: the calculation processBATCH: reads expressions from file, calculates their value, writes result back to file UI: the user-interface LOG maintains a log of all calculations CLOCK provides current time
68 Process CALC Receive compute message Let calc do the computationprocess CALC is let Tid : calc, E : str, V : term in execute(calc, Tid?). ( rec-msg(compute, E?) . snd-eval(Tid, expr(E)) . rec-value(Tid, val(V?)) . snd-msg(compute, E, V) . snd-note(compute(E, V)) )* delta endlet tool calc is { command = “calc”} Receive compute message Let calc do the computation Note for the logger Reply to compute message
69 Process BATCH Get an expression from batch tool Evaluate expressionprocess BATCH is let Tid : batch, E : str, V : int in execute(batch, Tid?). ( snd-eval(Tid, fromFile) . rec-value(Tid, expr(E?)) . snd-msg(compute, E) . rec-msg(compute, E, V?) . snd-do(Tid, toFile(E, V)) ) * delta endlet tool batch is {command = “batch”} Get an expression from batch tool Evaluate expression Value back to batch tool
70 User-interface When the user presses Calc, a dialog window appears to enter an expression The result is diplayed in a separate window Pressing showLog display all calculations so far Pressing showTime displays the current time Pressing Quit ends the application
71 User-interface: process UIprocess UI is let Tid : ui in execute(ui, Tid?) . ( CALC-BUTTON(Tid) + LOG-BUTTON(Tid))* delta || TIME-BUTTON(Tid) * delta QUIT-BUTTON(Tid) endlet tool ui is { command = wish-adapter -script calc.tcl” } Calc and Log button are exclusive Time and Quit button are independent
72 User-interface: CALC-BUTTONprocess CALC-BUTTON(Tid : ui) is let N : int, E : str, V : term in rec-event(Tid, N?, button(calc)) . snd-eval(Tid, get-expr-dialog) . ( rec-value(Tid, cancel) + rec-value(Tid, expr(E?)) . snd-msg(compute, E) . rec-msg(compute, E, V?) . snd-do(Tid, display-value(V)) ) . snd-ack-event(Tid, N) endlet Calc button is pressed Ask for an expression Get cancel or an expression Compute expression and display its value Acknowledge the button event
73 User-interface: LOG-BUTTONprocess LOG-BUTTON(Tid : ui) is let N : int, L : term in rec-event(Tid, N?, button(showLog)) . snd-msg(showLog) . rec-msg(showLog, L?) . snd-do(Tid, display-log(L)) . snd-ack-event(Tid, N) endlet
74 User-interface: TIME-BUTTONprocess TIME-BUTTON(Tid : ui) is let N : int, T : str in rec-event(Tid, N?, button(showTime)) . snd-msg(showTime) . rec-msg(showTime, T?) . snd-do(Tid, display-time(T)) . snd-ack-event(Tid, N) endlet process QUIT-BUTTON(Tid : ui) is rec-event(Tid, button(quit)) . shutdown("End of calc demo")
75 Show the log of calculationsProcess LOG process LOG is let Tid : log, E : str, V : term, L : term in subscribe(compute(
76 Process LOG1 Alternative definition of logger: maintain thelog in a list process LOG1 is let TheLog : list, E : str, V : term in subscribe(compute(
77 Process CLOCK process CLOCK is let Tid : clock, T : str inexecute(clock, Tid?). ( rec-msg(showTime) . snd-eval(Tid, readTime) . rec-value(Tid, time(T?)) . snd-msg(showTime, T) ) * delta endlet
78 ToolBus Configurationtoolbus (CALC, BATCH, UI, LOG, CLOCK) Creates the processes for the calculator application Start calculator application: toolbus calc.tb
79 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves
80 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves
81 Example: distributed auctionMaster Bidder Bidder Bidder Bidder Auction Master Bidder Bidder Bidder Bidder Bidder Classical Auction Distributed Auction
82 Example: distributed auctionHow are bids synchronized? How to inform bidders about higher bids? How to decide when the bidding is over and the item is sold? Bidders may come and go during the auction
83 Example: distributed auction... Auction Bidder bidder Bidder bidder Bidder bidder ToolBus master Tools
84 Example: distributed auctionThe Auction process executes master tool: user-interface of auction master connection/disconnection of new bidders introduces new items for sale (at the initiative of the auction master) controls the bidding provess via OneSale A Bidder process is created for each new bidder
85 Execute the master toolProcess Auction process Auction is let Mid : master, Bid : bidder in execute(master, Mid?) . ( ConnectBidder(Mid, Bid?) + OneSale(Mid) ) * rec-event(Mid, quit) . shutdown("Auction is closed") endlet Execute the master tool Repeat: add new bidder between sales, or perform one sale Until: auction master quits Close the auction application tool master is { command = "wish-adapter -script master.tcl" }
86 Process ConnectBidderprocess ConnectBidder(Mid : master, Bid : bidder?) is let Pid : int, Name : str in rec-connect(Bid?) . create(Bidder(Bid), Pid?) . snd-eval(Bid, get-name) . rec-value(Bid, name(Name?)) . snd-do(Mid, new-bidder(Bid, Name)) endlet Receive a connection request from a new bidder tool Create a new Bidder process Ask bidder for its name Send name to master tool
87 Process OneSale Where the action is ...process OneSale(Mid : master) is let Descr : str, %% Description of current item for sale InAmount : int, %% Initial amount for item Amount : int, %% Current amount HighestBid : int, %% Highest bid so far Final : bool, %% Did we already issue a final call for bids? Sold : bool, %% Is the item sold? Bid : bidder %% New bidder tool connected during sale in rec-event(Mid, new-item(Descr?, InAmount?)) . HighestBid := InAmount . snd-note(new-item(Descr, InAmount)) . Final := false . Sold := false . ( ... ) * if Sold then snd-ack-event(Mid, new-item(Descr, InAmount)) fi endlet Where the action is ...
88 Process OneSale ( if not(Sold) then ... fi+ if not(or(Final, Sold)) then fi + if and(Final, not(Sold)) then ... fi + ConnectBidder(Mid, Bid?) ... ) * if Sold then ... fi
89 Process OneSale Receive a bid from a bidder( + if not(or(Final, Sold)) then fi + if and(Final, not(Sold)) then ... fi + ConnectBidder(Mid, Bid?) ... ) * if Sold then ... fi if not(Sold) then rec-msg(bid(Bid?, Amount?)) . snd-do(Mid, new-bid(Bid, Amount)) . if less-equal(Amount, HighestBid) then snd-msg(Bid, rejected) else HighestBid := Amount . snd-msg(Bid, accepted) . snd-note(update-bid(Amount)) . snd-do(Mid, update-highest-bid(Bid, Amount)) . Final := false fi Inform auction master about it Reject bid if it is too low Remember as highest bid Inform bidder: bid is accepted Inform all bidders Update auction master
90 Process OneSale Not yet sold, not asked for final bids ...( if not(Sold) then ... fi ) * if Sold then ... fi + if not(or(Final, Sold)) then snd-note(any-higher-bid) delay(sec(10)) . snd-do(Mid, any-higher-bid(10)) . Final := true fi + if and(Final, not(Sold)) then snd-note(sold(HighestBid)) delay(sec(10)) . Sold := true + ConnectBidder(Mid, Bid?) . snd-msg(Bid, new-item(Descr, HighestBid)) . Final := false Wait 10 sec, then ask for final bids Inform auction master Yes, now we have asked for final bids Not yet sold, but asked for final bids ... Wait 10 sec, then inform all bidders that item is sold Yes, item is now sold Bidder is connected during sale Inform new bidder about progress Restart, final bids (if any)
91 Process Bidder process Bidder(Bid : bidder) islet Descr : str, Amount : int, Acceptance : term in subscribe(new-item(
92 Process Bidder Get info about item for sale after connection( ( rec-msg(Bid, new-item(Descr?, Amount?)) + rec-note(new-item(Descr?, Amount?)) + rec-disconnect(Bid) . delta ) . snd-do(Bid, new-item(Descr, Amount)) . ( rec-event(Bid, bid(Amount?)) . snd-msg(bid(Bid, Amount)) . rec-msg(Bid, Acceptance?) . snd-do(Bid, accept(Acceptance)) . snd-ack-event(Bid, bid(Amount)) + rec-note(update-bid(Amount?)) . snd-do(Bid, update-bid(Amount)) + rec-note(any-higher-bid) . snd-do(Bid, any-higher-bid) ) * rec-note(sold(Amount?)) . snd-do(Bid, sold(Amount)) delta Same, but normal case Disconnect between sales Inform bidder tool bidder comes with new bid Inform bidder Disconnect during sale End of this sale sale
93 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves
94 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves
95 One-dimensional wave equationSimulate a string attached at the two end points: . . . . . . . . . yi(t) . . N-1 i
96 One-dimensional wave equationAmplitude at point i at t+Dt is given by: yi(t+t) = F(yi(t),yi(t-t),yi-1(t),yi+1(t)) and F(z1,z2,z3,z4) = 2z1 z2+ (c t/x)2 (z32z1+z4) x: the (small) interval between sampling points c: constant representing the propagation velocity of the wave
97 Example: wave equation... MakeWave Pend Pend P P P P ToolBus master Tools
98 One-dimensional wave equationAuxiliary process F computes function F Process P models a sampling point Process Pend models the end points Process MakeWave constructs N connected instances of P and two end points Tool display visualizes the simulation
99 Arbitrary value for (c t/x)2Process F Compute F(z1,z2,z3,z4) = 2z1 z2+ (c t/x)2 (z32z1+z4) process F(Z1 : real, Z2 : real, Z3 : real, Z4 : real, Res : real?) is let CdTdX2 : real in CdTdX2 := Res := radd(rsub(rmul(2.0, Z1), Z2), rmul(CdTdX2, radd(rsub(Z3, rmul(2.0, Z1)), Z4))) endlet Arbitrary value for (c t/x)2 2z1 z2+ (c t/x)2 * (z32z1+z4)
100 Process P L: left, I: this point, R: rightprocess P(Tid : display, L : int, I : int, R : int, Dstart : real, Estart : real) is let AL : real, AR : real, D : real, D1 : real, E : real in D := Dstart . E := Estart . ( ( rec-msg(L, I, AL?) || rec-msg(R, I, AR?) || snd-msg(I, L, E) || snd-msg(I, R, E) || snd-do(Tid, update(I, E)) ) . D1 := E . F(E, D, AL, AR, E?) . D := D1 ) * delta endlet L: left, I: this point, R: right D, E: amplitutes of this point Receive amplitudes of neighbours Send our amplitude to neighbours Update our amplitude on display Compute new versions of D and E
101 Process Pend Index of this end point Neighbouring pointprocess Pend(Tid : display, I : int, NB : int) is let W : real in ( rec-msg(NB, I, W?) || snd-msg(I, NB, 0.0) || snd-do(Tid, update(I, 0.0)) ) * delta endlet Interact with neighbour Display (constant) amplitude 0 on display
102 Process MakeWave Execute display tool and initialize itprocess MakeWave(N : int) is let Tid : display, Id : int, I : int, L : int, R : int in execute(display, Tid?) . snd-do(Tid, mk-wave(N)) . create(Pend(Tid, 0, 1), Id?). L := sub(N,1) . create(Pend(Tid, N, L), Id?) . I := 1 . if less(I, N) then L := sub(I, 1) . R := add(I, 1) . create(P(Tid, L, I, R, 1.0, 1.0), Id?) . I := add(I, 1) fi * shutdown("end") delay(sec(60)) endlet Execute display tool and initialize it Create the two end points Create the other points Shutdown after one minute
103 Tool definition and ToolBus configurationtool display is { command = "wish-adapter -script ui-wave.tcl"} toolbus(MakeWave(8))
104 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves
105 Road map The problem: component interconnection History & requirementsTerms, types & matching The ToolBus architecture ToolBus scripts (Tscripts) Larger examples calculator; auction; waves Concluding remarks
106 Not yet discussed: monitorsA tool can act as a monitor for one or more ToolBus processes Monitors exist in three categories: Loggers Viewers Controllers Depending on the category, monitors get all info about steps of the monitored processes they need
107 A Monitor CALC BATCH UI CLOCK ToolBus calc batch ui mon clock Tools
108 Loggers Non-interactive = processes don't wait for loggerNon-intrusive = logger can't change process state Recording of bahaviour of processes Examples: System logging Generation of play back scripts for UI testing Performance measurement toolbus -logger calc.tb
109 Viewers Interactive = processes wait for viewerNon-intrusive = viewer can't change state Viewing of processes Monitored processes wait for a continue message before proceeding Example: Non-intrusive debugger toolbus -viewer calc.tb
110 Controllers Interactive & Intrusive control over processesControlled processes wait for a continue message (containing new state/process expression) Examples: Intrusive debugger Advanced control applications that perform arbitrary computations on process expression in tool, but want to reuse other ToolBus tools Not implemented in current version!