Skip to main content

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.

           SCENARIO FOR USING THE MUDDLE-MACSYMA FACILITY

(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<CR>                   ; Get a MUDDLE, ';' is MONIT prompt.
   ----------
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"
                                ; The answer now is in infix form.
<SET B <DIFF .A>>$
------------------
"2/(3*((2*X-1)^2/3+1))+(2*X-1)/(6*(X^2-X+1))-1/(3*(X+1))"
<SIMPLIFY .B>$
--------------
"X/(X^3+1)"                     ; We get back the original expression.
<EXPAND '<^ <+ .X 2> 5>>$
-------------------------
<+ <+ <+ <+ <+ <^ .X 5> <* 10 <^ .X 4>>> <* 40 <^ .X 3>>>
<* 80 <^ .X 2>>> <* 80 .X>> 32>
<INTEGRATE '<EXP <^ .X 2>>>$
----------------------------
RISCH FASL DSK MACSYM BEING LOADED
LOADING DONE
*ERROR*                         ; Program recognizes that MACSYMA
CANT-INTEGRATE                  ; couldn't integrate.
LISTENING-AT-LEVEL 2 PROCESS 1
<ERRET>$                        ; To get back to level 1.
--------
LISTENING-AT-LEVEL 1 PROCESS 1
<DIS>$          ; We disconnect here to show the verbose mode,
------          ; the program disconnects automatically on quitting.
"CONNECTIONS CLOSED NOW"
<VERBOSE>$
----------
"YOU WILL BE ABLE TO OBSERVE MUDDLE-MACSYMA INTERACTION NOW"
<DIFF '<^ .X 3>>$
-----------------
PLEASE BE PATIENT, MACSYMA LOADING MAY TAKE TIME
MIT MATHLAB PDP-10 STELNT.59
ML ITS.1. DDT.516.
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,
 STRING (DIFF ((X^3),X,1));     ; and sends input in infix form.
(D1)                                   3*X^2
<* 3 <^ .X 2>>                  ; The output is in MUDDLE prefix form.
<INTEGRATE '</ .X <+ .X 1>>>$
-----------------------------
C2) STRING (INTEGRATE ((X/(X+1)),X));
SIN FASL DSK MACSYM BEING LOADED
LOADING DONE
SCHATC FASL DSK MACSYM BEING LOADED
LOADING DONE
(D2)                                 X-LOG(X+1)
<- .X <LOG <+ .X 1>>>           ; The output again.
<TERSE>$
--------
"OK"                            ; Back in TERSE mode now.

<FLOAD "MUDDLE;UGRF">$          ; To load graphics program
----------------------
IMLAC? (ANSWER Y OR N) Y        ; for graphics on an IMLAC.
                       -
"DONE"
<GRAPH <SLT A '<^ <SIN .X> 2>> X -3 3>$
---------------------------------------
        ; To graph function sin(X)^2 (graph 1 on Figure 1).
<GRAPH  <DIFF .A>>$
-------------------
        ; To graph diff of sin(X)^2 (see graph 2, Figure 1).
<GRAPH <INTEGRATE .A>>$
-----------------------
        ; To graph integral of sin(X)^2 (see graph 3, Figure 1).
<QUIT>$                         ; To quit from program and MUDDLE.
-------
KILL
[;]                     ; semicolon prompt from MONIT.