sleyzerzon / soar

Automatically exported from code.google.com/p/soar
1 stars 0 forks source link

justifications not being variablized into chunks #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There's a particular situation in which justifications will not be
variablized into chunks when they should be. Steps to create this situation
are (I've attached a test case that does this):

1. A rule fires in a substate two levels deep that creates a result on the
super-superstate and also makes a local elaboration.
2. Another rule fires in the same substate that tests the local elaboration
created in step 1 and puts a result on the superstate.

Execution of the second step will result in a justification being built for
the superstate result rather than a chunk.

The reason this is happening is the instantiation of the rule fired in step
1. has an "okay_to_variablize" flag on it. That flag is set to 0 because
the instantiation creates a result more than one level above the state it
matches in. Afterwards, the instantiation is encountered in the backtrace
for the rule that fires in step 2., and agent->variablize_this_chunk is
being set to the state of its okay_to_variablize flag, which is 0.

I think the fix for this is to reset the okay_to_variablize flag after
chunking finishes in step 1. However, since this flag is tested and set in
several places in the backtracing and chunking code, I don't have any
confidence that doing so won't interfere with other assumptions.

Original issue reported on code.google.com by joseph...@gmail.com on 8 Apr 2010 at 10:22

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed by check in 13804

Original comment by maz...@gmail.com on 4 Feb 2013 at 8:31