-
Is it possible to access the value of a SHOP variable, say that of an atom, in a Lisp function? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can do this in the context of the theorem-prover. In the theorem-prover, what actually happens is the value of a SHOP variable can be substituted into an expression that is interpreted as lisp code. For example from a board game playing program:
Here we have used collected the coordinate values Note an obscure issue here -- if these coordinates were, for some reason, lisp symbols, like In cases like that, you would have to modify the above to use:
|
Beta Was this translation helpful? Give feedback.
I'm still not sure I understand what you mean by a SHOP variable. SHOP variables are internal to the theorem-prover, and so are only accessible through mechanisms like the one I described earlier.
If you want to access atoms from Lisp code, you can use the special
*current-state*
variable. See section 3.4 in the manual.