1.1 Translation to LCC from UML Activity Diagrams
The LCC coordination calculus lends itself well to display in a graphical form. Its concepts of participants, messages and constraints, are similar to that of the UML activity diagram that has partitions, flows and activities. As UML is a common tool for the design of software that is well used in industry, by providing a conversion between UML diagrams and LCC, we are able to minimise the intellectual cost of joining the OpenKnowledge network for many industry software houses and developers.
UML editors are relatively common, yet they tend to focus less on data flow than data design. There are very few open source UML editors and those we found did not provide activity diagram support. Commercial products would be very hard to augment for LCC output without considerable cost and/or reverse engineering. So, as one of the support tools for the OpenKnowledge project we have implemented a basic UML activity diagram editor that has the option of outputting LCC code. The editor itself has been designed in a modular, extensible way so that other open-source developers could extend it such that it would handle other diagram types. However, we have, for now, only implemented the basic UML activity diagrams.
A screenshot of the editor appears below. Various node types are displayed on the left of the editor and they are added to the diagram by clicking their appropriate button. Once in the editing area, they can be dragged around and their properties edited by double clicking.

The conversion is achieved by searching for the initial node (the black dot) and tracing the graph through to the final node (the black dot with the outer circle). Transitions are considered LCC sequence ("then") statements unless they cross the partition swimlanes, in which case they are rendered as message sending and receiving. Activities are translated as constraint satisfactions. The branch nodes are rendered as "or" branches in the LCC.
The LCC is rendered by traversing the graph and outputting the appropriate LCC for the node encountered. The LCC is buffered so that when "or" nodes are encountered, the LCC can be re-written. Back-tracing of the graph is done at various points to ensure that activities that occur after branches in other participants are rendered correctly.
The LCC below shows the LCC export for the diagram shown in the UML diagram above:
// -----------------------------------------------------------------------------
// LCC File generated by UML-to-LCC exporter.
// test.lcc
// 24/10/2008
// -----------------------------------------------------------------------------
r( participant1, initial )
r( participant2, necessary )
// ============================================================
a( participant1, ID ) ::
(
null <- activity1() then
msg() => a( participant2, Participant2ID ) then
msg() <= a( participant2, Participant2ID ) then
null <- activity3()
)
or
(
null <- activity2a()
)
// ============================================================
a( participant2, ID ) ::
msg() <= a( participant1, Participant1ID ) then
null <- activity2b() then
msg() => a( participant1, Participant1ID )
The implementation of the basic UML editor and translator to LCC can be downloaded as source code.
1.2 Attaching to Existing Design Systems via Translation (Taverna)
One of the main testbeds for the OpenKnowledge system is in bioinformatics. Although this domain of application is comparatively new, there already exist accessible design tools for bioinformatics workflow, especially in Grid systems. One of the best known systems is Taverna (although there are others, such as Kepler and Triana). The Taverna system provides a visual editor for describing workflows to be enacted on a Grid system and produces a specification of the workflow in the SCUFL process language. For the sector of the bioinformatics community interested in using Taverna, the easiest way to connect to the OpenKnowledge system would be to continue to use their familiar design tools but, instead of using a Grid system for workflow enactment, to use the OpenKnowledge system.
To make a switch to OpenKnowledge as straightforward as possible for this community we built an automatic translator from SCUFL to LCC. This does not disrupt in any way the current methods of use of the Taverna system (which we assume are well honed to the Taverna community) but simply provides an additional step beyond the traditional endpoint of Taverna specification (which is a workflow specification in SCUFL) to LCC. The SCUFL to LCC translator is described in detail in our technical report and the Java code used to implement it can be downloaded as source code.