<?xml version="1.0"?>
<CD xmlns="http://www.openmath.org/OpenMathCD" xmlns:html="http://www.w3.org/1999/XHTML">
	<CDName>scscp1</CDName>
	<CDURL> http://www.win.tue.nl/SCIEnce/cds/scscp1.ocd </CDURL>
	<CDReviewDate>  </CDReviewDate>
	<CDStatus>experimental</CDStatus>
	<CDDate> 2009-06-22 </CDDate>
	<CDVersion> 1 </CDVersion>
	<CDRevision> 12 </CDRevision>
	<Description>
		<html:p>This CD defines symbols for the description of the management
		of mathematical queries.
		In particular, it is used by the SCIEnce project [<html:a href="http://www.symbolic-computation.org/">SCIEnce website</html:a>] 
		in the communication between a web service (i.e. computer algebra system, proof checker, etc) and a client.
		SCSCP is an abbreviation for "Symbolic Computation Software Composability Protocol"
		[<html:a href="http://www.symbolic-computation.org/scscp/">SCSCP specification</html:a>].
		</html:p>
		<html:p>This version of the Content Dictionary agrees with version 1.3 of the SCSCP protocol.</html:p>
	</Description>
	<CDDefinition>
		<Name> procedure_call </Name>
		<Description>
		The actual procedure call. Its only argument is an OpenMath Application,
		whose head symbol describes the procedure to be called,
		and whose arguments are the arguments to the procedure. 
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="option_runtime"/>
						<OMI>300000</OMI>
						<OMS cd="scscp1" name="option_min_memory"/>
						<OMI>40964</OMI>
						<OMS cd="scscp1" name="option_max_memory"/>
						<OMI>134217728</OMI>
						<OMS cd="scscp1" name="option_debuglevel"/>
						<OMI>2</OMI>
						<OMS cd="scscp1" name="option_return_object"/>
						<OMSTR/>
					</OMATP>
					<OMA>
						<OMS cd="scscp1" name="procedure_call"/>
						<OMA>
							<OMS cd="scscp_transient_1" name="GroupIdentificationService"/>
							<OMA>
								<OMS cd="group1" name="group"/>
								<OMA>
									<OMS cd="permut1" name="permutation"/>
									<OMI> 2</OMI>
									<OMI> 3</OMI>
									<OMI> 1</OMI>
								</OMA>
								<OMA>
									<OMS cd="permut1" name="permutation"/>
									<OMI> 1</OMI>
									<OMI> 2</OMI>
									<OMI> 4</OMI>
									<OMI> 3</OMI>
								</OMA>
							</OMA>
						</OMA>
					</OMA>
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition><Name> procedure_completed </Name><Description>
		The result of a successful computation. Should come along 
		with a call_id and, possibly, some extra information.
		</Description><Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>a1d0c6e83f027327d8461063f4ac58a6</OMSTR><OMS cd="scscp1" name="info_runtime"/><OMI>72643</OMI><OMS cd="scscp1" name="info_memory"/><OMI>52876</OMI></OMATP><OMA><OMS cd="scscp1" name="procedure_completed"/><OMI>26925748508234281076009</OMI></OMA></OMATTR></OMOBJ></Example>

		Instead of the result, we may return a reference
		to the result, as follows:

		<Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>a1d0c6e83f027327d8461063f4ac58a6</OMSTR><OMS cd="scscp1" name="info_runtime"/><OMI>72643</OMI><OMS cd="scscp1" name="info_memory"/><OMI>52876</OMI></OMATP><OMA><OMS cd="scscp1" name="procedure_completed"/><OMR href="scscp://somehost:26133/92cfceb39d57d914ed8b14d0e37643de0797ae56"/></OMA></OMATTR></OMOBJ></Example>
	</CDDefinition>
	<CDDefinition>
		<Name> procedure_terminated </Name>
		<Description>
		The result of a failed computation. Should come along 
		with a call_id, an error description, and possibly
		some extra information.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>a24904e5d3ed28eae9225fd787f64a71</OMSTR>
						<OMS cd="scscp1" name="info_runtime"/>
						<OMSTR>21897</OMSTR>
					</OMATP>
					<OMA>
						<OMS cd="scscp1" name="procedure_terminated"/>
						<OME>
							<OMS cd="scscp1" name="error_system_specific"/>
							<OMSTR>Segmentation fault</OMSTR>
						</OME>
					</OMA>
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> call_id </Name>
		<Description>
		Uniquely identifies a procedure call. Used in subsequent
		communication, so the parties know which call they are
		talking about.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>a1d0c6e83f027327d8461063f4ac58a6</OMSTR>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> option_max_memory </Name>
		<Description>
		An option, to be given along with a procedure call, 
		describing the maximum amount of memory (in bytes)
		the system should spend on this call.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="option_max_memory"/>
						<OMI>20971520</OMI>
						<OMS cd="scscp1" name="option_return_object"/>
						<OMSTR/>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> option_min_memory </Name>
		<Description>
		An option, to be given along with a procedure call, 
		describing the minimum amount of memory (in bytes)
		the system should be able to spend on this call.
		The idea is that in certain cases we know in advance
		that we will need a large amount of memory. If the 
		system will never be able to provide that, it would 
		be a waste of time and resources to even start the 
		computation.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="option_min_memory"/>
						<OMI>250971520</OMI>
						<OMS cd="scscp1" name="option_return_object"/>
						<OMSTR/>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> option_runtime </Name>
		<Description>
		An option, to be given along with a procedure call, 
		describing the maximum amount of time (in milliseconds)
		the system should spend on this call.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="option_runtime"/>
						<OMI>600000</OMI>
						<OMS cd="scscp1" name="option_return_object"/>
						<OMSTR/>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> option_debuglevel </Name>
		<Description>
		An option, to be given along with a procedure call, 
		describing the amount of debug information the
		client is interested in. Should be an integer.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="option_debuglevel"/>
						<OMI>2</OMI>
						<OMS cd="scscp1" name="option_return_object"/>
						<OMSTR/>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition><Name> option_return_cookie </Name><Description>
		An option, to be given along with a procedure call, 
		indicating that the client would like to have a cookie (i.e.
		a reference to an OpenMath object residing somewhere)
		as return value.
		</Description><Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR><OMS cd="scscp1" name="option_return_cookie"/><OMSTR/></OMATP><!-- The OMA goes here --></OMATTR></OMOBJ></Example>

		The reply from the server should then look like:

		<Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR></OMATP><OMA><OMS cd="scscp1" name="procedure_completed"/><OMR href="scscp://somehost.somedomain:26133/q9t4eX"/></OMA></OMATTR></OMOBJ></Example>

	</CDDefinition>
	<CDDefinition><Name> option_return_object </Name><Description>
		An option, to be given along with a procedure call, 
		indicating that the client would like to have the actual OpenMath
		object as return value.
		</Description><Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR><OMS cd="scscp1" name="option_return_object"/><OMSTR/></OMATP><!-- The OMA goes here --></OMATTR></OMOBJ></Example>

