# OpenMath Content Dictionary: scscp2

Canonical URL:
http://www.win.tue.nl/SCIEnce/cds/scscp2.ocd
CD File:
scscp2.ocd
CD as XML Encoded OpenMath:
scscp2.omcd
Defines:
get_allowed_heads, get_service_description, get_signature, get_transient_cd, is_allowed_head, no_such_transient_cd, retrieve, service_description, signature, store_persistent, store_session, symbol_set, symbol_set_all, unbind
Date:
2009-06-25
Version:
1 (Revision 7)
Review Date:
Status:
experimental

This CD defines symbols for the description of the management of mathematical queries. In particular, it is used by the SCIEnce project [SCIEnce website] 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" [SCSCP specification].

The objects in this CD are somewhat more sophisticated than those in scscp1, and some SCSCP compliant applications may not support these. In particular, we add support for so-called "transient CDs", allowing a server to refer to symbols from temporary content dictionaries, valid only for the duration of the session. Please refer to the specification for more information on this concept.

The symbols in this CD mainly serve two purposes: working with remote objects ( scscp2.store_session , scscp2.store_persistent , scscp2.retrieve, scscp2.unbind ) and determining the procedures a system supports ( scscp2.get_allowed_heads, scscp2.is_allowed_head, scscp2.get_transient_cd, scscp2.get_signature, scscp2.get_service_description, scscp2.signature, scscp2.service_description ). There are also some special symbols ( scscp2.symbol_set, scscp2.symbol_set_all, scscp2.no_such_transient_cd)

This version of the Content Dictionary agrees with version 1.3 of the SCSCP protocol.

## store_session

Description:
This indicates the request to store an object on the server side (possibly after computing or simplifying it), returning only a cookie (actually, OM reference) pointing to an object that is usable (using an OMR) in the remainder of the current SCSCP session to get access to the actual object.
Example:

$\mathrm{procedure_call}\left(\mathrm{store_session}\left(6177887\right)\right)$
Example:

$\mathrm{procedure_completed}\left(\right)$
Note that the content of the OMR may vary, e.g. the URI does not necessarily start with scscp://.
Signatures:
sts

 [Next: store_persistent] [Last: no_such_transient_cd] [Top]

## store_persistent

Description:
This indicates the request to store an object on the server side (possibly after computing or simplifying it), returning only a cookie (actually, OM reference) pointing to an object that is usable (using OMR) in the foreseeable future, possibly from different sessions, to get access to the actual object. The server is encouraged to describe the expected lifetime of this object and whether references to this object from different SCSCP sessions are allowed in the response to a scscp2.get_signature request on this symbol. However, at this time we provide no automated or machine-readable mechanism for handling these lifetimes.
Signatures:
sts

 [Next: retrieve] [Previous: store_session] [Top]

## retrieve

Description:
Using the cookie that was obtained earlier by calling the scscp2.store_session or scscp2.store_persistent procedure or another procedure call, return to the client an OM object representing the object, referred by the cookie.
Example:

$\mathrm{procedure_call}\left(\mathrm{retrieve}\left(\right)\right)$
Example:

$\mathrm{procedure_completed}\left(6177887\right)$
Signatures:
sts

 [Next: unbind] [Previous: store_persistent] [Top]

## unbind

Description:
This indicates the request to remove the object, referred by the cookie, from the server.
Example:

$\mathrm{procedure_call}\left(\mathrm{unbind}\left(\right)\right)$
Example:

$\mathrm{procedure_completed}\left(\right)$
Signatures:
sts

Description:
This symbol is used to find the list of procedures supported by an SCSCP server.
The client could send:
Example:

$\mathrm{procedure_call}\left(\mathrm{get_allowed_heads}\left(\right)\right)$
and the server might then reply:
Example:

$\mathrm{procedure_completed}\left(\mathrm{symbol_set}\left(\mathrm{GroupIdentificationService},\mathrm{group},\mathrm{CDName}\left(\text{permut1}\right),\mathrm{CDGroupName}\left(\text{scscp}\right)\right)\right)$
indicating that it accepts the symbol GroupIdentificationService from the transient CD scscp_transient_1, the symbol group1.group, the entire permut1 CD, and all cds from the CD group called scscp.
Signatures:
sts

Description:
This symbol is used to find whether a particular procedure is supported by an SCSCP server. The reply must be either true or false, described in one of the appropriate symbols from the logic1 content dictionary.
Example:

$\mathrm{procedure_call}\left(\mathrm{is_allowed_head}\left(+\right)\right)$
and the server might then reply:
Example:

$\mathrm{procedure_completed}\left(F\right)$
indicating that it does not accept this symbol. Another, slightly more contrived, example would be for the client to ask:
Example:

$\mathrm{procedure_call}\left(\mathrm{is_allowed_head}\left(\mathrm{is_allowed_head}\right)\right)$
Example:

