This file is indexed.

/usr/share/gap/pkg/scscp/doc/chap7.html is in gap-scscp 2.1.4+ds-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?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 7: Examples of SCSCP usage</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="chap7"  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">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp;  <a href="chap0.html#contents">[Contents]</a>&nbsp;  &nbsp;<a href="chap6.html">[Previous Chapter]</a>&nbsp;  &nbsp;<a href="chap8.html">[Next Chapter]</a>&nbsp;  </div>

<p><a id="X7B87BC158783E55E" name="X7B87BC158783E55E"></a></p>
<div class="ChapSects"><a href="chap7.html#X7B87BC158783E55E">7 <span class="Heading">Examples of <strong class="pkg">SCSCP</strong> usage</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap7.html#X875D36D286CFC465">7.1 <span class="Heading">Providing services with the SCSCP package</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap7.html#X7AE719DF7E2083BA">7.2 <span class="Heading">Identifying groups of order 512</span></a>
</span>
</div>
</div>

<h3>7 <span class="Heading">Examples of <strong class="pkg">SCSCP</strong> usage</span></h3>

<p>In this chapter we are going to demonstrate some examples of communication between client and server using the SCSCP.</p>

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

<h4>7.1 <span class="Heading">Providing services with the SCSCP package</span></h4>

<p>You can try to run the SCSCP server with the configuration file <code class="file">scscp/example/myserver.g</code>. To do this, go to that directory and enter <code class="code">gap myserver.g</code>. After this you will see some information messages and finally the server will start to wait for the connection. The final part of the startup screen may look as follows:</p>


<div class="example"><pre>

#I  Installed SCSCP procedure Factorial
#I  Installed SCSCP procedure WS_Factorial
#I  Installed SCSCP procedure GroupIdentificationService
#I  Installed SCSCP procedure IdGroup512ByCode
#I  Installed SCSCP procedure WS_IdGroup
#I  Installed SCSCP procedure WS_Karatsuba
#I  Installed SCSCP procedure EvaluateOpenMathCode
#I  Ready to accept TCP/IP connections at localhost:26133 ...
#I  Waiting for new client connection at localhost:26133 ...

</pre></div>

<p>See further self-explanatory comments in the file <code class="file">scscp/example/myserver.g</code>. There also some test files in the directory <code class="file">scscp/tst/</code> supplied with detailed comments. First, you may use demonstration files, preliminary turning on the demonstration mode as it is explained in these files, or just executing step by step each command from <code class="file">scscp/tst/demo.g</code> and <code class="file">scscp/tst/omdemo.g</code>. Then you can try to use files <code class="file">scscp/tst/id512.g</code>, <code class="file">scscp/tst/idperm.g</code> and <code class="file">scscp/tst/factor.g</code> for further tests of <strong class="pkg">SCSCP</strong> services.</p>

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

<h4>7.2 <span class="Heading">Identifying groups of order 512</span></h4>

<p>We will give an example guiding you through all steps of creation of your own <strong class="pkg">SCSCP</strong> service.</p>

<p>The <strong class="pkg">GAP</strong> Small Group Library does not provide identification for groups of order 512 using the function <code class="code">IdGroup</code>:</p>


<div class="example"><pre>

<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IdGroup( DihedralGroup( 256 ) );</span>
[ 256, 539 ]
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IdGroup(DihedralGroup(512)); </span>
Error, the group identification for groups of size 512 is not available 
called from
&lt;function "unknown"&gt;( &lt;arguments&gt; )
 called from read-eval loop at line 71 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
<span class="GAPbrkprompt">brk&gt;</span> <span class="GAPinput"></span>

</pre></div>

<p>However, the <strong class="pkg">GAP</strong> package <strong class="pkg">ANUPQ</strong> <a href="chapBib.html#biBANUPQ">[GNO]</a> has a function <code class="code">IdStandardPresented512Group</code> that does this work as demonstrated below:</p>


<div class="example"><pre>

