Comment #2 on issue 130 by
maz...@gmail.com: GDS assumptions can be
This might be related to some other previous bug reports, most notable
issues 38, 45, 105 (maybe 2, 66 too).
Since this is a long-standing bug and we're putting this on the backburner,
here are some observations I made about the above example while debugging
that might help restart this faster when we get back to it:
GDS error is occuring because the id of the wme being created T1 operator
O2, has an id T1 at level 1, but the instantiation match is at level 2
(where it was created).
When deciding the top-level slot, there's 2 wme's in this order
- Crash case has different values
- T1 ^operator O4 from apply*weird-prod
- T2 ^operator O2 from chunk-1*d3*opnochange*1 (this is original chunk,
not new one)
- During the first run, there's only 1
- T1 ^operator O3 from chunk-1*d3*opnochange*1
- With learning off, there's also only 1 at both points
- Before init-soar: (T1 ^operator O3 +) generated by justification-1
- After: (T1 ^operator O3 +) generated by justification-2
- Chunk_instantiation adds 2 instantiations to newly_created_instantiations
has 2 instantiations. First one is probably chunk, (name generation seemed
like it failed one time I looked at it, but not another time?)
- In first run there are two also, but only chunk seems to fire (or at
least only its wme gets added which doesn't lead to a gds being created and
the crash). New wme does get support from both instantiations though.
- Another possibility is that the ordering of firing is flipped around or
one of the firings isn't being inhibitied
- Maybe b/c name generation failed?
- Maybe b/c duplicate not detected or incorrectly detected in rete?
- Inhibition not happening (could be related because of above, or maybe
whatever is making it fail the name setting is also not linking the
instantiation to new chunk?)
- Changing rules so justification/chunk is also o-supported eliminates
crash. Top-level wme must have i-support on level 1 and o-support from
level 2.
- When learning off, add_production_to_rete both return with
REFRACTED_INST_MATCHED. When learning on, first case return with
REFRACTED_INST_MATCHED, but second returns duplicate production
By the way, "first case" in the above notes means the first time the
subgoal writes a result. Second case is after the agent is init-soared and
run again with the new chunk from the first run. Note that this example
can be made even simpler so it occurs in one run without any redirection
through a top state ID:
learn --on
watch --learn 2
sp {i-support
(state <s> ^superstate nil)
-->
(<s> ^problem <child>)
}
sp {p*substate
(state <s> ^superstate.superstate nil)
-->
(<s> ^operator <o>)
}
sp {o-support
(state <s> ^operator ^superstate <ss>)
-->
(<ss> ^problem <child>)