Blue Clay Demo #1 - CLOS Implementation

indigo> pcl
GCL (GNU Common Lisp)  Version(2.2) Wed Jan 22 09:55:53 EST 1997
Licensed under GNU Public Library License
Contains Enhancements by W. Schelter

>(in-package "pcl" )
#<"PCL" package>

PCL>( load "../clay/clay.l" )
T

PCL>( load "../green/greenclay.l" )
T

PCL>( load "../red/redclay.l" )
T

PCL>( load "blueclay.l" )
T

PCL>( run ( new-blue-clay ) )

blue> help.

blue world
delete -- Delete a Blue Clay command.
display -- Display a Blue Clay command "completely".
eval -- Evaluate a Lisp s-expression.
help -- Display the commands of the current world.
load -- Load a world and enter it.
monitor -- Turn on information monitoring feature.
quote -- Display a quote.
sigma -- Compute a concept metric for a Blue Clay command.
sigma-x -- Compute a concept metric for a Blue Clay command and "show work".
stop -- Terminate Clay execution.
unload -- Leave the current world, returning to its parent.
unmonitor -- Turn off information monitoring feature.

blue> quote2 = quote, quote.

blue> quote6 = quote2, quote2, quote2.

blue> quote6.

We shall not cease from exploration 
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time.

   - T. S. Eliot
      
It is a characteristic of wisdom not to do desparate things.

   - Henry David Thoreua
      
To understand is to invent.  

   - Jean Piaget
      
Do not become attached to the things you like, 
do not maintain aversion to the things you dislike. 
Sorrow, fear and bondage come from one's likes
and dislikes. 

   - Buddha
      
It is a characteristic of wisdom not to do desparate things.

   - Henry David Thoreua
      
Do not become attached to the things you like, 
do not maintain aversion to the things you dislike. 
Sorrow, fear and bondage come from one's likes
and dislikes. 

   - Buddha
      

blue> display.
blue: command? quote6
quote6 = quote2, quote2, quote2.
quote2 = quote, quote.


blue> sigma.
blue: command? quote6
19

blue> sigma-x.
blue: command? quote6

   command set is { quote6 quote2 }
   command set length is 2

   command set commands are ...
   quote6 = quote2, quote2, quote2.
   quote2 = quote, quote.

   lengths are (3 2)
   triangular values are (6 3)

   factor1 is 10 (5 times the command set length)
   factor2 is 9 (the sum of the triangular numbers)

   sigma is 19

blue> load.
domain? melody
Loading /home/blue/public_html/ai/lisp/clos/clay/blue/domains/melody.l
Loading /home/blue/ai/lisp/clos/blue.l
Finished loading /home/blue/ai/lisp/clos/blue.l
Compiling gazonk0.lsp.
End of Pass 1.  
End of Pass 2.  
OPTIMIZE levels: Safety=1 (No runtime error checking), Space=0, Speed=3
Finished compiling gazonk0.lsp.
Loading gazonk0.o
start address -T 774000 Finished loading gazonk0.o
Finished loading /home/blue/public_html/ai/lisp/clos/clay/blue/domains/melody.l
Lisp melody world loaded.

blue>melody> play.
     1  ----

blue>melody> boat = m1, m2, m3, m4.

blue>melody> m1 = triple, play, third.

blue>melody> m2 = m1.

blue>melody> m3 = d, play, h, rp, play, lp.

blue>melody> m4 = rp, rp, triple, play, third, lp, lp.

blue>melody> boat.
     1  ------------
     1  ------------
     1  --------
     2  ----
     3  ------------

blue>melody> help.

melody world
d -- Double the duration of the note.
dot -- Increase by 50% the duration of the note.
h -- Halve the duration of the note.
lp -- Lower the pitch of the note one scale degree.
play -- Render the note sonicly and/or textually and/or graphicly.
quadruple -- Quadruple the duration of the note.
quarter -- Quarter the duration of the note.
rest -- Play the note silently.
rp -- Raise the pitch of the note one scale degree.
third -- Third the duration of the note.
triple -- Triple the duration of the note.
undot -- Decrease by 1/3 the duration of the note.
m4 = rp, rp, triple, play, third, lp, lp.
m3 = d, play, h, rp, play, lp.
m2 = m1.
m1 = triple, play, third.
boat = m1, m2, m3, m4.

blue>melody> display.
blue: command? boat
boat = m1, m2, m3, m4.
m1 = triple, play, third.
m4 = rp, rp, triple, play, third, lp, lp.
m2 = m1.
m3 = d, play, h, rp, play, lp.


blue>melody> sigma.
blue: command? boat
91