<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">LoadPackage("anupq");</span>
-------------------------------------------------------------
Loading ANUPQ 3.0 (ANU p-Quotient package)
C code by  Eamonn O'Brien &lt;obrien@math.auckland.ac.nz&gt;
           (ANU pq binary version: 1.8)
GAP code by Werner Nickel &lt;nickel@mathematik.tu-darmstadt.de&gt;
        and   Greg Gamble  &lt;gregg@math.rwth-aachen.de&gt;

            For help, type: ?ANUPQ
-------------------------------------------------------------
true
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">G := DihedralGroup( 512 );            </span>
&lt;pc group of size 512 with 9 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">F := PqStandardPresentation( G );</span>
&lt;fp group on the generators [ f1, f2, f3, f4, f5, f6, f7, f8, f9 ]&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">H := PcGroupFpGroup( F );</span>
&lt;pc group of size 512 with 9 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IdStandardPresented512Group( H );</span>
[ 512, 2042 ]

</pre></div>

<p>The package <strong class="pkg">ANUPQ</strong> requires <strong class="pkg">UNIX</strong> environment and it is natural to provide an identification service for groups of order 512 to make it available for other platforms.</p>

<p>Now we need to decide how the client will transmit a group to the server. Can we encode this group in <strong class="pkg">OpenMath</strong>? But there is no content dictionary for PcGroups. Should we convert it to a permutation representation to be able to use existing content dictionaries? But then the resulting <strong class="pkg">OpenMath</strong> code will be not compact. However, the <strong class="pkg">SCSCP</strong> protocol provides enough freedom for the user to select its own data representation, and since we are linking together two copies of the same system, we may use the <em>pcgs code</em> to pass the data to the server (see <code class="func">CodePcGroup</code> (<span class="RefLink">Reference: CodePcGroup</span>).</p>

<p>First we create a function which accepts the integer number that is the code for pcgs of a group of order 512 and returns the number of this group in the GAP Small Groups library:</p>


<div class="example"><pre>

IdGroup512ByCode := function( code )
local G, F, H;
G := PcGroupCode( code, 512 );
F := PqStandardPresentation( G );
H := PcGroupFpGroup( F );
return IdStandardPresented512Group( H );
end;

</pre></div>

<p>After such function was created on the server, we need to make it "visible" as an <strong class="pkg">SCSCP</strong> procedure:</p>


<div class="example"><pre>

<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">InstallSCSCPprocedure("IdGroup512", IdGroup512ByCode );</span>
InstallSCSCPprocedure : procedure IdGroup512 installed. 

</pre></div>

<p>Note that this function assumes that the argument is a valid code for some group of order 512, and we wish the client to make it sure that this is the case. To do this, and also for the client's convenience, we provide the client's counterpart for this service. Here the group must be a pc-group of order 512, otherwise an error message will appear.</p>


<div class="example"><pre>

<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IdGroup512 := function( G )</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">   local code, result;</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">   if Size( G ) &lt;&gt; 512 then</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">     Error( "G must be a group of order 512 \n" );</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">   fi;</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">   code := CodePcGroup( G );</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">   result := EvaluateBySCSCP( "IdGroup512ByCode", [ code ], </span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">                              "localhost", 26133 );</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">   return result.object;</span>
<span class="GAPprompt">&gt;</span> <span class="GAPinput">end;;</span>

</pre></div>

<p>Now the client can call the function <code class="code">IdGroup512</code>, and the procedure of getting result is as much straightforward as using <code class="code">IdGroup</code> for those groups where it works:</p>


<div class="example"><pre>

<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IdGroup512(DihedralGroup(512));</span>
[ 512, 2042 ]

</pre></div>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp;  <a href="chap0.html#contents">[Contents]</a>&nbsp;  &nbsp;<a href="chap6.html">[Previous Chapter]</a>&nbsp;  &nbsp;<a href="chap8.html">[Next Chapter]</a>&nbsp;  </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="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>