[ACT-R-users] Trouble with :v and :cmdt

db30 at andrew.cmu.edu db30 at andrew.cmu.edu
Fri Aug 10 13:11:26 EDT 2012


--On Friday, August 10, 2012 12:14 PM -0400 Stu Rodgers <stu10887 at gmail.com> 
wrote:

>
> ACT-R Users List,
>  
> I am having trouble with the :v and :cmdt parameters in ACT-R6 r1227.
>  
> (sgp
>      :v  *cmdt-out*
>      :cmdt *cmdt-out* 
>      ;; snipped rest of code out for brevity     
> )
>  
> Here are the warnings:
>#| Warning: Parameter :v cannot take value *cmdt-out* because it must be must
>#| be t, nil, a stream, pathname or namestring. |# Warning: Parameter :cmdt
>#| cannot take value *cmdt-out* because it must be must be t, nil, a stream,
>#| pathname or namestring. |#
>
> Here is the value of *cmdt-out*.  It is set prior to defining the model.
>> *cmdt-out*
># P"C:\\Users\\stuart.rodgers\\palm\\synavo\\acl_cmdt_out.txt"
>>
>  
> The intent is simply to output everything from the Allegro Common
> Lisp listener window to a text file because I am exceeding the limits of the
> window.  My trace files are a bit over 10 MB.
>  
> Thanks for your suggestions and advice in advance.
>  


Sgp, like most of the ACT-R commands, is a macro which does not evaluate
its parameters.  Thus, that call is not going to set :v and :cmdt to the
value of *cmdt-out* but literally to the symbol *cmdt-out*.  If you want to
use the values of Lisp variables in that way you will have to either
explicitly evaluate them (which could be done with a variety of different
Lisp tricks) or use the corresponding ACT-R function which will evaluate
its parameters.  I recommend using the ACT-R functions for things like that,
but if you are comfortable enough with Lisp feel free to evaluate the macro
form however you want.  Generally the ACT-R function for a command will
have the same name as the macro with -fct appended to it, and in this case,
the function is sgp-fct.  The ACT-R functions also often require specifying
the values in a slightly different way than the macro, and for sgp-fct the
values must be provided in a list.  Therefore, to do what you want you
could use something like this:

(sgp-fct (list :v *cmdt-out* :cmdt *cmdt-out* ...))

For more information, the reference manual includes the details on which
commands have corresponding functions and how the parameters must be
specified for those functions, and the experiment description document in
unit 5 of the tutorial includes some discussion on the difference between
the macro and functional forms of the ACT-R commands.

Hope that helps,
Dan





More information about the ACT-R-users mailing list