Network Working Group A. Bhushan
Request for Comments: 578 N. Ryan
NIC: 19501 MIT-PTD (DMS)
October 1973
USING MIT-MATHLAB MACSYMA FROM MIT-DMS MUDDLE An Experiment in Automated Resource Sharing
I. INTRODUCTION
This paper describes an experiment in non-trivial automated resource sharing between dissimilar systems. The goal of the experiment was to interface the MUDDLE system at MIT-DMS (Host 70.) to the MACSYMA system at MIT-Mathlab (Host 198.), in such a manner that the MUDDLE- user at MIT-DMS is not required to know anything about the ARPANET, Mathlab, or even MACSYMA. In fact, the user need not be aware that part of the computation is performed by MACSYMA on the Mathlab computer.
Bhushan & Ryan [Page 1]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
The MUDDLE system provides a general-purpose environment suitable for automatic programming, graphics, data management, "networking", and mathematical computations. The MUDDLE language represents a powerful extension of the list processing language LISP in the area of data types such as strings, vectors, uniform vectors, and user definable types. (MUDDLE is described in some detail in "The MUDDLE Primer" (SYS.11.01) by Greg Pfister, available from the Programming Technology Division at Project MAC.)
Bhushan & Ryan [Page 2]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
1) Connecting to Mathlab, login, and invoking MACSYMA. 2) Conversion of MUDDLE's prefix to MACSYMA's infix form. 3) Generation of MACSYMA input. 4) Interpreting MACSYMA's results including errors and comments. 5) MACSYMA infix to MUDDLE prefix conversion. 6) Plotting graphs for the functions. 7) Allowing human intervention if desired. 8) Disconnect from MACSYMA.
Bhushan & Ryan [Page 3]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
<INTEGRATE {EXPR} ["{VAR}"]>
Bhushan & Ryan [Page 4]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
The program reliability can be marginally improved by asking MACSYMA to print special characters before and after the results it sends (but again this is not fool-proof). For example, the following input to MACSYMA:
Bhushan & Ryan [Page 5]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
to MUDDLE. The TELCOM feature may be useful if the user wishes to see what is going on, or wants to examine the MACSYMA computations by entering the LISP environment (typing <Control-G> to MACSYMA). To return to MUDDLE and the automated environment, the user first escapes to MUDDLE by typing <Control-E>, and then types:
V. EXAMPLE
The following scenario describes the use of the resource-sharing facility. The facility is accessible in the MUDDLE system at MIT- DMS. The interaction between MUDDLE and MACSYMA, normally not visible to the user, is also shown here (in VERBOSE mode) so that the reader may gain a better understanding of how the program operates. It should be noted that the graphs will be plotted only if the user has loaded the "graphics package" and is on an IMLAC or ARDS console. We would also like to stress that this scenario is not intended to demonstrate the full capabilities of MACSYMA, or of MUDDLE, but only to illustrate the resource sharing facility.
Bhushan & Ryan [Page 6]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
(In the following scenario, user input is underlined and our comments are preceded with a semicolon. <CR> represents a carriage return and $ represents <ESC> or alt-mode. The user is assumed to be logged in at MIT-DMS (Host 70). Note that the input should be typed exactly as shown, as MUDDLE distinguishes between upper and lower case characters. Please refer to "THE MUDDLE PRIMER" (SYS.11.01) by Greg Pfister for a description of the MUDDLE system and to "MUDDLE CONSOLE GRAPHICS USER GUIDE" (SYS.11.11) by Neal Ryan for a description of the graphics package. Both documents are available from the Programming Technology Division at Project MAC.)----------MUDDLE 42 IN OPERATION. LISTENING-AT-LEVEL 1 PROCESS 1 <FLOAD "MUDDLE;MACSYM">$ ; Load the program from MUDDLE ------------------------ ; directory. /METMUDGIN GOUT GIN GOUT ; Harmless comments from MUDDLE. "DONE" <DIFF '<- <* .X <LOG .X>> .X>>$ ------------------------------- PLEASE BE PATIENT, MACSYMA LOADING MAY TAKE TIME MACSYMA AT MIT-MATHLAB ; Comments from the program. <LOG .X> ; The result is a MUDDLE form. <INTEGRATE '<LOG .X>>$ ---------------------- SIN FASL DSK MACSYM BEING LOADED LOADING DONE ; Comments from MACSYMA. SCHATC FASL DSK MACSYM BEING LOADED LOADING DONE <- <* .X <LOG .X>> .X> ; The answer again. <SET A <INTEGRATE "X/(X^3+1)">>$; The input is in infix form. -------------------------------- "LOG(X^2-X+1)/6+ATAN((2*X-1)/SQRT(3))/SQRT(3)-LOG(X+1)/3"
Bhushan & Ryan [Page 7]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973 10. USERS:LOGIN 70GUEST ; The program uses User's SNAME (GUEST here). :MACSYMA THIS IS MACSYMA 226 SEE UPDATE > MACSYM; FOR CHANGES FIX 226 DSK MACSYM BEING LOADED LOADING DONE (C1) MACSYMA AT MIT-MATHLAB ; The program announces MACSYMA,
Bhushan & Ryan [Page 8]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
"DONE" <GRAPH <SLT A '<^ <SIN .X> 2>> X -3 3>$ ---------------------------------------
Bhushan & Ryan [Page 9]
RFC 578 Using MIT-MATHLAB MACSYMA from MIT-DMS MUDDLE October 1973
FIG 1. GRAPH FOR SIN(X)^2, DIFF(SIN(X)^2), AND INTEGRATE(SIN(X)^2)
--+--2.0
|
|
| +++ (3)
| ++++ | ++ | + | ++
o *o * | o *o + *
o * * | o * + *
o * o * | o * o *
* o * | * + o *
+++ |
|
|
--+-- -2.0
[ This RFC was put into machine readable form for entry ]