The reply from the server should then look like:

<Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR></OMATP><OMA><OMS cd="scscp1" name="procedure_completed"/><OMI>42</OMI></OMA></OMATTR></OMOBJ></Example>
</CDDefinition>
	<CDDefinition><Name> option_return_nothing </Name><Description>
An option, to be given along with a procedure call, 
indicating that the client expects no return value.
</Description><Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR><OMS cd="scscp1" name="option_return_nothing"/><OMSTR/></OMATP><!-- The OMA goes here --></OMATTR></OMOBJ></Example>

The reply from the server may then look like:

<Example><OMOBJ xmlns="http://www.openmath.org/OpenMath"><OMATTR><OMATP><OMS cd="scscp1" name="call_id"/><OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR></OMATP><OMA><OMS cd="scscp1" name="procedure_completed"/></OMA></OMATTR></OMOBJ></Example>

</CDDefinition>
	<CDDefinition>
		<Name> info_memory </Name>
		<Description>
A piece of information from the system, to be used
along with a procedure_completed or procedure_terminated message, 
describing how much memory was spent on the 
calculation. It should be in bytes, denoted
using an OMI.
</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="info_memory"/>
						<OMI>134218000</OMI>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> info_runtime </Name>
		<Description>
A piece of information from the system, to be used
along with a procedure_completed or procedure_terminated message, 
describing how much cputime was spent on the 
calculation. It should be in milliseconds, denoted
using an OMI.
</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="info_runtime"/>
						<OMI>76543</OMI>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> info_message </Name>
		<Description>
		A piece of information from the server, to be used
		along with a procedure_completed or procedure_terminated 
		message, giving some additional information. The client 
		may choose to present this information to its user.
		The argument is an OMSTR.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<OMS cd="scscp1" name="call_id"/>
						<OMSTR>localhost:26137:18668:s2sYf1pg</OMSTR>
						<OMS cd="scscp1" name="info_message"/>
						<OMSTR>The weather in St. Andrews is beautiful this time of year</OMSTR>
					</OMATP>
					<!-- The OMA goes here -->
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> error_memory </Name>
		<Description>
		A description of the error that caused a
		procedure call to be terminated. This symbol
		is used with a procedure_terminated, when
		the system exceeded the amount of memory specified
		in the option_max_memory option given in the
		corresponding procedure call.

		It carries one argument: An OMSTR, which may be empty.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<!-- The header goes here -->
					</OMATP>
					<OMA>
						<OMS cd="scscp1" name="procedure_terminated"/>
						<OME>
							<OMS cd="scscp1" name="error_memory"/>
							<OMSTR/>
						</OME>
					</OMA>
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> error_runtime </Name>
		<Description>
		A description of the error that caused a
		procedure call to be terminated. This symbol
		is used with a procedure_terminated, when
		the system exceeded the runtime specified
		in the option_runtime option given in the
		corresponding procedure call.

		It carries one argument: An OMSTR, which may be empty.

		Note that this symbol is not intended to be
		used when a different runtime error occurred.
		In those cases, one should use error_system_specific.
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<!-- The header goes here -->
					</OMATP>
					<OMA>
						<OMS cd="scscp1" name="procedure_terminated"/>
						<OME>
							<OMS cd="scscp1" name="error_runtime"/>
							<OMSTR/>
						</OME>
					</OMA>
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
	<CDDefinition>
		<Name> error_system_specific </Name>
		<Description>
		A description of the error that caused a
		procedure call to be terminated. This symbol
		is used with a procedure_terminated, when
		the error is specific to the system that
		carried out the calculation.
		This error must carry exactly one argument, 
		and it must be an OMSTR describing the error 
		that occurred. 
		</Description>
		<Example>
			<OMOBJ xmlns="http://www.openmath.org/OpenMath">
				<OMATTR>
					<OMATP>
						<!-- The header goes here -->
					</OMATP>
					<OMA>
						<OMS cd="scscp1" name="procedure_terminated"/>
						<OME>
							<OMS cd="scscp1" name="error_system_specific"/>
							<OMSTR>Error, the group identification for groups of size\n
							3628800 is not available called from\n
							&lt;function&gt;( &lt;arguments&gt; ) called from read-eval-loop\n
							Entering break read-eval-print loop ...\n
							you can 'quit;' to quit to outer loop, or\n
							you can 'return;' to continue\n
							brk&gt;\n
							</OMSTR>
						</OME>
					</OMA>
				</OMATTR>
			</OMOBJ>
		</Example>
	</CDDefinition>
</CD>

