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: 4183461[1X1 [33X[0;0YPreface[133X[101X23[33X[0;0YThe [5XGAP[105X package [5XSCSCP[105X implements the Symbolic Computation Software4Composability protocol [FHK+b]. This protocol specifies an [5XOpenMath[105X-based5remote procedure call framework, in which all messages (procedure calls and6returns of results of successful computation or error messages) are encoded7in [5XOpenMath[105X using content dictionaries [5Xscscp1[105X and [5Xscscp2[105X ([FHK+a], [FHK+c]).8Using the [5XSCSCP[105X package, [5XGAP[105X can communicate locally or remotely with any9other [5XOpenMath[105X-enabled [5XSCSCP[105X-compliant application which may be not only10another computer algebra system but also another instance of the [5XGAP[105X system11or even, for example, an external Java or C/C++ application via libraries12[7Xhttp://java.symcomp.org/[107X or [7Xhttp://www.imcce.fr/Equipes/ASD/trip/scscp/[107X13providing an [5XSCSCP[105X API. Such communication will go into seamless manner for14the [5XGAP[105X user, since all conversions from [5XGAP[105X to [5XOpenMath[105X and vice versa will15be performed in the background. See the SCIEnce project homepage16[7Xhttp://www.symbolic-computing.org/[107X for the details about computer algebra17systems and other sotware supporting [5XSCSCP[105X[133X1819[33X[0;0YThe [5XSCSCP[105X package for [5XGAP[105X has two main components:[133X2021[30X [33X[0;6YSCSCP server;[133X2223[30X [33X[0;6YSCSCP client.[133X2425[33X[0;0YThere are several ways to start [5XGAP[105X [5XSCSCP[105X server:[133X2627[30X [33X[0;6Ycall [2XRunSCSCPserver[102X ([14X5.2-1[114X) from the [5XGAP[105X session specifying the server28name and the port number from the [5XGAP[105X session;[133X2930[30X [33X[0;6Ystart [5XGAP[105X as [10Xgap myserver.g[110X, where [11Xmyserver.g[111X is the server31configuration file with the last command being the call of32[2XRunSCSCPserver[102X ([14X5.2-1[114X) (an example of such configuration file is given33in [11Xscscp/example/myserver.g[111X );[133X3435[30X [33X[0;6Ystart [5XGAP[105X as a daemon using the script [11Xgapd.sh[111X which is supplied in36the root directory of the package (for the description of all37available options see comments in [11Xgapd.sh[111X).[133X3839[33X[0;0YDuring startup the server installs all procedures that it will provide and40loads their lookup mechanisms, and then begins to listen to the specified41port. The recommended port number is 26133 which has been assigned to SCSCP42by the Internet Assigned Numbers Authority (IANA) in November 2007, see43[7Xhttp://www.iana.org/assignments/port-numbers[107X.[133X4445[33X[0;0YWhen the server accepts a connection from client, it starts the46"accept-evaluate-return" loop:[133X4748[30X [33X[0;6Yaccepts the [10X"procedure_call";[110X message;[133X4950[30X [33X[0;6Yperforms lookup of the appropriate GAP function;[133X5152[30X [33X[0;6Yevaluates the result (or produces a side-effect);[133X5354[30X [33X[0;6Yreturns the result in the [10X"procedure_completed"[110X message or returns an55error in the [10X"procedure_terminated"[110X message.[133X5657[33X[0;0YThe server works in a "multi-user" mode. When one client is connected, the58server is busy for other clients. As soon as the computation is finished and59the client is disconnected, the server is waiting for the next connection,60and normally it never stops until it will be terminated by the service61provider. The server maintain a queue of five incoming connections (this62parameter can be easily modified), and on each iteration evaluates the next63request from the queue.[133X6465[33X[0;0YThere is an [5XSCSCP[105X server accessible at [11Xscscp.gap-system.org[111X, port 26133. It66is running under development versions of the [5XGAP[105X system and a selection of67currently distributed packages. The reader is encouraged to try to use68examples from the manual to access this service, replacing [11X"localhost"[111X by69its address, where appropriate. Please report to Alexander Konovalov if you70will discover any bugs or if the server seems not available.[133X7172[33X[0;0YThe SCSCP client:[133X7374[30X [33X[0;6Yestablishes connection with the specified server at the specified75port;[133X7677[30X [33X[0;6Ysends the [10X"procedure_call"[110X message to the server;[133X7879[30X [33X[0;6Ywaits for the result of the computation or returns to pick it up80later;[133X8182[30X [33X[0;6Yfetches the response, extracting the result from the83[10X"procedure_completed"[110X message or entering the break loop in the case84of the [10X"procedure_terminated"[110X message.[133X8586[33X[0;0YOn the top of this functionality we built a set of instructions for simple87parallel computations framework using the [5XSCSCP[105X protocol, which allows to88send several procedure calls in parallel and then collect all results or89pick up the first available result, and implements the master-worker90skeleton. These tools are presented in the Chapter [14X8[114X.[133X9192[33X[0;0YThe package also implements a new kind of [5XGAP[105X input-output streams, namely93input-output TCP streams (see Chapter [14X3[114X), based on the functionality for94TCP/IP protocol usage provided by the [5XGAP[105X package [5XIO[105X. Such streams may95constitute an independent interest for adapting streams-using [5XGAP[105X code to96use streams across the network.[133X9798[33X[0;0YFinally, the manual describes how the communication by [5XSCSCP[105X goes between99several instances of the [5XGAP[105X system, but the same behaviour is expected from100any [5XSCSCP[105X-compliant application: the set of supported [5XOpenMath[105X symbols101clearly will be different, but the rules of communication are precisely102specified in the [5XSCSCP[105X specification [FHK+b]. See the homepage of the103SCIEnce project [7Xhttp://www.symbolic-computing.org/[107X for the information about104[5XSCSCP[105X-compliant computer algebra systems and other tools developed in the105project.[133X106107108109