[ACT-R-users] Need capability to change chunk type when new slots are added to an existing chunk

Dan Bothell db30 at andrew.cmu.edu
Mon Feb 9 19:19:01 EST 2009



--On Monday, February 09, 2009 5:53 PM -0500 "Ball, Jerry T Civ USAF AFMC 711 HPW/RHAC" 
<Jerry.Ball at mesa.afmc.af.mil> wrote:

> I had heard rumors that there was a way to access the new slots in a
> subsequent production. Thanks for the sample code! One question -- your
> second example using production compilation leads to creation of a
> regular production (not P*) called PRODUCTION1 that references the
> "new-slot" of the "content" chunk in the imaginal buffer. Since this is
> not a P* production and the "new-slot" slot name is not passed in as a
> variable via the goal chunk as in the first example, it doesn't seem
> like this production should work. Am I missing something?
>

Once a new slot has been added to a chunk-type it's no different than if
the chunk-type had been explicitly created with that slot originally.  So,
there's no reason why that production won't work, and in fact once a chunk-
type has been extend then one can explicitly create productions which use
that slot name.

Here's a simple demonstration of that after explicitly calling the function
which p* uses to extend things:

CG-USER(1): (define-model foo)
FOO
CG-USER(2): (chunk-type simple)
SIMPLE
CG-USER(3): (p wont-work-yet =goal> isa simple slot =val ==>)

#|Warning: Invalid slot-name SLOT in call to define-chunk-spec. |#
#|Warning: Invalid syntax in =GOAL> condition. |#
#|Warning: No production defined for (WONT-WORK-YET =GOAL> ISA SIMPLE SLOT =VAL ==>). |#
NIL
CG-USER(4): (extend-chunk-type-slots 'simple 'slot)
NIL
CG-USER(5): (p works-now =goal> isa simple slot =val ==>)
WORKS-NOW


Dan



More information about the ACT-R-users mailing list