|
|
|
|
Quellcode-Bibliothek chap7.html
Sprache: HTML
|
|
| products/Sources/formale Sprachen/GAP/pkg/atlasrep/doc/chap7.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 (AtlasRep) - Chapter 7: Technicalities of the AtlasRep Package</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="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="chap6.html">[Previous Chapter]</a> <a href="chapBib.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap7_mj.html">[MathJax on]</a></p>
<p><a id="X7F77634D817156B3" name="X7F77634D817156B3"></a></p>
<div class="ChapSects"><a href="chap7.html#X7F77634D817156B3">7 <span class="Heading">Technicalities of the <strong class="pkg">AtlasRep</strong> Package</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7DC2B7917DC30B28">7.1 <span class="Heading">Global Variables Used by the <strong class="pkg">AtlasRep</strong> Package</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8006BE167EB81E16">7.1-1 InfoAtlasRep</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X78601C3A87921E08">7.1-2 InfoCMeatAxe</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X80D5EF9A7FEF124B">7.1-3 InfoBBox</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X84A157BF7D0CB270">7.1-4 AGR</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7BEC94A6781E126E">7.1-5 AtlasOfGroupRepresentationsInfo</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X81C5B5E78215169D">7.2 <span class="Heading">How to Customize the Access to Data files</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7D76D4437A9646E7">7.3 <span class="Heading">Reading and Writing MeatAxe Format Files</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X83D5103780E1238F">7.3-1 ScanMeatAxeFile</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7DDD09BE87063052">7.3-2 MeatAxeString</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X79D9AE4878E9DFA6">7.3-3 FFList</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8477AA668733255C">7.3-4 CMtxBinaryFFMatOrPerm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X872FA00C7F791FBB">7.3-5 FFMatOrPermCMtxBinary</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7FEE162B7F63BEA0">7.4 <span class="Heading">Reading and Writing <strong class="pkg">ATLAS</strong> Straight Line Programs</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7D6617E47B013A37">7.4-1 ScanStraightLineProgram</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X82842D807A7B7DF7">7.4-2 AtlasStringOfProgram</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X809898027EFDA56E">7.5 <span class="Heading">Data Types Used in the <strong class="pkg">AtlasRep</strong> Package</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X836AA4EA8346BE5B">7.5-1 AGR.DeclareDataType</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7A86627B80980F61">7.6 <span class="Heading">Filenames Used in the <strong class="pkg">AtlasRep</strong> Package</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8486CCB181FC99A3">7.6-1 AGR.ParseFilenameFormat</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X78AB92DB7C2CAB6E">7.6-2 AGR.FileContents</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7CCA3DE97E756F01">7.7 <span class="Heading">The record component <code class="code">identifier</code> used by the <strong class="pkg">AtlasRep</strong> Package</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X81685FC979BC3FB8">7.7-1 <span class="Heading">AtlasRepIdentifier</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7B1DECF080AEB806">7.8 <span class="Heading">The Tables of Contents of the <strong class="pkg">AtlasRep</strong> Package</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X79C5F2267ACCF52A">7.9 <span class="Heading">Sanity Checks for the <strong class="pkg">AtlasRep</strong> Package</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X86FDCF0B85496AE5">7.9-1 <span class="Heading">Sanity Checks for a Table of Contents</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7FBFA8D287B807D2">7.9-2 <span class="Heading">Other Sanity Checks</span></a>
</span>
</div></div>
</div>
<h3>7 <span class="Heading">Technicalities of the <strong class="pkg">AtlasRep</strong> Package</span></h3>
<p>This chapter describes those parts of the <strong class="pkg">GAP</strong> interface to the <strong class="pkg">ATLAS</strong> of Group Representations that do not belong to the user interface (cf. Chapter <a href="chap3.html#X87EAF8E578D95793"><span class="RefLink">3</span></a>).</p>
<p>Besides global variables used for administrational purposes (see Section <a href="chap7.html#X7DC2B7917DC30B28"><span class="RefLink">7.1</span></a>) and several sanity checks (see Section <a href="chap7.html#X79C5F2267ACCF52A"><span class="RefLink">7.9</span></a>), they can be regarded as the interface between the data actually contained in the files and the corresponding <strong class="pkg">GAP</strong> objects (see Section <a href="chap7.html#X81C5B5E78215169D"><span class="RefLink">7.2</span></a>, <a href="chap7.html#X7D76D4437A9646E7"><span class="RefLink">7.3</span></a>, <a href="chap7.html#X7FEE162B7F63BEA0"><span class="RefLink">7.4</span></a>, and <a href="chap7.html#X809898027EFDA56E"><span class="RefLink">7.5</span></a>), and the interface between the remote and the local version of the database (see Section <a href="chap7.html#X7A86627B80980F61"><span class="RefLink">7.6</span></a> and <a href="chap7.html#X7B1DECF080AEB806"><span class="RefLink">7.8</span></a>). The former interface contains functions to read and write files in <strong class="pkg">MeatAxe</strong> format, which may be interesting for users familiar with <strong class="pkg">MeatAxe</strong> standalones (see for example <a href="chapBib.html#biBCMeatAxe">[Rin]</a>). Other low level functions may be undocumented in the sense that they are not described in this manual. Users interested in them may look at the actual implementation in the <code class="file">gap</code> directory of the package, but it may happen that this will be changed in future versions of the package.</p>
<p><a id="X7DC2B7917DC30B28" name="X7DC2B7917DC30B28"></a></p>
<h4>7.1 <span class="Heading">Global Variables Used by the <strong class="pkg">AtlasRep</strong> Package</span></h4>
<p>For debugging purposes, <strong class="pkg">AtlasRep</strong> functions print information depending on the info level of the info classes <code class="func">InfoAtlasRep</code> (<a href="chap7.html#X8006BE167EB81E16"><span class="RefLink">7.1-1</span></a>), <code class="func">InfoCMeatAxe</code> (<a href="chap7.html#X78601C3A87921E08"><span class="RefLink">7.1-2</span></a>), and <code class="func">InfoBBox</code> (<a href="chap7.html#X80D5EF9A7FEF124B"><span class="RefLink">7.1-3</span></a>) (cf. <a href="../../../doc/ref/chap7.html#X7A9C902479CB6F7C"><span class="RefLink">Reference: Info Functions</span></a>).</p>
<p>The info level of an info class can be changed using <code class="func">SetInfoLevel</code> (<a href="../../../doc/ref/chap7.html#X7B2ADC37783104B9"><span class="RefLink">Reference: InfoLevel</span></a>). For example, the info level of <code class="func">InfoAtlasRep</code> (<a href="chap7.html#X8006BE167EB81E16"><span class="RefLink">7.1-1</span></a>) can be set to the nonnegative integer <span class="SimpleMath">n</span> using <code class="code">SetInfoLevel( InfoAtlasRep, </code><span class="SimpleMath">n</span><code class="code"> )</code>.</p>
<p><a id="X8006BE167EB81E16" name="X8006BE167EB81E16"></a></p>
<h5>7.1-1 InfoAtlasRep</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoAtlasRep</code></td><td class="tdright">( info class )</td></tr></table></div>
<p>If the info level of <code class="func">InfoAtlasRep</code> is at least <span class="SimpleMath">1</span> then information about <code class="keyw">fail</code> results of <strong class="pkg">AtlasRep</strong> functions is printed. If the info level is at least <span class="SimpleMath">2</span> then also information about calls to external programs is printed. The default level is <span class="SimpleMath">0</span>, no information is printed on this level.</p>
<p><a id="X78601C3A87921E08" name="X78601C3A87921E08"></a></p>
<h5>7.1-2 InfoCMeatAxe</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoCMeatAxe</code></td><td class="tdright">( info class )</td></tr></table></div>
<p>If the info level of <code class="func">InfoCMeatAxe</code> is at least <span class="SimpleMath">1</span> then information about <code class="keyw">fail</code> results of <code class="code">C</code>-<strong class="pkg">MeatAxe</strong> functions (see Section <a href="chap7.html#X7D76D4437A9646E7"><span class="RefLink">7.3</span></a>) is printed. The default level is zero, no information is printed on this level.</p>
<p><a id="X80D5EF9A7FEF124B" name="X80D5EF9A7FEF124B"></a></p>
<h5>7.1-3 InfoBBox</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoBBox</code></td><td class="tdright">( info class )</td></tr></table></div>
<p>If the info level of <code class="func">InfoBBox</code> is at least <span class="SimpleMath">1</span> then information about <code class="keyw">fail</code> results of functions dealing with black box programs (see Section <a href="chap6.html#X7BE856BC785A9E8F"><span class="RefLink">6.2</span></a>) is printed. The default level is <span class="SimpleMath">0</span>, no information is printed on this level.</p>
<p><a id="X84A157BF7D0CB270" name="X84A157BF7D0CB270"></a></p>
<h5>7.1-4 AGR</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AGR</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>is a record whose components are functions and data that are used by the high level interface functions. Some of the components are documented, see for example the index of the package manual.</p>
<p><a id="X7BEC94A6781E126E" name="X7BEC94A6781E126E"></a></p>
<h5>7.1-5 AtlasOfGroupRepresentationsInfo</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AtlasOfGroupRepresentationsInfo</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>This is a record that is defined in the file <code class="file">gap/types.g</code> of the package, with the following components.</p>
<dl>
<dt><strong class="Mark"><code class="code">GAPnames</code></strong></dt>
<dd><p>a list of pairs, each containing the <strong class="pkg">GAP</strong> name and the <strong class="pkg">ATLAS</strong>-file name of a group, see Section <a href="chap3.html#X81BF52FC7B8C08D4"><span class="RefLink">3.2</span></a>,</p>
</dd>
<dt><strong class="Mark"><code class="code">notified</code></strong></dt>
<dd><p>a list used for administrating extensions of the database (see Chapter <a href="chap5.html#X7B0718A178BB10CA"><span class="RefLink">5</span></a>); the value is changed by <code class="func">AtlasOfGroupRepresentationsNotifyData</code> (<a href="chap5.html#X81B5FA0578257653"><span class="RefLink">5.1-1</span></a>) and <code class="func">AtlasOfGroupRepresentationsForgetData</code> (<a href="chap5.html#X7E0DC24681F17A9D"><span class="RefLink">5.1-2</span></a>),</p>
</dd>
<dt><strong class="Mark"><code class="code">characterinfo</code>, <code class="code">permrepinfo</code>, <code class="code">ringinfo</code></strong></dt>
<dd><p>additional information about representations, concerning the afforded characters, the point stabilizers of permutation representations, and the rings of definition of matrix representations; this information is used by <code class="func">DisplayAtlasInfo</code> (<a href="chap3.html#X79DACFFA7E2D1A99"><span class="RefLink">3.5-1</span></a>),</p>
</dd>
<dt><strong class="Mark"><code class="code">TableOfContents</code></strong></dt>
<dd><p>a record with at most the components <code class="code">core</code>, <code class="code">internal</code>, <code class="code">local</code>, <code class="code">merged</code>, <code class="code">types</code>, and the identifiers of database extensions. The value of the component <code class="code">types</code> is set in <code class="func">AGR.DeclareDataType</code> (<a href="chap7.html#X836AA4EA8346BE5B"><span class="RefLink">7.5-1</span></a>), and the values of the other components are created by <code class="func">AtlasOfGroupRepresentationsNotifyData</code> (<a href="chap5.html#X81B5FA0578257653"><span class="RefLink">5.1-1</span></a>).</p>
</dd>
<dt><strong class="Mark"><code class="code">accessFunctions</code></strong></dt>
<dd><p>a list of records, each describing how to access the data files, see Sections <a href="chap4.html#X81AD105979465162"><span class="RefLink">4.2-5</span></a> and <a href="chap7.html#X81C5B5E78215169D"><span class="RefLink">7.2</span></a>, and</p>
</dd>
</dl>
<p><a id="X81C5B5E78215169D" name="X81C5B5E78215169D"></a></p>
<h4>7.2 <span class="Heading">How to Customize the Access to Data files</span></h4>
<p>By default, locally available data files are stored in prescribed directories, and the files are exactly the text files that have been downloaded from appropriate places in the internet. However, a more flexible approach may be useful.</p>
<p>First, one may want to use <em>different file formats</em>, for example <strong class="pkg">MeatAxe</strong> binary files may be provided parallel to <strong class="pkg">MeatAxe</strong> text files. Second, one may want to use <em>a different directory structure</em>, for example the same structure as used on some server –this makes sense for example if a local mirror of a server is available, because then one can read the server files directly, without transferring/copying them to another directory.</p>
<p>In order to achieve this (and perhaps more), we admit to customize the meaning of the following three access steps.</p>
<dl>
<dt><strong class="Mark">Are the required data locally available?</strong></dt>
<dd><p>There may be different file formats available, such as text or binary files, and it may happen that the data are available in one file or are distributed to several files.</p>
</dd>
<dt><strong class="Mark">How can a file be made locally available?</strong></dt>
<dd><p>A different remote file may be fetched, or some postprocessing may be required.</p>
</dd>
<dt><strong class="Mark">How is the data of a file accessed by <strong class="pkg">GAP</strong>?</strong></dt>
<dd><p>A different function may be needed to evaluate the file contents.</p>
</dd>
</dl>
<p>For creating an overview of the locally available data, the first of these steps must be available independent of actually accessing the file in question. For updating the local copy of the server data, the second of the above steps must be available independent of the third one. Therefore, the package provides the possibility to extend the default behaviour by adding new records to the <code class="code">accessFunctions</code> component of <code class="func">AtlasOfGroupRepresentationsInfo</code> (<a href="chap7.html#X7BEC94A6781E126E"><span class="RefLink">7.1-5</span></a>). The relevant record components are as follows.</p>
<dl>
<dt><strong class="Mark"><code class="code">description</code></strong></dt>
<dd><p>This must be a short string that describes for which kinds of files the functions in the current record are intended, which file formats are supported etc. The value is used as key in the user preference <code class="code">FileAccessFunctions</code>, see Section <a href="chap4.html#X81AD105979465162"><span class="RefLink">4.2-5</span></a>.</p>
</dd>
<dt><strong class="Mark">
<code class="code">location( </code><span class="SimpleMath">files, type</span><code class="code"> )</code>
</strong></dt>
<dd><p>Let <span class="SimpleMath">files</span> be a list of pairs <code class="code">[ dirname, filename ]</code>, and <span class="SimpleMath">type</span> be the data type (see <code class="func">AGR.DeclareDataType</code> (<a href="chap7.html#X836AA4EA8346BE5B"><span class="RefLink">7.5-1</span></a>)) to which the files belong. This function must return either the absolute paths where the mechanism implemented by the current record expects the local version of the given files, or <code class="keyw">fail</code> if this function does not feel responsible for these files.</p>
<p>The files are regarded as not locally available if all installed <code class="code">location</code> functions return either <code class="keyw">fail</code> or paths of nonexisting files, in the sense of <code class="func">IsExistingFile</code> (<a href="../../../doc/ref/chap9.html#X8269697A7B927AF1"><span class="RefLink">Reference: IsExistingFile</span></a>).</p>
</dd>
<dt><strong class="Mark">
<code class="code">fetch( </code><span class="SimpleMath">filepath, filename, dirname, type</span><code class="code"> )</code>
</strong></dt>
<dd><p>This function is called if a file is not locally available and if the <code class="code">location</code> function in the current record has returned a list of paths. The argument <span class="SimpleMath">type</span> must be the same as for the <code class="code">location</code> function, and <span class="SimpleMath">filepath</span> and <span class="SimpleMath">filename</span> must be strings (<em>not</em> lists of strings).</p>
<p>The return value must be <code class="keyw">true</code> if the function succeeded with making the file locally available (including postprocessing if applicable), a string with the contents of the data file if the remote data were directly loaded into the <strong class="pkg">GAP</strong> session (if no local caching is possible), and <code class="keyw">false</code> otherwise.</p>
</dd>
<dt><strong class="Mark"><code class="code">contents( </code><span class="SimpleMath">files, type, filepaths</span><code class="code"> )</code></strong></dt>
<dd><p>This function is called when the <code class="code">location</code> function in the current record has returned the path(s) <span class="SimpleMath">filepath</span>, and if either these are paths of existing files or the <code class="code">fetch</code> function in the current record has been called for these paths, and the return value was <code class="keyw">true</code>. The first three arguments must be the same as for the <code class="code">location</code> function.</p>
<p>The return value must be the contents of the file(s), in the sense that the <strong class="pkg">GAP</strong> matrix, matrix list, permutation, permutation list, or program described by the file(s) is returned. This means that besides reading the file(s) via the appropriate function, interpreting the contents may be necessary.</p>
</dd>
</dl>
<p>In <code class="func">AGR.FileContents</code> (<a href="chap7.html#X78AB92DB7C2CAB6E"><span class="RefLink">7.6-2</span></a>), those records in the <code class="code">accessFunctions</code> component of <code class="func">AtlasOfGroupRepresentationsInfo</code> (<a href="chap7.html#X7BEC94A6781E126E"><span class="RefLink">7.1-5</span></a>) are considered –in reversed order– whose <code class="code">description</code> component occurs in the user preference <code class="code">FileAccessFunctions</code>, see Section <a href="chap4.html#X81AD105979465162"><span class="RefLink">4.2-5</span></a>.</p>
<p><a id="X7D76D4437A9646E7" name="X7D76D4437A9646E7"></a></p>
<h4>7.3 <span class="Heading">Reading and Writing MeatAxe Format Files</span></h4>
<p><a id="X83D5103780E1238F" name="X83D5103780E1238F"></a></p>
<h5>7.3-1 ScanMeatAxeFile</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ScanMeatAxeFile</code>( <var class="Arg">filename</var>[, <var class="Arg">q</var>][, <var class="Arg">"string"</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the matrix or list of permutations stored in the file or encoded by the string.</p>
<p>Let <var class="Arg">filename</var> be the name of a <strong class="pkg">GAP</strong> readable file (see <a href="../../../doc/ref/chap9.html#X7E352E1F87060602"><span class="RefLink">Reference: Filename</span></a>) that contains a matrix or a permutation or a list of permutations in <strong class="pkg">MeatAxe</strong> text format (see the section about the program <code class="file">zcv</code> in the <code class="code">C</code>-<strong class="pkg">MeatAxe</strong> documentation <a href="chapBib.html#biBCMeatAxe">[Rin]</a>), and let <var class="Arg">q</var> be a prime power. <code class="func">ScanMeatAxeFile</code> returns the corresponding <strong class="pkg">GAP</strong> matrix or list of permutations, respectively.</p>
<p>If the file contains a matrix then the way how it is read by <code class="func">ScanMeatAxeFile</code> depends on the value of the user preference <code class="code">HowToReadMeatAxeTextFiles</code>, see Section <a href="chap4.html#X79993585808450FA"><span class="RefLink">4.2-7</span></a>.</p>
<p>If the parameter <var class="Arg">q</var> is given then the result matrix is represented over the field with <var class="Arg">q</var> elements, the default for <var class="Arg">q</var> is the field size stored in the file.</p>
<p>If the file contains a list of permutations then it is read with <code class="func">StringFile</code> (<a href="../../../pkg/gapdoc/doc/chap6.html#X7E14D32181FBC3C3"><span class="RefLink">GAPDoc: StringFile</span></a>); the parameter <var class="Arg">q</var>, if given, is ignored in this case.</p>
<p>If the string <code class="code">"string"</code> is entered as the third argument then the first argument must be a string as obtained by reading a file in <strong class="pkg">MeatAxe</strong> text format as a text stream (see <code class="func">InputTextFile</code> (<a href="../../../doc/ref/chap10.html#X8343D04981128784"><span class="RefLink">Reference: InputTextFile</span></a>)). Also in this case, <code class="func">ScanMeatAxeFile</code> returns the corresponding <strong class="pkg">GAP</strong> matrix or list of permutations, respectively.</p>
<p><a id="X7DDD09BE87063052" name="X7DDD09BE87063052"></a></p>
<h5>7.3-2 MeatAxeString</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MeatAxeString</code>( <var class="Arg">mat</var>, <var class="Arg">q</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MeatAxeString</code>( <var class="Arg">perms</var>, <var class="Arg">degree</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MeatAxeString</code>( <var class="Arg">perm</var>, <var class="Arg">q</var>, <var class="Arg">dims</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MeatAxeString</code>( <var class="Arg">intmat</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: a string encoding the <strong class="pkg">GAP</strong> objects given as input in <code class="code">C</code>-<strong class="pkg">MeatAxe</strong> text format, see <a href="chapBib.html#biBCMeatAxe">[Rin]</a>.</p>
<p>In the first form, for a matrix <var class="Arg">mat</var> whose entries lie in the finite field with <var class="Arg">q</var> elements, <code class="func">MeatAxeString</code> returns a string that encodes <var class="Arg">mat</var> as a matrix over <code class="code">GF(<var class="Arg">q</var>)</code>.</p>
<p>In the second form, for a nonempty list <var class="Arg">perms</var> of permutations that move only points up to the positive integer <var class="Arg">degree</var>, <code class="func">MeatAxeString</code> returns a string that encodes <var class="Arg">perms</var> as permutations of degree <var class="Arg">degree</var>.</p>
<p>In the third form, for a permutation <var class="Arg">perm</var> with largest moved point <span class="SimpleMath">n</span>, say, a prime power <var class="Arg">q</var>, and a list <var class="Arg">dims</var> of length two containing two positive integers larger than or equal to <span class="SimpleMath">n</span>, <code class="func">MeatAxeString</code> returns a string that encodes <var class="Arg">perm</var> as a matrix over <code class="code">GF(<var class="Arg">q</var>)</code>, of dimensions <var class="Arg">dims</var>, whose first <span class="SimpleMath">n</span> rows and columns describe the permutation matrix corresponding to <var class="Arg">perm</var>, and the remaining rows and columns are zero.</p>
<p>In the fourth form, for a matrix <var class="Arg">intmat</var> of integers, <code class="func">MeatAxeString</code> returns a string that encodes <var class="Arg">intmat</var> as an integer matrix.</p>
<p>When strings are printed to files using <code class="func">PrintTo</code> (<a href="../../../doc/ref/chap9.html#X86956C577FFEE1F9"><span class="RefLink">Reference: PrintTo</span></a>) or <code class="func">AppendTo</code> (<a href="../../../doc/ref/chap9.html#X86956C577FFEE1F9"><span class="RefLink">Reference: AppendTo</span></a>) then line breaks are inserted whenever lines exceed the number of characters given by the second entry of the list returned by <code class="func">SizeScreen</code> (<a href="../../../doc/ref/chap6.html#X8723E0A1837894F3"><span class="RefLink">Reference: SizeScreen</span></a>), see <a href="../../../doc/ref/chap10.html#X7F454EB286947C85"><span class="RefLink">Reference: Operations for Output Streams</span></a>. This behaviour is not desirable for creating data files. So the recommended functions for printing the result of <code class="func">MeatAxeString</code> to a file are <code class="func">FileString</code> (<a href="../../../pkg/gapdoc/doc/chap6.html#X7E14D32181FBC3C3"><span class="RefLink">GAPDoc: FileString</span></a>) and <code class="func">WriteAll</code> (<a href="../../../doc/ref/chap10.html#X78C113917936058D"><span class="RefLink">Reference: WriteAll</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">mat:= [ [ 1, -1 ], [ 0, 1 ] ] * Z(3)^0;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">str:= MeatAxeString( mat, 3 );</span>
"1 3 2 2\n12\n01\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">mat = ScanMeatAxeFile( str, "string" );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">str:= MeatAxeString( mat, 9 );</span>
"1 9 2 2\n12\n01\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">mat = ScanMeatAxeFile( str, "string" );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">perms:= [ (1,2,3)(5,6) ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">str:= MeatAxeString( perms, 6 );</span>
"12 1 6 1\n2\n3\n1\n4\n6\n5\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">perms = ScanMeatAxeFile( str, "string" );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">str:= MeatAxeString( perms, 8 );</span>
"12 1 8 1\n2\n3\n1\n4\n6\n5\n7\n8\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">perms = ScanMeatAxeFile( str, "string" );</span>
true
</pre></div>
<p>Note that the output of <code class="func">MeatAxeString</code> in the case of permutation matrices depends on the user preference <code class="code">WriteMeatAxeFilesOfMode2</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">perm:= (1,2,4);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">str:= MeatAxeString( perm, 3, [ 5, 6 ] );</span>
"2 3 5 6\n2\n4\n3\n1\n5\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">mat:= ScanMeatAxeFile( str, "string" );; Print( mat, "\n" );</span>
[ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ],
[ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">pref:= UserPreference( "AtlasRep", "WriteMeatAxeFilesOfMode2" );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference( "AtlasRep", "WriteMeatAxeFilesOfMode2", true );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">MeatAxeString( mat, 3 ) = str;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference( "AtlasRep", "WriteMeatAxeFilesOfMode2", false );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">MeatAxeString( mat, 3 );</span>
"1 3 5 6\n010000\n000100\n001000\n100000\n000010\n"
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference( "AtlasRep", "WriteMeatAxeFilesOfMode2", pref );</span>
</pre></div>
<p><a id="X79D9AE4878E9DFA6" name="X79D9AE4878E9DFA6"></a></p>
<h5>7.3-3 FFList</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FFList</code>( <var class="Arg">F</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a list of elements in the given finite field.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FFLists</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p><code class="func">FFList</code> is a utility program for the conversion of vectors and matrices from <strong class="pkg">MeatAxe</strong> format to <strong class="pkg">GAP</strong> format and vice versa. It is used by <code class="func">ScanMeatAxeFile</code> (<a href="chap7.html#X83D5103780E1238F"><span class="RefLink">7.3-1</span></a>) and <code class="func">MeatAxeString</code> (<a href="chap7.html#X7DDD09BE87063052"><span class="RefLink">7.3-2</span></a>).</p>
<p>For a finite field <var class="Arg">F</var>, <code class="func">FFList</code> returns a list <span class="SimpleMath">l</span> giving the correspondence between the <strong class="pkg">MeatAxe</strong> numbering and the <strong class="pkg">GAP</strong> numbering of the elements in <var class="Arg">F</var>.</p>
<p>The element of <var class="Arg">F</var> corresponding to <strong class="pkg">MeatAxe</strong> number <span class="SimpleMath">n</span> is <span class="SimpleMath">l[ n+1 ]</span>, and the <strong class="pkg">MeatAxe</strong> number of the field element <span class="SimpleMath">z</span> is <code class="code">Position( </code><span class="SimpleMath">l, z</span><code class="code"> ) - 1</code>.</p>
<p>The global variable <code class="func">FFLists</code> is used to store the information about <var class="Arg">F</var> once it has been computed.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FFList( GF(4) );</span>
[ 0*Z(2), Z(2)^0, Z(2^2), Z(2^2)^2 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IsBound( FFLists[4] );</span>
true
</pre></div>
<p>The <strong class="pkg">MeatAxe</strong> defines the bijection between the elements in the field with <span class="SimpleMath">q = p^d</span> elements and the set <span class="SimpleMath">{ 0, 1, ..., q-1 }</span> of integers by assigning the field element <span class="SimpleMath">∑_{i=0}^{d-1} c_i z^i</span> to the integer <span class="SimpleMath">∑_{i=0}^{d-1} c_i p^i</span>, where the <span class="SimpleMath">c_i</span> are in the set <span class="SimpleMath">{ 0, 1, ..., p-1 }</span> and <span class="SimpleMath">z</span> is the primitive root of the field with <span class="SimpleMath">q</span> elements that corresponds to the residue class of the indeterminate, modulo the ideal spanned by the Conway polynomial of degree <span class="SimpleMath">d</span> over the field with <span class="SimpleMath">p</span> elements.</p>
<p>The finite fields introduced by the <strong class="pkg">StandardFF</strong> package <a href="chapBib.html#biBStandardFF">[Lüb21]</a> are supported by <code class="func">FFList</code> and <code class="func">FFLists</code>, in the sense that the bijection defined by <code class="func">StandardIsomorphismGF</code> (<a href="../../../pkg/standardff/doc/chap2.html#X7ECCD8D27FBA9505"><span class="RefLink">StandardFF: StandardIsomorphismGF</span></a>) is applied automatically when <var class="Arg">F</var> is a field in the filter <code class="func">IsStandardFiniteField</code> (<a href="../../../pkg/standardff/doc/chap2.html#X7DD6C7C3867D84B8"><span class="RefLink">StandardFF: IsStandardFiniteField</span></a>).</p>
<p><a id="X8477AA668733255C" name="X8477AA668733255C"></a></p>
<h5>7.3-4 CMtxBinaryFFMatOrPerm</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CMtxBinaryFFMatOrPerm</code>( <var class="Arg">elm</var>, <var class="Arg">def</var>, <var class="Arg">outfile</var>[, <var class="Arg">base</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let the pair <span class="SimpleMath">(<var class="Arg">elm</var>, <var class="Arg">def</var>)</span> be either of the form <span class="SimpleMath">(M, q)</span> where <span class="SimpleMath">M</span> is a matrix over a finite field <span class="SimpleMath">F</span>, say, with <span class="SimpleMath">q ≤ 256</span> elements, or of the form <span class="SimpleMath">(π, n)</span> where <span class="SimpleMath">π</span> is a permutation with largest moved point at most <span class="SimpleMath">n</span>. Let <var class="Arg">outfile</var> be a string. <code class="func">CMtxBinaryFFMatOrPerm</code> writes the <code class="code">C</code>-<strong class="pkg">MeatAxe</strong> binary format of <span class="SimpleMath">M</span>, viewed as a matrix over <span class="SimpleMath">F</span>, or of <span class="SimpleMath">π</span>, viewed as a permutation on the points up to <span class="SimpleMath">n</span>, to the file with name <var class="Arg">outfile</var>.</p>
<p>In the case of a permutation <span class="SimpleMath">π</span>, the optional argument <var class="Arg">base</var> prescribes whether the binary file contains the points from <span class="SimpleMath">0</span> to <var class="Arg">deg</var><span class="SimpleMath">- 1</span> (<var class="Arg">base</var><span class="SimpleMath">= 0</span>, supported by version 2.4 of the <code class="code">C</code>-<strong class="pkg">MeatAxe</strong>) or the points from <span class="SimpleMath">1</span> to <var class="Arg">deg</var> (<var class="Arg">base</var><span class="SimpleMath">= 1</span>, supported by older versions of the <code class="code">C</code>-<strong class="pkg">MeatAxe</strong>). The default for <var class="Arg">base</var> is given by the value of the user preference <code class="code">BaseOfMeatAxePermutation</code>, see Section <a href="chap4.html#X877E40DB7A4E36C9"><span class="RefLink">4.2-10</span></a>.</p>
<p>(The binary format is described in the <code class="code">C</code>-<strong class="pkg">MeatAxe</strong> manual <a href="chapBib.html#biBCMeatAxe">[Rin]</a>.)</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">tmpdir:= DirectoryTemporary();;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">mat:= Filename( tmpdir, "mat" );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">q:= 4;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">mats:= GeneratorsOfGroup( GL(10,q) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CMtxBinaryFFMatOrPerm( mats[1], q, Concatenation( mat, "1" ) );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CMtxBinaryFFMatOrPerm( mats[2], q, Concatenation( mat, "2" ) );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">prm:= Filename( tmpdir, "prm" );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">n:= 200;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">perms:= GeneratorsOfGroup( SymmetricGroup( n ) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CMtxBinaryFFMatOrPerm( perms[1], n, Concatenation( prm, "1" ) );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CMtxBinaryFFMatOrPerm( perms[2], n, Concatenation( prm, "2" ) );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CMtxBinaryFFMatOrPerm( perms[1], n, Concatenation( prm, "1a" ), 0 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CMtxBinaryFFMatOrPerm( perms[2], n, Concatenation( prm, "2b" ), 1 );</span>
</pre></div>
<p><a id="X872FA00C7F791FBB" name="X872FA00C7F791FBB"></a></p>
<h5>7.3-5 FFMatOrPermCMtxBinary</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FFMatOrPermCMtxBinary</code>( <var class="Arg">fname</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the matrix or permutation stored in the file.</p>
<p>Let <var class="Arg">fname</var> be the name of a file that contains the <code class="code">C</code>-<strong class="pkg">MeatAxe</strong> binary format of a matrix over a finite field or of a permutation, as is described in <a href="chapBib.html#biBCMeatAxe">[Rin]</a>. <code class="func">FFMatOrPermCMtxBinary</code> returns the corresponding <strong class="pkg">GAP</strong> matrix or permutation.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FFMatOrPermCMtxBinary( Concatenation( mat, "1" ) ) = mats[1];</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">FFMatOrPermCMtxBinary( Concatenation( mat, "2" ) ) = mats[2];</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">FFMatOrPermCMtxBinary( Concatenation( prm, "1" ) ) = perms[1];</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">FFMatOrPermCMtxBinary( Concatenation( prm, "2" ) ) = perms[2];</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">FFMatOrPermCMtxBinary( Concatenation( prm, "1a" ) ) = perms[1];</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">FFMatOrPermCMtxBinary( Concatenation( prm, "2b" ) ) = perms[2];</span>
true
</pre></div>
<p><a id="X7FEE162B7F63BEA0" name="X7FEE162B7F63BEA0"></a></p>
<h4>7.4 <span class="Heading">Reading and Writing <strong class="pkg">ATLAS</strong> Straight Line Programs</span></h4>
<p><a id="X7D6617E47B013A37" name="X7D6617E47B013A37"></a></p>
<h5>7.4-1 ScanStraightLineProgram</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ScanStraightLineProgram</code>( <var class="Arg">filename</var>[, <var class="Arg">"string"</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a record containing the straight line program, or <code class="keyw">fail</code>.</p>
<p>Let <var class="Arg">filename</var> be the name of a file that contains a straight line program in the sense that it consists only of lines in the following form.</p>
<dl>
<dt><strong class="Mark"><code class="code">#</code><span class="SimpleMath">anything</span></strong></dt>
<dd><p>lines starting with a hash sign <code class="code">#</code> are ignored,</p>
</dd>
<dt><strong class="Mark"><code class="code">echo </code><span class="SimpleMath">anything</span></strong></dt>
<dd><p>lines starting with <code class="code">echo</code> are ignored for the <code class="code">program</code> component of the result record (see below), they are used to set up the bijection between the labels used in the program and conjugacy class names in the case that the program computes dedicated class representatives,</p>
</dd>
<dt><strong class="Mark"><code class="code">inp </code><span class="SimpleMath">n</span></strong></dt>
<dd><p>means that there are <span class="SimpleMath">n</span> inputs, referred to via the labels <code class="code">1</code>, <code class="code">2</code>, <span class="SimpleMath">...</span>, <span class="SimpleMath">n</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">inp </code><span class="SimpleMath">k</span> <span class="SimpleMath">a1</span> <span class="SimpleMath">a2</span> ... <span class="SimpleMath">ak</span></strong></dt>
<dd><p>means that the next <span class="SimpleMath">k</span> inputs are referred to via the labels <span class="SimpleMath">a1</span>, <span class="SimpleMath">a2</span>, ..., <span class="SimpleMath">ak</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">cjr </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span></strong></dt>
<dd><p>means that <span class="SimpleMath">a</span> is replaced by <span class="SimpleMath">b</span><code class="code">^(-1) * </code><span class="SimpleMath">a</span><code class="code"> * </code><span class="SimpleMath">b</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">cj </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span> <span class="SimpleMath">c</span></strong></dt>
<dd><p>means that <span class="SimpleMath">c</span> is defined as <span class="SimpleMath">b</span><code class="code">^(-1) * </code><span class="SimpleMath">a</span><code class="code"> * </code><span class="SimpleMath">b</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">com </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span> <span class="SimpleMath">c</span></strong></dt>
<dd><p>means that <span class="SimpleMath">c</span> is defined as <span class="SimpleMath">a</span><code class="code">^(-1) * </code><span class="SimpleMath">b</span>^(-1)<code class="code"> * </code><span class="SimpleMath">a</span><code class="code"> * </code><span class="SimpleMath">b</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">iv </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span></strong></dt>
<dd><p>means that <span class="SimpleMath">b</span> is defined as <span class="SimpleMath">a</span><code class="code">^(-1)</code>,</p>
</dd>
<dt><strong class="Mark"><code class="code">mu </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span> <span class="SimpleMath">c</span></strong></dt>
<dd><p>means that <span class="SimpleMath">c</span> is defined as <span class="SimpleMath">a</span><code class="code"> * </code><span class="SimpleMath">b</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">pwr </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span> <span class="SimpleMath">c</span></strong></dt>
<dd><p>means that <span class="SimpleMath">c</span> is defined as <span class="SimpleMath">b</span><code class="code">^</code><span class="SimpleMath">a</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">cp </code><span class="SimpleMath">a</span> <span class="SimpleMath">b</span></strong></dt>
<dd><p>means that <span class="SimpleMath">b</span> is defined as a copy of <span class="SimpleMath">a</span>,</p>
</dd>
<dt><strong class="Mark"><code class="code">oup </code><span class="SimpleMath">l</span></strong></dt>
<dd><p>means that there are <span class="SimpleMath">l</span> outputs, stored in the labels <code class="code">1</code>, <code class="code">2</code>, <span class="SimpleMath">...</span>, <span class="SimpleMath">l</span>, and</p>
</dd>
<dt><strong class="Mark"><code class="code">oup </code><span class="SimpleMath">l</span> <span class="SimpleMath">b1</span> <span class="SimpleMath">b2</span> ... <span class="SimpleMath">bl</span></strong></dt>
<dd><p>means that the next <span class="SimpleMath">l</span> outputs are stored in the labels <span class="SimpleMath">b1</span>, <span class="SimpleMath">b2</span>, ... <span class="SimpleMath">bl</span>.</p>
</dd>
</dl>
<p>Each of the labels <span class="SimpleMath">a</span>, <span class="SimpleMath">b</span>, <span class="SimpleMath">c</span> can be any nonempty sequence of digits and alphabet characters, except that the first argument of <code class="code">pwr</code> must denote an integer.</p>
<p>If the <code class="code">inp</code> or <code class="code">oup</code> statements are missing then the input or output, respectively, is assumed to be given by the labels <code class="code">1</code> and <code class="code">2</code>. There can be multiple <code class="code">inp</code> lines at the beginning of the program and multiple <code class="code">oup</code> lines at the end of the program. Only the first <code class="code">inp</code> or <code class="code">oup</code> line may omit the names of the elements. For example, an empty file <var class="Arg">filename</var> or an empty string <var class="Arg">string</var> represent a straight line program with two inputs that are returned as outputs.</p>
<p>No command except <code class="code">cjr</code> may overwrite its own input. For example, the line <code class="code">mu a b a</code> is not legal. (This is not checked.)</p>
<p><code class="func">ScanStraightLineProgram</code> returns a record containing as the value of its component <code class="code">program</code> the corresponding <strong class="pkg">GAP</strong> straight line program (see <code class="func">IsStraightLineProgram</code> (<a href="../../../doc/ref/chap37.html#X7F69FF3F7C6694CB"><span class="RefLink">Reference: IsStraightLineProgram</span></a>)) if the input string satisfies the syntax rules stated above, and returns <code class="keyw">fail</code> otherwise. In the latter case, information about the first corrupted line of the program is printed if the info level of <code class="func">InfoCMeatAxe</code> (<a href="chap7.html#X78601C3A87921E08"><span class="RefLink">7.1-2</span></a>) is at least <span class="SimpleMath">1</span>.</p>
<p>If the string <code class="code">"string"</code> is entered as the second argument then the first argument must be a string as obtained by reading a file in <strong class="pkg">MeatAxe</strong> text format as a text stream (see <code class="func">InputTextFile</code> (<a href="../../../doc/r | | |