Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 418346Development notes file:1* started by Marco Costantini2* updated by Alexander Konovalov34This file contains notes for development and for releasing a new version;5it is not intended to be a part of the release.67###########################################################################89MAKING A CHANGE:1011* update the local GAP.dev installation1213* build the manual and manual test files with1415ReadPackage("openmath/gap/buildman.g");1617* test the package functionality:1819Read( Filename( DirectoriesPackageLibrary( "openmath", "tst" ), "testall.g" ) );2021* do the changes.2223* check that new features or bug fixes are included in the test file,24and, if test file is modified, test the package functionality.2526cd /usr/local/gap_dev/4.0/pkg/openmath/tst27nano test_new.src28mv test_new test_new.bak29gap -T -r -A -b < test_new.src30nano +30000 test_new3132(to remove lines after STOP_TEST)3334diff test_new test_new.bak35rm test_new.bak3637Read( Filename( DirectoriesPackageLibrary( "openmath", "tst" ), "testall.g" ) );3839* check that the README files and the manual contain the changes.40* commit the various changes to the CVS repository.4142###########################################################################4344PREPARING A NEW RELEASE:4546* check the functionality4748* modify date and version number in PackageInfo.g49and in the example of a banner in doc/intro.xml5051* build the manual and manual test files with5253ReadPackage("openmath/gap/buildman.g");5455* test the PackageInfo.g, and that the documentation is available in GAP:5657ValidatePackageInfo( Filename( DirectoriesPackageLibrary( "openmath", "" ), "PackageInfo.g" ) );58?OMPrint5960* commit PackageInfo.g and doc/intro.xml6162* check file permissions, doing chmod 755 for directories and chmod 64463for files when necessary6465* edit variables in the "publish" script and then call it to wrap an archive6667* update the web-page: modify version and links.6869* Send a mail about the new release to the GAP Support to include it in the70next update of the packages archive7172* check that the new version is uploaded on the Gap site.7374* advertise the new version757677######################################################################7879ENCODING AND CONVERSIONS8081OpenMath objects can be encoded into various formats, as defined by the82OpenMath standard:83- XML OpenMath84- binary OpenMath8586Conversion from OpenMath to Gap:8788* 'OMgetObjectXMLTree' converts the OpenMath XML into a tree (using the89function ParseTreeXMLString from package GapDoc) and parses it.9091Conversion from Gap to OpenMath:9293OMPutObject takes a Gap object and puts into a stream, with XML or binary94encoding.9596######################################################################979899VALIDATING XML:100101102The following function can be used to validate the OpenMath XML objects103produced by the package. It requires the program 'xmllint', from104Libxml2, the XML C library for Gnome, available from105http://www.xmlsoft.org/ and included in most modern Linux distributions.106107108OMValidate := function ( obj )109110local file, fromgap_stream, togap_stream, togap, xmllint_exec, openmath2_rng, OMPutObject;111112OMPutObject := function ( stream, x )113OMIndent := 0;114OMWriteLine( stream, [ "<OMOBJ xmlns=\"http://www.openmath.org/OpenMath\">" ] );115OMIndent := OMIndent + 1;116OMPut( stream, x );117OMIndent := OMIndent - 1;118OMWriteLine( stream, [ "</OMOBJ>" ] );119return;120end;121122file := Filename( OMDirectoryTemporary, "testfile" );123fromgap_stream := OutputTextFile( file, false );124SetPrintFormattingStatus( fromgap_stream, false );125OMPutObject( fromgap_stream, obj );126CloseStream( fromgap_stream );127128xmllint_exec := Filename( DirectoriesSystemPrograms( ), "xmllint" );129openmath2_rng := Filename( DirectoriesPackageLibrary( "openmath", "tst" ), "openmath2.rng" );130131togap := "";132togap_stream := OutputTextString( togap, false );133SetPrintFormattingStatus( togap_stream, false );134Process( OMDirectoryTemporary, xmllint_exec, InputTextNone(), togap_stream,135[ "--noout", "--relaxng", openmath2_rng, "testfile" ] );136CloseStream( togap_stream );137138if togap <> "testfile validates\n" and togap <> "testfile fails to validate\n" then139Print( togap );140fi;141142return togap = "testfile validates\n";143end;144145146The XML produced by this package can be partially validated with http://validator.w3.org147148Just prepend the following line to a file generated by this package,149150<?xml version="1.0" encoding="iso-8859-1"?>151152and one of the following, for OpenMath version 2.0, 1.1, 1.0 respectively.153154<!DOCTYPE OMOBJ SYSTEM "http://www.openmath.org/standard/om20-2004-06-30/openmath2.dtd">155<!DOCTYPE OMOBJ SYSTEM "http://www.openmath.org/standard/om11/omobj.dtd">156<!DOCTYPE OMOBJ SYSTEM "http://www.openmath.org/standard/relaxng/openmath1.dtd">157158159160######################################################################161162KNOWN PROBLEMS:163These problems are from the original code by Andrew Solomon.164165* A set doesn't store to be a set, hence the method ``OMPut: for a set''166is used only for the empty set.167168IsSet([ 1, true, false ]);169OMPrint([ 1, true, false ]);170OMPrint([ ]);171172173* Conversion of CharacterTable doesn't work.174175OMTest(CharacterTable( AlternatingGroup( [ 1 .. 3 ] ) ));176177178* Consecutive comments <!-- ... --> or encodings <? ... ?> inside an179input stream are not supported.180181stream := InputTextUser(); g := OMGetObject(stream);CloseStream(stream);182183<!-- ... -->184<? .185186* OMPut: for a Hasse diagram creates OpenMath variables like <OMV name="1"/>187which are invalid OpenMath variables names.188189######################################################################190191TODO:192193* Include experimental, or updated CDs194http://www.openmath.org/cdnames.html195196- For converting Gap -> OpenMath, add a method for 'OMPut', in file197gap/omput.gi .198199- For converting OpenMath -> Gap, add in 'OMsymTable_new', in file200gap/new.g .201202- For converting a nullary symbol OpenMath -> Gap, add code in203'OMnullarySymbolToGAP', in file gap/gap.g . (Remark: OMnullarySymbolToGAP204removed by AK in April 2009, now all is done by OMsymLookup function).205206- For a conversion in Yacas, use there OMDef(yacasSymbol, cd, name)207208209######################################################################210211TODO:212213* Convert OMsymTable and related stuff from list to record214(Remark: done by AK in April 2009 with renaming to OMsymRecord).215216* Remove the difference between nullary and n-ary symbols, and use the217OpenMath roles instead, see the OpenMath Standard, version 2.0, section218"2.1.4 OpenMath Symbol Roles". (Remark: OMnullarySymbolToGAP219removed by AK in April 2009, now all is done by OMsymLookup function).220221######################################################################222223TODO:224225* In function OMgapNativeStatementFunc, of gap/gap.g, is it necessary to226use READ_COMMAND (instead e.g. of Read) ?227228Is it necessary to use ViewString ?229230Would it be possible to remove ViewString, or to use StringView from the231GapDoc package, and to remove the file gap/printutil.g?232233The only purpose of gap/printutil.g is to provide ViewString to234OMgapNativeStatementFunc.235236######################################################################237238TODO:239240Check the functions OMnextToken and OMinstreamNextByte: they do the same.241242Some IsHasseDiagram stuff is already defined in main Gap library243lib/relation.gd:244245#P IsHasseDiagram(<rel>)246##247## returns `true' if the binary relation <rel> is a Hasse Diagram of a248## partial order, i.e. was computed via `HasseDiagramBinaryRelation'249## (see~"HasseDiagramBinaryRelation").250##251DeclareProperty("IsHasseDiagram", IsBinaryRelation);252253Something from hasse/hasse.g could be removed.254255######################################################################256257TODO:258259* cleanup in the cds directory.260* fill placeholders in OMsymRecord with more symbols where appropriate261* test and move entries from OMsymRecord_new in new.g to gap.g262* implement more private CDs from the SCIEnce project263264######################################################################265266HISTORICAL NOTES:267268Some historical notes from previous releases are collected below.269270######################################################################271272Readme of the last release containing INRIA library:273274The OpenMath Package275--------------------276277The package provides an OpenMath phrasebook for GAP: it allows GAP278users to import and export mathematical objects encoded in OpenMath,279for the purpose of exchanging them with other OpenMath-enabled280applications.281282Copyright:283==========284285The OpenMath package is free software; you can redistribute it and/or286modify it under the terms of the GNU General Public License as published287by the Free Software Foundation; either version 2 of the License, or288(at your option) any later version. For details, see the FSF's own site289http://www.gnu.org/licenses/gpl.html.290291Additionally, it contains code developed at INRIA (copyright INRIA),292under the ESPRIT project number 24969 (OpenMath). The user may not use293the library in commercial products without seeking permission from the294GAP group ([email protected]) and the CAFE team at INRIA SA295([email protected]).296297Installation:298=============299300This package is installed as a normal Gap package: see Gap reference301manual, chapter "74 GAP Packages" (and if you don't have write access to302the Gap installation see also section "9.2 GAP Root Directory"), for303details.304305The binaries should be compiled in two stages:306- compilation of the OpenMath C library from INRIA307- compilation of the 'gpipe' program308309To do this, change to the package directory gap4r4/pkg/openmath310and perform the following commands:311312cd OMCv1.3c/src/313./configure314make315cd ../../316./configure ../../317make318319320The part in C language compiles and runs also on Windows with Cygwin321(see http://www.cygwin.com/).322A Windows user may also try to get a precompiled OMC binary from323ftp://ftp-sop.inria.fr/safir/OM (I didn't try), and thereafter324325cd pkg/openmath326327./configure ../../328make329330Some historical notes from previous releases and changelogs331are collected below.332333To contact developers, please write to:334alexk at mcs dot st-andrews dot ac dot uk335336337Alexander Konovalov338339April 2009340341342##############################################################################343344* * * Readme of the first release of the package (2000) * * *345346The compilation is non-standard! See below.347348This package has been developed to allow GAP users to349import and export mathematical objects encoded in OpenMath,350for the purpose of exchanging them with other applications that351are OpenMath enabled.3523533541. Copyright355356This package is distributed under GPL license and the terms of the GAP357copyright. Additionally, it contains code developed at INRIA358(copyright INRIA), under the ESPRIT project number 24969 (OpenMath).359The user may not use the library in commercial products without seeking360permission from the GAP group ([email protected]) and the361CAFE team at INRIA SA ([email protected]).362363It may be redistributed ``as is'' together with this notice.3643653662. Technicalities and installation367368This package includes a C program, and works with full functionality369only if this program has been compiled.370371To install this package (after extracting the packages archive372file to the GAP pkg directory):373374a) go to the directory `pkg/openmath/OMCv1.3c/src' and call375376/bin/sh ./configure377378and then call `make' to compile the INRIA library (producing libOM.a).379380381b) go to the directory `pkg/openmath' (the382directory containing this README file) and call383384/bin/sh ./configure <path>385386where <path> is a path to the main GAP root directory (so normally you would387call /bin/sh ./configure ../..).388389afterwards call `make' to compile the binary. See file examples for usage examples.390391c) you also need to modify the file hasse/config.g392to make the Hasse diagram stuff work.3933943953. The INRIA library396397The files in the directory `openmath/OMCv1.3c' are the OpenMath C library398version 1.3c developed by the CAFE group at INRIA SA. For the latest399version, contact: [email protected] , or try400ftp://ftp-sop.inria.fr/safir/OM .401402403Andrew Solomon ([email protected]),404Department of Computer Science,405University of St. Andrews.4064079 March 2000.408409##############################################################################410411412413414