blue>melody> sigma-x.
blue: command? boat

   command set is { boat m1 m4 m2 m3 }
   command set length is 5

   command set commands are ...
   boat = m1, m2, m3, m4.
   m1 = triple, play, third.
   m4 = rp, rp, triple, play, third, lp, lp.
   m2 = m1.
   m3 = d, play, h, rp, play, lp.

   lengths are (4 3 7 1 6)
   triangular values are (10 6 28 1 21)

   factor1 is 25 (5 times the command set length)
   factor2 is 66 (the sum of the triangular numbers)

   sigma is 91

blue>melody> delete.
blue: command? m2
m2 deleted.

blue>melody> delete.
blue: command? m4
m4 deleted.

blue>melody> help.

melody world
d -- Double the duration of the note.
dot -- Increase by 50% the duration of the note.
h -- Halve the duration of the note.
lp -- Lower the pitch of the note one scale degree.
play -- Render the note sonicly and/or textually and/or graphicly.
quadruple -- Quadruple the duration of the note.
quarter -- Quarter the duration of the note.
rest -- Play the note silently.
rp -- Raise the pitch of the note one scale degree.
third -- Third the duration of the note.
triple -- Triple the duration of the note.
undot -- Decrease by 1/3 the duration of the note.
m3 = d, play, h, rp, play, lp.
m1 = triple, play, third.
boat = m1, m2, m3, m4.

blue>melody> boat.
     1  ------------
blue>melody> Unknown command.

blue>melody> monitor.
blue: (reader|parser)? reader


blue>melody> figure1 = rp, play, lp, lp, play, rp.
Natural input line ...
figure1 = rp, play, lp, lp, play, rp.
Formal input line ...
[ [ figure1 ] = [ [ rp ] [ play ] [ lp ] [ lp ] [ play ] [ rp ] ] ]
Expanded input line ...
[ [ figure1 ] = [ [ rp ] [ play ] [ lp ] [ lp ] [ play ] [ rp ] ] ]
Tokenized input line ...
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "figure1";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "=";  type = EQUAL-SIGN
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "rp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "lp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "lp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "rp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "]";  type = RIGHT-BRACKET


blue>melody> unmonitor.
Natural input line ...
unmonitor.
Formal input line ...
[ unmonitor ]
Expanded input line ...
[ unmonitor ]
Tokenized input line ...
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "unmonitor";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET


blue>melody> monitor.
blue: (reader|parser)? parser


blue>melody> tune = play, rp, play, lp, d, play, h.
Parsing a Green Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
Green Clay command parse failed.
Parsing a Red Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "tune";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "=";  type = EQUAL-SIGN
Red Clay command parse failed.
Parsing a Blue Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
Parsing a Green Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "tune";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
Green Clay command parse succeeded.
GREEN CLAY COMMAND
| tune
TOKEN...  name = "=";  type = EQUAL-SIGN
Parsing a Red Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "rp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "lp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "d";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "h";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "]";  type = RIGHT-BRACKET
Red Clay command parse succeeded.
RED CLAY COMMAND
| GREEN CLAY COMMAND
| | play
| GREEN CLAY COMMAND
| | rp
| GREEN CLAY COMMAND
| | play
| GREEN CLAY COMMAND
| | lp
| GREEN CLAY COMMAND
| | d
| GREEN CLAY COMMAND
| | play
| GREEN CLAY COMMAND
| | h
TOKEN...  name = "]";  type = RIGHT-BRACKET
Blue Clay command parse succeeded.
BLUE CLAY COMMAND
| tune
| RED CLAY COMMAND
| | GREEN CLAY COMMAND
| | | play
| | GREEN CLAY COMMAND
| | | rp
| | GREEN CLAY COMMAND
| | | play
| | GREEN CLAY COMMAND
| | | lp
| | GREEN CLAY COMMAND
| | | d
| | GREEN CLAY COMMAND
| | | play
| | GREEN CLAY COMMAND
| | | h

blue>melody> unmonitor.
Parsing a Green Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "unmonitor";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
Green Clay command parse succeeded.
GREEN CLAY COMMAND
| unmonitor

blue>melody> unload.
melody world unloaded.

blue> help.

blue world
delete -- Delete a Blue Clay command.
display -- Display a Blue Clay command "completely".
eval -- Evaluate a Lisp s-expression.
help -- Display the commands of the current world.
load -- Load a world and enter it.
monitor -- Turn on information monitoring feature.
quote -- Display a quote.
sigma -- Compute a concept metric for a Blue Clay command.
sigma-x -- Compute a concept metric for a Blue Clay command and "show work".
stop -- Terminate Clay execution.
unload -- Leave the current world, returning to its parent.
unmonitor -- Turn off information monitoring feature.
quote6 = quote2, quote2, quote2.
quote2 = quote, quote.

blue> stop.
NIL

PCL>

Craig Graci
Last modified: Sun Mar 2 20:58:17 EST 1997