Status: Accepted
Owner:
maz...@gmail.com
Labels: Type-Defect Priority-Medium
New issue 149 by
maz...@gmail.com: Templates can crash Soar if a variable
used for a numeric preferences matches an identifier instead of a number
http://code.google.com/p/soar/issues/detail?id=149
What steps will reproduce the problem?
1. Source productions below
2. Step once
3. Call "print" to print templates produced
What is the expected output? What do you see instead?
It should have printout out a warning at run-time when it matches wme's
that cause it to try to create an illegal rule. Instead, it seems to
create something invalid and then dies when it tries to print that invalid
rule out.
One possibly interesting thing to note is that the final template does not
cause an issue (comment out the other two, and it doesn't crash) despite
the fact that it matches the same wme's that the previous template did and
produces the same RHS numeric preference. Instead, it works fine and
doesn't create whatever it is that is causing the crash. This may point to
something more than just trying to use an identifier as a numeric
preference value.
sp {init
(state <s> ^superstate nil)
-->
(<s> ^test-id <tp> <tp2>)
(<tp2> ^value <dummy1> <dummy2>)
}
sp {propose
(state <s> ^superstate nil
^test-id)
-->
(<s> ^operator <o> +)
}
sp {template-problem1
:template
(state <s> ^operator <o> +
^test-id <id>
^test-id {<> <id> <id2> })
(<id> ^value <v>)
-->
(<s> ^operator <o> = <v>)
}
sp {template-problem2
:template
(state <s> ^operator <o> +
^test-id <id>
^test-id {<> <id> <id2> })
(<id> ^value <v>)
-->
(<s> ^operator <o> = <id>)
}
sp {template-NOT-problem2
:template
(state <s> ^operator <o> +
^test-id <id>
^test-id {<> <id> <id2> })
-->
(<s> ^operator <o> = <id>)
}
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings