Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/scscp/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 27.7.2025 mit Größe 26 kB image not shown  

Quelle  chap5.html   Sprache: HTML

 
 products/Sources/formale Sprachen/GAP/pkg/scscp/doc/chap5.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (scscp) - Chapter 5: Running SCSCP server</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap5"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap4.html">[Previous Chapter]</a>    <a href="chap6.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap5_mj.html">[MathJax on]</a></p>
<p><a id="X7DEE95317812A998" name="X7DEE95317812A998"></a></p>
<div class="ChapSects"><a href="chap5.html#X7DEE95317812A998">5 <span class="Heading">Running SCSCP server</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X84D937F07DC015BE">5.1 <span class="Heading">Installation of <strong class="pkg">SCSCP</strongprocedures</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X8031C2F4787E0C1A">5.1-1 InstallSCSCPprocedure</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X7E03B69B7C1BF974">5.1-2 OMsymRecord</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X865409A27C7BBD7B">5.2 <span class="Heading">Starting SCSCP server</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X831C84577884215E">5.2-1 RunSCSCPserver</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X789962C579109D8F">5.3 <span class="Heading">Procedures to get information about the <strong class="pkg">SCSCP</strong> server</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X7CBF8B63852898CF">5.3-1 GetServiceDescription</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X7F387F3681775177">5.3-2 GetAllowedHeads</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X820055F180BE57A6">5.3-3 IsAllowedHead</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X851F521B790512EB">5.3-4 GetTransientCD</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap5.html#X79B0927285DC69D5">5.3-5 GetSignature</a></span>
</div></div>
</div>

<h3>5 <span class="Heading">Running SCSCP server</span></h3>

<p><a id="X84D937F07DC015BE" name="X84D937F07DC015BE"></a></p>

<h4>5.1 <span class="Heading">Installation of <strong class="pkg">SCSCP</strong> procedures</span></h4>

<p>There may various ways to run <strong class="pkg">SCSCP</strong> server, for example:</p>


<ul>
<li><p>allowing generic services like evaluation of arbitrary <strong class="pkg">OpenMath</strongcode;</p>

</li>
<li><p>offering highly specialized procedures like identification of groups of order 512;</p>

</li>
<li><p>providing access to a database of mathematical objects.</p>

</li>
</ul>
<p>Each of these use cases requires certain control over the level of functionality exposed to the client. To achieve this, before starting <strong class="pkg">SCSCP</strong> service its provider must call the function <code class="func">InstallSCSCPprocedure</code> (<a href="chap5.html#X8031C2F4787E0C1A"><span class="RefLink">5.1-1</span></a>) to make required procedures <q>visible</q> for the client.</p>

<p>Additionally, the service can be made made accessible only for clients running on the same computer, or accessible only through a particular network interface, or generally accessible. This customization is made at the stage of starting the <strong class="pkg">SCSCP</strong> server with the function <code class="func">RunSCSCPserver</code> (<a href="chap5.html#X831C84577884215E"><span class="RefLink">5.2-1</span></a>).</p>

<p><a id="X8031C2F4787E0C1A" name="X8031C2F4787E0C1A"></a></p>

<h5>5.1-1 InstallSCSCPprocedure</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InstallSCSCPprocedure</code>( <var class="Arg">procname</var>, <var class="Arg">procfunc</var>[, <var class="Arg">description</var>][, <var class="Arg">narg1</var>[, <var class="Arg">narg2</var>][, <var class="Arg">signature</var>]] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: nothing</p>

<p>For a string <var class="Arg">procname</var> and a function <var class="Arg">procfunc</var>, <code class="func">InstallSCSCPprocedure</code> makes the <var class="Arg">procfunc</var> available as SCSCP procedure under the name <var class="Arg">procname</var>, adding it to the transient <strong class="pkg">OpenMath</strong> content dictionary <code class="code">scscp_transient_1</code> that will exist during the service lifetime.</p>

<p>The second argument <var class="Arg">procfunc</var> may be either a standard or user-defined <strong class="pkg">GAP</strong> function (procedure, operation, etc.).</p>

<p>The rest of arguments are optional and may be used in a number of combinations:</p>


<ul>
<li><p><var class="Arg">description</var> is a string with the description of the procedure. It may be used by the help system. If it is omitted, the procedure will be reported as undocumented.</p>

</li>
<li><p><var class="Arg">narg1</var> is a non-negative integer, specifying the minimal number of arguments, and <var class="Arg">narg2</var> is a non-negative integer or infinity, specifying the maximal number of arguments. If <var class="Arg">narg2</var> is omitted then the maximal number of arguments will be set to <var class="Arg">narg1</var>. If both <var class="Arg">narg1</var> and <var class="Arg">narg2</var> are omitted then the minimal number of arguments will be set to zero and their maximal number will be set to infinity.</p>

</li>
<li><p><var class="Arg">signature</var> is the signature record of the procedure. If the <var class="Arg">signature</var> is given, then the number of arguments must be explicitly specified (by <var class="Arg">narg1</var> with or without <var class="Arg">narg2</var>) at least to zero and infinity respectively (to ensure proper matching of arguments). Note that it is completely acceptable for a symbol from a transient content dictionary to overstate the set of symbols which may occur in its children using the <code class="code">scscp2.symbol_set_all</code> symbol, and to use standard <strong class="pkg">OpenMath</strong> errors to reject requests later at the stage of their evaluation. For example, using such approach, we will define the procedure <code class="code">WS_Factorial</code> accepting not only immediate <code class="code"><OMI></code> objects but anything which could be evaluated to an integer.</p>

<p>. The signature must be either a list of records, where <span class="SimpleMath">i</span>-th record corresponds to the <span class="SimpleMath">i</span>-th argument, or a record itself meaning that it specifies the signature for all arguments. In the latter case the record may be <code class="code">rec( )</code> corresponding to the <code class="code">scscp2.symbol_set_all</code> symbol (this will be assumed by default if the signature will be omitted).</p>

<p>If more detailed description of allowed arguments is needed, the signature record (one for all arguments or a specific one) may have components <code class="code">CDgroups</code>, <code class="code">CDs</code> and <code class="code">Symbols</code>. The first two are lists of names of content dictionary groups and content dictionaries, and the third is a record whose components are names of content dictionaries, containing lists of names of allowed symbols from these dictionaries,for example:</p>


<div class="example"><pre>

signature := rec( CDgroups := [ "scscp" ],
              CDs := [ "arith1""linalg1" ],
              Symbols := rec( polyd1 := [ "DMP""term""SDMP" ],
                              polyu := [ "poly_u_rep""term" ] ) );

</pre></div>

</li>
</ul>
<p>In the following example we define the function <code class="code">WS_Factorial</code> that takes an integers and returns its factorial, using only mandatory arguments of <code class="func">InstallSCSCPprocedure</code>:</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">InstallSCSCPprocedure( "WS_Factorial", Factorial );</span>
InstallSCSCPprocedure : procedure WS_Factorial installed. 

</pre></div>

<p>In the following example we install the procedure that will accept a list of permutations and return the number in the <strong class="pkg">GAP</strongSmall Groups library of the group they generate (for the sake of simplicity we omit tests of validity of arguments, availability of <code class="code">IdGroup</code> for groups of given order etc.)</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">IdGroupByGenerators:=function( permlist )</span>
<span class="GAPprompt">></span> <span class="GAPinput">return IdGroup( Group( permlist ) );</span>
<span class="GAPprompt">></span> <span class="GAPinput">end;</span>
function( permlist ) ... end
<span class="GAPprompt">gap></span> <span class="GAPinput">InstallSCSCPprocedure( "GroupIdentificationService", IdGroupByGenerators );</span>
InstallSCSCPprocedure : procedure GroupIdentificationService installed. 

</pre></div>

<p>After installation, the procedure may be reinstalled, if necessary:</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">InstallSCSCPprocedure( "WS_Factorial", Factorial );</span>
WS_Factorial is already installed. Do you want to reinstall it [y/n]? y
InstallSCSCPprocedure : procedure WS_Factorial reinstalled. 

</pre></div>

<p>Finally, some examples of various combinations of optional arguments:</p>


<div class="example"><pre>

InstallSCSCPprocedure( "WS_Phi", Phi, 
                       "Euler's totient function, see ?Phi in GAP", 1, 1 );
InstallSCSCPprocedure( "GroupIdentificationService"
                       IdGroupByGenerators, 1, infinity, rec() );
InstallSCSCPprocedure( "IdGroup512ByCode", IdGroup512ByCode, 1 );
InstallSCSCPprocedure( "WS_IdGroup", IdGroup, "See ?IdGroup in GAP" );

</pre></div>

<p>Note that it is quite acceptable to overstate the signature of the procedure and use only mandatory arguments in a call to <code class="func">InstallSCSCPprocedure</code>, which will be installed then as a procedure that can accept arbitrary number of arguments encoded without any restrictions on <strong class="pkg">OpenMath</strong> symbols used, because anyway the <strong class="pkg">GAP</strong> system will return an error in case of the wrong number or type of arguments, though it might be a good practice to give a way to the client to get more precise procedure description a priori, that is before sending request. See <a href="chap5.html#X789962C579109D8F"><span class="RefLink">5.3</span></a> about utilities for obtaining such information about the <strong class="pkg">SCSCP</strong> service.</p>

<p>Some more examples of installation of SCSCP procedures are given in the file <code class="file">scscp/example/myserver.g</code>.</p>

<p><a id="X7E03B69B7C1BF974" name="X7E03B69B7C1BF974"></a></p>

<h5>5.1-2 OMsymRecord</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OMsymRecord</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>This is the global record from the <strong class="pkg">OpenMath</strong> package used for the conversion from <strong class="pkg">OpenMath</strong> to <strong class="pkg">GAP</strong>. It is extended in the <strong class="pkg">SCSCP</strong> package by adding support for symbols from <code class="code">scscp1</code> and <code class="code">scscp2</code> content dictionaries (<a href="chapBib.html#biBscscp1cd">[FHK+a]</a>, <a href="chapBib.html#biBscscp2cd">[FHK+c]</a>). Additionally, <code class="func">InstallSCSCPprocedure</code> (<a href="chap5.html#X8031C2F4787E0C1A"><span class="RefLink">5.1-1</span></a>) adds to this record a component corresponding to the appropriate transient content dictionary (by default, <code class="code">scscp_transient_1</code>) defining mappings between <strong class="pkg">OpenMath</strong> symbols from this content dictionary and installed <strong class="pkg">SCSCP</strong> procedures.</p>

<p><a id="X865409A27C7BBD7B" name="X865409A27C7BBD7B"></a></p>

<h4>5.2 <span class="Heading">Starting SCSCP server</span></h4>

<p><a id="X831C84577884215E" name="X831C84577884215E"></a></p>

<h5>5.2-1 RunSCSCPserver</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RunSCSCPserver</code>( <var class="Arg">servertype</var>, <var class="Arg">port</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: nothing</p>

<p>Will start the <strong class="pkg">SCSCP</strong> server at port given by the integer <var class="Arg">port</var>. The first parameter <var class="Arg">servertype</var> is either <code class="keyw">true</code>, <code class="keyw">false</code> or a string containing the server hostname:</p>


<ul>
<li><p>when <var class="Arg">servertype</var> is <code class="keyw">true</code>, the server will be started in a <q>universal</q> mode and will accept all incoming connections;</p>

</li>
<li><p>when <var class="Arg">servertype</var> is <code class="keyw">false</code>, the server will be started at <code class="file">localhost</code> and will not accept any incoming connections from outside;</p>

</li>
<li><p>when <var class="Arg">servertype</var> is a string, for example, <code class="file">"scscp.gap-system.org"</code>, the server will be accessible only by specified server name (this may be useful to manage accessibility if, for example, the hardware has several network interfaces).</p>

</li>
</ul>

<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">RunSCSCPserver( "localhost", 26133 );</span>
Ready to accept TCP/IP connections at localhost:26133 ...
Waiting for new client connection at localhost:26133 ...

</pre></div>

<p>Actually, there is more than one way to run <strong class="pkg">GAP</strong> <strong class="pkg">SCSCP</strong> server:</p>


<ul>
<li><p>from the <strong class="pkg">GAP</strong> session as shown in the example above;</p>

</li>
<li><p>starting <strong class="pkg">GAP</strong> as <code class="code">gap myserver.g</code>, where <code class="file">myserver.g</code> is the server configuration file with the last command being the call <code class="func">RunSCSCPserver</code>, which may take its arguments from the configuration file <code class="file">scscp/config.g</code> (an example of such configuration file is given in <code class="file">scscp/example/myserver.g</code> );</p>

</li>
<li><p>start <strong class="pkg">GAP</strong> as a daemon using the script <code class="file">gapd.sh</code> which is supplied in the root directory of the package (for the description of all available options see comments in <code class="file">gapd.sh</code>) and may overwrite parameters from <code class="file">scscp/config.g</code>.</p>

</li>
</ul>
<p>See Section <a href="chap2.html#X878084B083D5217F"><span class="RefLink">2.2</span></a> about configuring files <code class="file">config.g</code> and <code class="file">gapd.sh</code>.</p>

<p><a id="X789962C579109D8F" name="X789962C579109D8F"></a></p>

<h4>5.3 <span class="Heading">Procedures to get information about the <strong class="pkg">SCSCP</strong> server</span></h4>

<p><a id="X7CBF8B63852898CF" name="X7CBF8B63852898CF"></a></p>

<h5>5.3-1 GetServiceDescription</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GetServiceDescription</code>( <var class="Arg">server</var>, <var class="Arg">port</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: record</p>

<p>Returns the record with three components containing strings with the name, version and description of the service as specified by the service provider in the <code class="file">scscp/config.g</code> (for details about configuration files, see <a href="chap2.html#X878084B083D5217F"><span class="RefLink">2.2</span></a>).</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">GetServiceDescription( "localhost", 26133 );</span>
rec( 
  description := "Started with the configuration file scscp/example/myserver.g\
  on Thu 16 Feb 2017 16:03:56 GMT", service_name := "GAP SCSCP service",
  version := "GAP 4.8.6 + SCSCP 2.2.1" )

</pre></div>

<p><a id="X7F387F3681775177" name="X7F387F3681775177"></a></p>

<h5>5.3-2 GetAllowedHeads</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GetAllowedHeads</code>( <var class="Arg">server</var>, <var class="Arg">port</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: record</p>

<p>Returns the record with components corresponding to content dictionaries. The name of each component is the name of the content dictionary, and its the value is either a boolean or a list of strings. In case it's value is a list, it contains names of symbols from the corresponding content dictionary which are allowed to appear as a head symbol (i.e. the first child of the outermost <OMA>) in an SCSCP procedure call to the SCSCP server running at server:port. If it's value is <code class="keyw">true</code>, it means the server allows all symbols from the corresponding content dictionary.</p>

<p>Note that it is acceptable (although not quite desirable) for a server to <q>overstate</q> the set of symbols it accepts and use standard <strong class="pkg">OpenMath</strong> errors to reject requests later.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">GetAllowedHeads("localhost",26133);</span>
rec( scscp_transient_1 := [ "AClosestVectorCombinationsMatFFEVecFFE"
      "Determinant""GroupIdentificationService"
      "IO_UnpickleStringAndPickleItBack""IdGroup512ByCode""Identity"
      "IsPrimeInt""Length""MathieuGroup""MatrixGroup"
      "NormalizedUnitCFcommutator""NormalizedUnitCFpower"
      "NrConjugacyClasses""NrSmallGroups""NumberCFGroups"
      "NumberCFSolvableGroups""PointImages""QuillenSeriesByIdGroup"
      "ResetMinimumDistanceService""SCSCPStartTracing""SCSCPStopTracing"
      "Size""SylowSubgroup""WS_AlternatingGroup""WS_AutomorphismGroup"
      "WS_ConwayPolynomial""WS_Factorial""WS_FactorsCFRAC"
      "WS_FactorsECM""WS_FactorsMPQS""WS_FactorsPminus1"
      "WS_FactorsPplus1""WS_FactorsTD""WS_IdGroup""WS_LatticeSubgroups",
      "WS_Mult""WS_MultMatrix""WS_Phi""WS_PrimitiveGroup"
      "WS_SmallGroup""WS_SymmetricGroup""WS_TransitiveGroup""addition" 
     ] )

</pre></div>

<p><a id="X820055F180BE57A6" name="X820055F180BE57A6"></a></p>

<h5>5.3-3 IsAllowedHead</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAllowedHead</code>( <var class="Arg">cd</var>, <var class="Arg">symbol</var>, <var class="Arg">server</var>, <var class="Arg">port</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code></p>

<p>Checks whether the <strong class="pkg">OpenMath</strong> symbol <var class="Arg">cd</var><code class="code">.</code><var class="Arg">symbol</var>, which may be a symbol from a standard or transient <strong class="pkg">OpenMath</strong> content dictionary, is allowed to appear as <q>head</q> symbol (i.e. the first child of the outermost <code class="code"><OMA></code> in an <strong class="pkg">SCSCP</strong> procedure call to the <strong class="pkg">SCSCP</strong> server running at <var class="Arg">server</var><code class="code">:</code><var class="Arg">port</var>. This enables the client to check whether a particular symbol is allowed without requesting the full list of symbols.</p>

<p>Also, it is acceptable (although not necessarily desirable) for a server to <q>overstate</q> the set of symbols it accepts and use standard <strong class="pkg">OpenMath</strong> errors to reject requests later.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">IsAllowedHead( "permgp1""group""localhost", 26133 );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsAllowedHead( "setname1""Q""localhost", 26133 );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsAllowedHead( "setname1""R""localhost", 26133 );</span>
false

</pre></div>

<p><a id="X851F521B790512EB" name="X851F521B790512EB"></a></p>

<h5>5.3-4 GetTransientCD</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GetTransientCD</code>( <var class="Arg">transient_cd</var>, <var class="Arg">server</var>, <var class="Arg">port</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: record</p>

<p>Returns a record with the transient content dictionary <var class="Arg">transient_cd</var> from the <strong class="pkg">SCSCP</strong> server running at <var class="Arg">server</var><code class="code">:</code><var class="Arg">port</var>. Names of components of this record correspond to symbols from the <code class="code">meta</code> content dictionary.</p>

<p>By default, the name of the transient content dictionary for the <strong class="pkg">GAP</strong> <strong class="pkg">SCSCP</strong> server is <code class="code">scscp_transient_1</code>. Other systems may use transient content dictionaries with another names, which, however, must always begin with <code class="code">scscp_transient_</code> and may be guessed from the output of <code class="func">GetAllowedHeads</code> (<a href="chap5.html#X7F387F3681775177"><span class="RefLink">5.3-2</span></a>).</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">GetTransientCD( "scscp_transient_1""localhost", 26133 );</span>
rec( CDDate := "2017-02-08"
  CDDefinitions := 
    [ rec( Description := "Size is currently undocumented.", Name := "Size" ),
      rec( Description := "Length is currently undocumented."
          Name := "Length" ), 
      rec( Description := "NrConjugacyClasses is currently undocumented."
          Name := "NrConjugacyClasses" ), 
...
      rec( Description := "MatrixGroup is currently undocumented."
          Name := "MatrixGroup" ) ], CDName := "scscp_transient_1"
  CDReviewDate := "2017-02-08", CDRevision := "0", CDStatus := "private"
  CDVersion := "0"
  Description := "This is a transient CD for the GAP SCSCP service" )

</pre></div>

<p><a id="X79B0927285DC69D5" name="X79B0927285DC69D5"></a></p>

<h5>5.3-5 GetSignature</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GetSignature</code>( <var class="Arg">transientcd</var>, <var class="Arg">symbol</var>, <var class="Arg">server</var>, <var class="Arg">port</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: record</p>

<p>Returns a record with the signature of the <strong class="pkg">OpenMath</strong> symbol <var class="Arg">transientcd</var><code class="code">.</code><var class="Arg">symbol</var> from a transient <strong class="pkg">OpenMath</strong> content dictionary. This record contains components corresponding to the <strong class="pkg">OpenMath</strong> symbol whose signature is described, the minimal and maximal number of its children (that is, of its arguments), and symbols which may be used in the <strong class="pkg">OpenMath</strong> encoding of its children. Note that it is acceptable for a symbol from a transient content dictionary to overstate the set of symbols which may occur in its children using the <code class="code">scscp2.symbol_set_all</code> symbol, and use standard <strong class="pkg">OpenMath</strong> errors to reject requests later, like in the example below: using such approach, the procedure <code class="code">WS_Factorial</code> is defined to accept not only immediate <code class="code"><OMI></code> objects but anything which could be evaluated to an integer.</p>


<div class="example"><pre>

<span class="GAPprompt">gap></span> <span class="GAPinput">GetSignature("scscp_transient_1","WS_Factorial","localhost",26133);</span>
rec( maxarg := 1, minarg := 1,
  symbol := rec( cd := "scscp_transient_1", name := "WS_Factorial" ),
  symbolargs := rec( cd := "scscp2", name := "symbol_set_all" ) )

</pre></div>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap4.html">[Previous Chapter]</a>    <a href="chap6.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

99%


¤ Dauer der Verarbeitung: 0.22 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.