CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
Development notes file:
2
* started by Marco Costantini
3
* updated by Alexander Konovalov
4
5
This file contains notes for development and for releasing a new version;
6
it is not intended to be a part of the release.
7
8
###########################################################################
9
10
MAKING A CHANGE:
11
12
* update the local GAP.dev installation
13
14
* build the manual and manual test files with
15
16
ReadPackage("openmath/gap/buildman.g");
17
18
* test the package functionality:
19
20
Read( Filename( DirectoriesPackageLibrary( "openmath", "tst" ), "testall.g" ) );
21
22
* do the changes.
23
24
* check that new features or bug fixes are included in the test file,
25
and, if test file is modified, test the package functionality.
26
27
cd /usr/local/gap_dev/4.0/pkg/openmath/tst
28
nano test_new.src
29
mv test_new test_new.bak
30
gap -T -r -A -b < test_new.src
31
nano +30000 test_new
32
33
(to remove lines after STOP_TEST)
34
35
diff test_new test_new.bak
36
rm test_new.bak
37
38
Read( Filename( DirectoriesPackageLibrary( "openmath", "tst" ), "testall.g" ) );
39
40
* check that the README files and the manual contain the changes.
41
* commit the various changes to the CVS repository.
42
43
###########################################################################
44
45
PREPARING A NEW RELEASE:
46
47
* check the functionality
48
49
* modify date and version number in PackageInfo.g
50
and in the example of a banner in doc/intro.xml
51
52
* build the manual and manual test files with
53
54
ReadPackage("openmath/gap/buildman.g");
55
56
* test the PackageInfo.g, and that the documentation is available in GAP:
57
58
ValidatePackageInfo( Filename( DirectoriesPackageLibrary( "openmath", "" ), "PackageInfo.g" ) );
59
?OMPrint
60
61
* commit PackageInfo.g and doc/intro.xml
62
63
* check file permissions, doing chmod 755 for directories and chmod 644
64
for files when necessary
65
66
* edit variables in the "publish" script and then call it to wrap an archive
67
68
* update the web-page: modify version and links.
69
70
* Send a mail about the new release to the GAP Support to include it in the
71
next update of the packages archive
72
73
* check that the new version is uploaded on the Gap site.
74
75
* advertise the new version
76
77
78
######################################################################
79
80
ENCODING AND CONVERSIONS
81
82
OpenMath objects can be encoded into various formats, as defined by the
83
OpenMath standard:
84
- XML OpenMath
85
- binary OpenMath
86
87
Conversion from OpenMath to Gap:
88
89
* 'OMgetObjectXMLTree' converts the OpenMath XML into a tree (using the
90
function ParseTreeXMLString from package GapDoc) and parses it.
91
92
Conversion from Gap to OpenMath:
93
94
OMPutObject takes a Gap object and puts into a stream, with XML or binary
95
encoding.
96
97
######################################################################
98
99
100
VALIDATING XML:
101
102
103
The following function can be used to validate the OpenMath XML objects
104
produced by the package. It requires the program 'xmllint', from
105
Libxml2, the XML C library for Gnome, available from
106
http://www.xmlsoft.org/ and included in most modern Linux distributions.
107
108
109
OMValidate := function ( obj )
110
111
local file, fromgap_stream, togap_stream, togap, xmllint_exec, openmath2_rng, OMPutObject;
112
113
OMPutObject := function ( stream, x )
114
OMIndent := 0;
115
OMWriteLine( stream, [ "<OMOBJ xmlns=\"http://www.openmath.org/OpenMath\">" ] );
116
OMIndent := OMIndent + 1;
117
OMPut( stream, x );
118
OMIndent := OMIndent - 1;
119
OMWriteLine( stream, [ "</OMOBJ>" ] );
120
return;
121
end;
122
123
file := Filename( OMDirectoryTemporary, "testfile" );
124
fromgap_stream := OutputTextFile( file, false );
125
SetPrintFormattingStatus( fromgap_stream, false );
126
OMPutObject( fromgap_stream, obj );
127
CloseStream( fromgap_stream );
128
129
xmllint_exec := Filename( DirectoriesSystemPrograms( ), "xmllint" );
130
openmath2_rng := Filename( DirectoriesPackageLibrary( "openmath", "tst" ), "openmath2.rng" );
131
132
togap := "";
133
togap_stream := OutputTextString( togap, false );
134
SetPrintFormattingStatus( togap_stream, false );
135
Process( OMDirectoryTemporary, xmllint_exec, InputTextNone(), togap_stream,
136
[ "--noout", "--relaxng", openmath2_rng, "testfile" ] );
137
CloseStream( togap_stream );
138
139
if togap <> "testfile validates\n" and togap <> "testfile fails to validate\n" then
140
Print( togap );
141
fi;
142
143
return togap = "testfile validates\n";
144
end;
145
146
147
The XML produced by this package can be partially validated with http://validator.w3.org
148
149
Just prepend the following line to a file generated by this package,
150
151
<?xml version="1.0" encoding="iso-8859-1"?>
152
153
and one of the following, for OpenMath version 2.0, 1.1, 1.0 respectively.
154
155
<!DOCTYPE OMOBJ SYSTEM "http://www.openmath.org/standard/om20-2004-06-30/openmath2.dtd">
156
<!DOCTYPE OMOBJ SYSTEM "http://www.openmath.org/standard/om11/omobj.dtd">
157
<!DOCTYPE OMOBJ SYSTEM "http://www.openmath.org/standard/relaxng/openmath1.dtd">
158
159
160
161
######################################################################
162
163
KNOWN PROBLEMS:
164
These problems are from the original code by Andrew Solomon.
165
166
* A set doesn't store to be a set, hence the method ``OMPut: for a set''
167
is used only for the empty set.
168
169
IsSet([ 1, true, false ]);
170
OMPrint([ 1, true, false ]);
171
OMPrint([ ]);
172
173
174
* Conversion of CharacterTable doesn't work.
175
176
OMTest(CharacterTable( AlternatingGroup( [ 1 .. 3 ] ) ));
177
178
179
* Consecutive comments <!-- ... --> or encodings <? ... ?> inside an
180
input stream are not supported.
181
182
stream := InputTextUser(); g := OMGetObject(stream);CloseStream(stream);
183
184
<!-- ... -->
185
<? .
186
187
* OMPut: for a Hasse diagram creates OpenMath variables like <OMV name="1"/>
188
which are invalid OpenMath variables names.
189
190
######################################################################
191
192
TODO:
193
194
* Include experimental, or updated CDs
195
http://www.openmath.org/cdnames.html
196
197
- For converting Gap -> OpenMath, add a method for 'OMPut', in file
198
gap/omput.gi .
199
200
- For converting OpenMath -> Gap, add in 'OMsymTable_new', in file
201
gap/new.g .
202
203
- For converting a nullary symbol OpenMath -> Gap, add code in
204
'OMnullarySymbolToGAP', in file gap/gap.g . (Remark: OMnullarySymbolToGAP
205
removed by AK in April 2009, now all is done by OMsymLookup function).
206
207
- For a conversion in Yacas, use there OMDef(yacasSymbol, cd, name)
208
209
210
######################################################################
211
212
TODO:
213
214
* Convert OMsymTable and related stuff from list to record
215
(Remark: done by AK in April 2009 with renaming to OMsymRecord).
216
217
* Remove the difference between nullary and n-ary symbols, and use the
218
OpenMath roles instead, see the OpenMath Standard, version 2.0, section
219
"2.1.4 OpenMath Symbol Roles". (Remark: OMnullarySymbolToGAP
220
removed by AK in April 2009, now all is done by OMsymLookup function).
221
222
######################################################################
223
224
TODO:
225
226
* In function OMgapNativeStatementFunc, of gap/gap.g, is it necessary to
227
use READ_COMMAND (instead e.g. of Read) ?
228
229
Is it necessary to use ViewString ?
230
231
Would it be possible to remove ViewString, or to use StringView from the
232
GapDoc package, and to remove the file gap/printutil.g?
233
234
The only purpose of gap/printutil.g is to provide ViewString to
235
OMgapNativeStatementFunc.
236
237
######################################################################
238
239
TODO:
240
241
Check the functions OMnextToken and OMinstreamNextByte: they do the same.
242
243
Some IsHasseDiagram stuff is already defined in main Gap library
244
lib/relation.gd:
245
246
#P IsHasseDiagram(<rel>)
247
##
248
## returns `true' if the binary relation <rel> is a Hasse Diagram of a
249
## partial order, i.e. was computed via `HasseDiagramBinaryRelation'
250
## (see~"HasseDiagramBinaryRelation").
251
##
252
DeclareProperty("IsHasseDiagram", IsBinaryRelation);
253
254
Something from hasse/hasse.g could be removed.
255
256
######################################################################
257
258
TODO:
259
260
* cleanup in the cds directory.
261
* fill placeholders in OMsymRecord with more symbols where appropriate
262
* test and move entries from OMsymRecord_new in new.g to gap.g
263
* implement more private CDs from the SCIEnce project
264
265
######################################################################
266
267
HISTORICAL NOTES:
268
269
Some historical notes from previous releases are collected below.
270
271
######################################################################
272
273
Readme of the last release containing INRIA library:
274
275
The OpenMath Package
276
--------------------
277
278
The package provides an OpenMath phrasebook for GAP: it allows GAP
279
users to import and export mathematical objects encoded in OpenMath,
280
for the purpose of exchanging them with other OpenMath-enabled
281
applications.
282
283
Copyright:
284
==========
285
286
The OpenMath package is free software; you can redistribute it and/or
287
modify it under the terms of the GNU General Public License as published
288
by the Free Software Foundation; either version 2 of the License, or
289
(at your option) any later version. For details, see the FSF's own site
290
http://www.gnu.org/licenses/gpl.html.
291
292
Additionally, it contains code developed at INRIA (copyright INRIA),
293
under the ESPRIT project number 24969 (OpenMath). The user may not use
294
the library in commercial products without seeking permission from the
295
GAP group ([email protected]) and the CAFE team at INRIA SA
296
([email protected]).
297
298
Installation:
299
=============
300
301
This package is installed as a normal Gap package: see Gap reference
302
manual, chapter "74 GAP Packages" (and if you don't have write access to
303
the Gap installation see also section "9.2 GAP Root Directory"), for
304
details.
305
306
The binaries should be compiled in two stages:
307
- compilation of the OpenMath C library from INRIA
308
- compilation of the 'gpipe' program
309
310
To do this, change to the package directory gap4r4/pkg/openmath
311
and perform the following commands:
312
313
cd OMCv1.3c/src/
314
./configure
315
make
316
cd ../../
317
./configure ../../
318
make
319
320
321
The part in C language compiles and runs also on Windows with Cygwin
322
(see http://www.cygwin.com/).
323
A Windows user may also try to get a precompiled OMC binary from
324
ftp://ftp-sop.inria.fr/safir/OM (I didn't try), and thereafter
325
326
cd pkg/openmath
327
328
./configure ../../
329
make
330
331
Some historical notes from previous releases and changelogs
332
are collected below.
333
334
To contact developers, please write to:
335
alexk at mcs dot st-andrews dot ac dot uk
336
337
338
Alexander Konovalov
339
340
April 2009
341
342
343
##############################################################################
344
345
* * * Readme of the first release of the package (2000) * * *
346
347
The compilation is non-standard! See below.
348
349
This package has been developed to allow GAP users to
350
import and export mathematical objects encoded in OpenMath,
351
for the purpose of exchanging them with other applications that
352
are OpenMath enabled.
353
354
355
1. Copyright
356
357
This package is distributed under GPL license and the terms of the GAP
358
copyright. Additionally, it contains code developed at INRIA
359
(copyright INRIA), under the ESPRIT project number 24969 (OpenMath).
360
The user may not use the library in commercial products without seeking
361
permission from the GAP group ([email protected]) and the
362
CAFE team at INRIA SA ([email protected]).
363
364
It may be redistributed ``as is'' together with this notice.
365
366
367
2. Technicalities and installation
368
369
This package includes a C program, and works with full functionality
370
only if this program has been compiled.
371
372
To install this package (after extracting the packages archive
373
file to the GAP pkg directory):
374
375
a) go to the directory `pkg/openmath/OMCv1.3c/src' and call
376
377
/bin/sh ./configure
378
379
and then call `make' to compile the INRIA library (producing libOM.a).
380
381
382
b) go to the directory `pkg/openmath' (the
383
directory containing this README file) and call
384
385
/bin/sh ./configure <path>
386
387
where <path> is a path to the main GAP root directory (so normally you would
388
call /bin/sh ./configure ../..).
389
390
afterwards call `make' to compile the binary. See file examples for usage examples.
391
392
c) you also need to modify the file hasse/config.g
393
to make the Hasse diagram stuff work.
394
395
396
3. The INRIA library
397
398
The files in the directory `openmath/OMCv1.3c' are the OpenMath C library
399
version 1.3c developed by the CAFE group at INRIA SA. For the latest
400
version, contact: [email protected] , or try
401
ftp://ftp-sop.inria.fr/safir/OM .
402
403
404
Andrew Solomon ([email protected]),
405
Department of Computer Science,
406
University of St. Andrews.
407
408
9 March 2000.
409
410
##############################################################################
411
412
413
414