$\mathrm{procedure_completed}\left(T\right)$
In particular, this is the method of choice to find out whether a particular server supports storing remote objects using the scscp2.store_session and/or scscp2.store_persistent methods.
Signatures:
sts

## get_transient_cd

Description:
This symbol is used to get the contents of a transient CD created by a server.
The client could send:
Example:

$\mathrm{procedure_call}\left(\mathrm{get_transient_cd}\left(\mathrm{CDName}\left(\text{scscp_transient_1}\right)\right)\right)$
and the server might then reply:
Example:

$\mathrm{procedure_completed}\left(\mathrm{CD}\left(\mathrm{CDName}\left(\text{scscp_transient_1}\right),\mathrm{CDDate}\left(\text{2007-08-24}\right),\mathrm{Description}\left(\text{CD created by the service provider}\right),\mathrm{CDDefinition}\left(\mathrm{Name}\left(\text{GroupIdentificationService}\right),\mathrm{Description}\left(\text{IdGroup(permgroup by gens)}\right)\right)\right)\right)$
Signatures:
sts

## get_signature

Description:
A symbol for the client to inquire about the signature of a particular function.
The client could send:
Example:

$\mathrm{procedure_call}\left(\mathrm{get_signature}\left(\mathrm{GroupIdentificationService}\right)\right)$
and the server might then reply with a signature message.
Signatures:
sts

 [Next: get_service_description] [Previous: get_transient_cd] [Top]

## get_service_description

Description:
A symbol for the client to ask for some description of a service. Note that this is a very generic description of the service running on a particular port on a particular machine. More details about for example the available symbols there may be obtained with get_allowed_heads, get_signature or get_transient_cd.
The client could send:
Example:

$\mathrm{procedure_call}\left(\mathrm{get_service_description}\left(\right)\right)$
Signatures:
sts

 [Next: signature] [Previous: get_signature] [Top]

## signature

Description:
The symbol to use for describing the types of arguments of a particular function.
Example:

$\mathrm{procedure_completed}\left(\mathrm{signature}\left(\mathrm{GroupIdentificationService},1,1,\begin{array}{c}\mathrm{symbol_set}\left(\mathrm{group},\mathrm{CDName}\left(\text{permut1}\right)\right)\hfill \end{array}\right)\right)$
This means that this GroupIdentificationService requires at least 1 argument, and at most 1 argument, and that the symbol group1.group or anything from the permut1 CD may be used to form this argument.
Example:

$\mathrm{procedure_completed}\left(\mathrm{signature}\left(\mathrm{CAS_Service},0,\infty ,\left(\mathrm{CDGroupName}\left(\text{scscp}\right),\mathrm{CDName}\left(\text{scscp_transient_0}\right),\mathrm{CDName}\left(\text{scscp_transient_1}\right),\mathrm{CDName}\left(\text{arith1}\right),\mathrm{CDName}\left(\text{transc1}\right)\right)\right)\right)$
indicating that this particular CAS_Service takes any number of arguments, which may be formed using anything from the CD group scscp, one of two transient CDs, and the arith1 or transc1 CD.
Signatures:
sts

 [Next: service_description] [Previous: get_service_description] [Top]

## service_description

Description:
The symbol for the server to use in a response to scscp2.get_service_description. It takes three OMSTR arguments: Name, Version, and Description.
Example:

$\mathrm{procedure_completed}\left(\mathrm{service_description}\left(\text{MyGreatService},\text{1.1.0},\text{This service does fantastic things!}\right)\right)$
Signatures:
sts

 [Next: symbol_set] [Previous: signature] [Top]

## symbol_set

Description:
This symbol is used in the reply to a scscp2.get_allowed_heads call. It should be the head of an OM Application, the contents of the OMA being arbitrarily many OM Symbols (meaning that a particular symbol is supported), OMA's with head meta.CDName (meaning that all symbols of a particular CD are supported) or OMA's with head meta.CDGroupName (meaning that all symbols of all CDs of a particular CD group are supported). See the example at scscp2.get_allowed_heads.
Signatures:
sts

 [Next: symbol_set_all] [Previous: service_description] [Top]

## symbol_set_all

Description:
This symbol is used in the reply to a scscp2.get_signature message. It means that this particular service takes any OpenMath object as argument.
Example:

$\mathrm{procedure_completed}\left(\mathrm{signature}\left(\mathrm{Something},0,\infty ,\mathrm{symbol_set_all}\right)\right)$
indicating that this service, scscp_transient_1.Something, takes between 0 and infinity arguments, each of which can be of any type.
Signatures:
sts

 [Next: no_such_transient_cd] [Previous: symbol_set] [Top]

## no_such_transient_cd

Description:
Used for errors that arise when the client asks for a transient cd that the server cannot handle.
Example:

$\mathrm{no_such_transient_cd}\text{scscp_transient_7}$
Signatures:
sts

 [First: store_session] [Previous: symbol_set_all] [Top]