<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">SMAWL: A SMAll Workflow Language Based on CCS</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Christian</forename><surname>Stefansen</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">University of Copenhagen (DIKU</orgName>
								<address>
									<addrLine>Universitetsparken 1</addrLine>
									<postCode>2100</postCode>
									<settlement>Copenhagen Ø</settlement>
									<country key="DK">Denmark</country>
								</address>
							</affiliation>
							<affiliation key="aff1">
								<orgName type="department">Faculdade de Engenharia</orgName>
								<orgName type="institution">Universidade do Porto</orgName>
								<address>
									<addrLine>ISBN 972</addrLine>
									<postCode>2005 --752-078-2</postCode>
									<country key="PT">Portugal</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">SMAWL: A SMAll Workflow Language Based on CCS</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">EA1B657BEC86BE43327A721A217A3F8F</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T06:09+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This paper provides a overview of SMAWL, a SMAll Workflow Language based on CCS (Calculus of Communicating Systems). There has been a prolonged debate in the workflow community about the relative suitability of Petri nets versus π-calculus as a formal foundation for workflow languages. Here we demonstrate how to build a workflow language based on CCS (a predecessor of π-calculus). To facilitate comparison with other approaches SMAWL is designed to be able to express the same 20 patterns that originally led to the design of the Petri net-based workflow language YAWL by van der Aalst and ter Hofstede. After an initial example of a SMAWL program, some design considerata are discussed, and the constructs of the language are presented along with excerpts of the compositional source-level translation to CCS.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Why Consider CCS?</head><p>CCS and π-calculus have been studied extensively for years and have sound mathematical foundations. There has been a wealth of practical applications in programming 57</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>There has been a long debate in the workflow community about the relative merits of different formalisms -most notably π-calculus <ref type="bibr" target="#b1">[2]</ref> and Petri nets -for workflow modeling <ref type="bibr" target="#b4">[5,</ref><ref type="bibr" target="#b7">8]</ref>. Proponents of the π-calculus claim that the presence of mobility or, more specifically, channel-passing, makes it the more suitable choice. Proponents of Petri nets have pointed out that contrary to π-calculus, Petri nets have a standardized and rigorous graphical notation readily available.</p><p>In <ref type="bibr" target="#b5">[6]</ref> van der Aalst and ter Hofstede identified 20 common workflow patterns, surveyed current workflow systems with respect to these, and presented a Petri netbased workflow language, YAWL, that is capable of expressing all 20 patterns. In the same vein SMAWL is designed with this benchmark in mind, but based on CCS. Since it is always desirable to keep the formal foundation as simple as possible, and since the language design did not require the notion of mobility found in π-calculus, SMAWL is based on CCS (Calculus of Communicating Systems) rather than π-calculus. Here "based on CCS" means translatable to CCS using only source-code transformations.</p><p>The 20 workflow patterns do not deal with data flow. This makes the patterns easier to work with and forces a strong separation between control flow and data flow. By following this strategy and parameterizing over the data-flow language, SMAWL avoids being tied in, but may be used with any (sensible) data-flow language.</p><p>languages (e.g. PICT <ref type="bibr" target="#b2">[3]</ref>), protocol verification, software model checking (e.g. <ref type="bibr" target="#b0">[1]</ref>), hardware design languages, and several other areas.</p><p>Workflow languages seem to have a lot in common with these areas: they can be thought of as parallel processes and often defy the block structure found in conventional programming. It seems appropriate to leverage the strong separation of process and application logic enforced in CCS, and furthermore, having a well-understood foundation is likely to make implementation and subsequent adaptation easier and more routine. By using CCS we can integrate with existing tools for automated verification and thus make writing and adapting workflows less error-prone.</p><p>Nevertheless, CCS presents significant challenges. Workflow systems should be accessible to anyone, and so a central challenge is to provide graphical tools and userfriendly abstractions. It is important to note that while not inherently graphical, CCS does not preclude the use of a high-level graphical representation. We do not mean to use CCS directly as it is, but as a theoretical foundation for future work. This paper suggests how.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2">Contributions</head><p>The main contribution of the paper is an overview of the language SMAWL: a CCSbased compositional workflow language that can express all 20 patterns identified in <ref type="bibr" target="#b5">[6]</ref>. The language deals with most of the internal message-passing required to code the 20 workflow patterns and provides a palatable syntax for programmers. Specifically, we (1) describe the grammar and each of the constructs, (2) outline the formal translation to CCS, (3) present a small example, and (4) show the auto-generated graphical representation hereof to suggest that graphical manipulation can be implemented in a relatively simple way. Interested readers are referred to the accompanying technical report <ref type="bibr" target="#b3">[4]</ref> for a more detailed walkthrough.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.3">Outline</head><p>Section 2 shows an example workflow, describes the constructs and design deciderata of SMAWL, and sketches its formal translation into CCS. Section 3 contains a few concluding remarks.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Introducing SMAWL</head><p>The goal is to design a CCS-based language that (a) reduces the amount of userspecified internal synchronization required and (b) provides elegant constructs for the 20 workflow patterns <ref type="bibr" target="#b5">[6]</ref> shown in Table <ref type="table">1</ref>.</p><p>To get a feel for where this will lead, an example workflow in the resulting language can be seen in Figure <ref type="figure">1</ref>. The main workflow, which hopefully is self-explanatory, specifies that to become a recording artist one should first either "Work your way up" or "Try to get lucky". After the chosen subroutine is done, one should "Make record" and finally develop a personality according to one's own choice in parallel to first "Rehearse tour" and then "Do tour". Table1. The 20 Workflow Patterns <ref type="bibr" target="#b6">[7]</ref> and Two New Ones</p><p>The graphical representation was generated completely automatically from the abstract syntax tree of the code to give an example that even with CCS as the foundation it is relatively straight forward to obtain an intuitive user interface.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Designing SMAWL</head><p>Expressing the patterns directly in CCS is a cumbersome and error-prone exercise in low-level coding. In particular the programmer must write the specifics of synchronization every time a merge or join pattern is used. It is therefore a natural idea to make small building blocks -combinators -of each of the patterns. This way there will be e.g. a number of split combinators and a number of join combinators etc.</p><p>However, it turns out to be very tedious for the programmer to explicitly synchronize every time a split block is left; a more palatable approach is therefore to implicitly synchronize after every split construct and have the programmer explicitly write if the continuation should be spawned for each active thread (a merge). These and numerous other considerations lead to the following syntax: In the syntax denotes the empty string, f is a function name, w is the workflow name, ρ is a data-dependent predicate <ref type="foot" target="#foot_0">1</ref> , k is a natural number and n is a natural number or ∞. ρ is what allows data-dependent choices, all other choices default to deferred choices.</p><p>A program is any number of declarations DD followed by a named main workflow process P . Let us informally consider each of the constructs in turn indicating the patterns that they cover in square brackets:</p><p>activity indicates an atomic activity to be carried out. P ; Q is the sequence pattern waiting for P to finish before starting Q.</p><p>[Sequence] choose one{PP } does exactly one of the processes in the list P P . Each of processes in the list can be guarded with a predicate ρ or not and hence this construct can express both deferred choice, explicit choice, and any combination thereof. Through the predicate ρ it also provides part of the interface to the dataflow language. [Exclusive Choice, Deferred Choice, Simple Merge] choose any (wait for k){PP merge(n) Q} does any number of the processes in the list PP , spawns the process Q for the first n to finish, and continues once k instances of Q have finished. More technically choose any (wait for k){PP merge(n) Q} implements multiple choice over the PP s, then merges each of the threads to Q, and finally synchronizes all threads. If the clause wait for k is given, the synchronization will be an N-out-of-M Join. If the clause is not provided, synchronization will wait for all threads to signal done. In the merge part of the clause a value of n = ∞ signifies all threads PP should merge to Q upon completion. A value of n = ∞ signifies that only the first n threads to complete should give rise to an instantiation of Q. If merge(n) Q is missing, n is taken to be ∞ and Q = 0. [Multiple Choice, Deferred Multiple Choice, Multiple Merge, N-out-of-M Join, Synchronizing Merge, Discriminator] do all (wait for k){PP merge(n) Q} starts all processes in the list PP , spawns the process Q for the first n to finish, and continues once k instances of Q have finished. It accepts the same options as choose any (wait for k){PP merge(n) Q} for merging and synchronizing. [Parallel Split, Synchronization, Multiple Merge, N-out-of-M Join, Synchronizing Merge, Discriminator] multi(n){P }Starts multiple instances of the process P . If n is a natural number then exactly that number of copies will be spawned. If n = ∞ then processes P can emit a designated signal to spawn more instances while running or more instances can be spawned based on a data-layer predicate. Execution continues once all spawned processes are done -i.e. synchronization is performed [MI with a priori known design time knowledge, MI with/without a priori known runtime knowledge].</p><p>fun f = P end declares a sub-workflow callable using call(f ). call(f ) calls a declared sub-workflow f and blocks until it finishes. [MI without synchronization] send(f )/receive(f ) provide blocking primitives for signals to locks, milestones, arbitrary joins, and cancellable processes. They are the send and receive primitives found in CCS. [Arbitrary Cycles] newlock (l, u) declares a new global lock. Global meaning that two processes that are not allowed to run at the same time, do not have to be within the same logical block. lock(l, u){P }protect process P through the declared lock (l, u). Signals lock on l and unlock on u on entering/exiting the process P . [Interleaved Parallel Routing] milestone(ison, isoff , set, clear) declares a milestone that can be read/set by any process knowing the correct channels. [Milestone] cancel {P }makes the process P cancellable on a pre-determined signal c. The property does not penetrate functions unless specifically stated in their definition. [Cancel Activity, Cancel Case]</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Compiling SMAWL to CCS</head><p>Compiling the workflow description language is a relatively simple task since the language is based directly on patterns that have already been described in CCS (see the accompanying technical report <ref type="bibr" target="#b3">[4]</ref>). The main transformation T [[•]] is a map P rog → Channel → CCS, where Channel denotes the set of valid channel names. So given a SMAWL program and a channel name c, the transformation T [[P rog]]c will generate a CCS expression that signals on c when the workflow has finished. The CCS expressions are formed using the following syntax: P ::= 0 τ.P a?x.P a!x.P P + P (P | P ) new a P a? * x.P where a? * x.P spawn the process P each time a message is received on a. The remaining operators are standard.</p><p>Consider the transformation of the sequence P ; Q. When done, P should signal to Q to continue, and Q when done should signal to the outside world on a designated channel. A helper function is needed: ν : {()} → Channel returns a fresh channel name that has not previously been used. Now P and Q can communicate, and the transformation becomes:</p><formula xml:id="formula_0">T [[P ; Q]] = λok.let ok ⇐ ν() in T [[P ]]ok | ok ?.T [[Q]]ok</formula><p>Now consider the more complex pattern defined by: Interested readers should consult the accompanying technical report <ref type="bibr" target="#b3">[4]</ref> for the complete transformations. Interestingly, it turns out new operators can be statically removed by alpha conversion -bar the rare cases where new is used inside replicated processes.</p><formula xml:id="formula_1">T [[do all (wait for k) {⇒ P 1 ⇒ • • • ⇒ P n (merge l Q)}]] = λok.let ok ⇐ ν() in let ok ⇐ ν() in let ok ⇐ ν()</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Conclusion</head><p>We presented a language that makes CCS-based workflow systems more accessible. SMAWL turned out to be an easy and very convenient language for writing workflow expressions and more work will conducted in this direction. The language SMAWL is kept very simple and yet it is powerful enough to express the workflow patterns we have seen to far. It would be interesting to see how far one can get in terms of graphical support for SMAWL, and equally it would be interesting to plug SMAWL into a formal verification tool.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Pworkflow</head><label></label><figDesc>Figure1. How To Become a Recording Star (adapted from the Recording Star example<ref type="bibr" target="#b6">[7]</ref>)</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head></head><label></label><figDesc>in T [[P 1 ]]ok | • • • | T [[P n ]]ok | mergeprefix(l, ok , ok ) | ok ? * .T [[Q]]ok | ok ?. • • • .ok ? k .(ok! | ok ? * )where mergeprefix is the map N ∪ {∞} × Channel × Channel → CCS defined by: mergeprefix(∞, ok, go) = ok? * .go! mergeprefix(n, ok, go) = ok?.go!. • • • .ok?.go! n .ok? *</figDesc></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">The format of predicates ρ is not of the essence here; such predicates will simply be compiled to a τ prefix and the responsibility of deciding them will be delegated to a data-aware layer.</note>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Zing: Exploiting program structure for model checking concurrent software</title>
		<author>
			<persName><forename type="first">Tony</forename><surname>Andrews</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Shaz</forename><surname>Qadeer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Sriram</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Yichen</forename><surname>Rajamani</surname></persName>
		</author>
		<author>
			<persName><surname>Xie</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">CONCUR</title>
				<imprint>
			<date type="published" when="2004">2004</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<author>
			<persName><forename type="first">Robin</forename><surname>Milner</surname></persName>
		</author>
		<title level="m">Communicating and Mobile Systems: The π-calculus</title>
				<imprint>
			<publisher>Cambridge University Press</publisher>
			<date type="published" when="1999">1999</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Pict: A programming language based on the picalculus</title>
		<author>
			<persName><forename type="first">Benjamin</forename><forename type="middle">C</forename><surname>Pierce</surname></persName>
		</author>
		<author>
			<persName><forename type="first">David</forename><forename type="middle">N</forename><surname>Turner</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proof, Language and Interaction: Essays in Honour of Robin Milner</title>
				<editor>
			<persName><forename type="first">G</forename><surname>Plotkin</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">C</forename><surname>Stirling</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">M</forename><surname>Tofte</surname></persName>
		</editor>
		<imprint>
			<publisher>MIT Press</publisher>
			<date type="published" when="2000">2000</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<monogr>
		<title level="m" type="main">SMAWL: A SMAll Workflow Language based on CCS</title>
		<author>
			<persName><forename type="first">Christian</forename><surname>Stefansen</surname></persName>
		</author>
		<idno>TR-06-05</idno>
		<imprint>
			<date type="published" when="2005-03">March 2005</date>
			<pubPlace>Cambridge, MA 02138</pubPlace>
		</imprint>
		<respStmt>
			<orgName>Harvard University, Division of Engineering and Applied Sciences</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Technical Report</note>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<author>
			<persName><forename type="first">W</forename><forename type="middle">M P</forename><surname>Van Der Aalst</surname></persName>
		</author>
		<ptr target="http://tmitwww.tm.tue.nl/research/patterns/download/pi-hype.pdf" />
		<title level="m">Pi calculus versus Petri nets: Let us eat &quot;humble pie&quot; rather than further inflate the &quot;Pi hype</title>
				<imprint>
			<date type="published" when="2004">2004</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Workflow patterns: On the expressive power of (petri-net-based) workflow languages</title>
		<author>
			<persName><forename type="first">W</forename><forename type="middle">M P</forename><surname>Van Der Aalst</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">H M</forename><surname>Hofstede</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Fourth Workshop on the Practical Use of Coloured Petri Nets and CPN Tools (CPN 2002)</title>
				<editor>
			<persName><forename type="first">K</forename><surname>Jensen</surname></persName>
		</editor>
		<meeting>the Fourth Workshop on the Practical Use of Coloured Petri Nets and CPN Tools (CPN 2002)<address><addrLine>Aarhus, Denmark</addrLine></address></meeting>
		<imprint>
			<publisher>DAIMI</publisher>
			<date type="published" when="2002-08">August 2002</date>
			<biblScope unit="volume">560</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<title level="m" type="main">Workflow patterns</title>
		<ptr target="http://www.workflowpatterns.com" />
		<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<author>
			<persName><surname>Michael Zur Muehlen</surname></persName>
		</author>
		<ptr target="http://www.workflow-research.de" />
		<title level="m">Workflow research</title>
				<imprint/>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
