
APT.Arithmetic-smem.arithmetic.process-column.compute-result.add-via-counting.count.soar Maven / Gradle / Ivy
## Given that we always pre-generate all digits to generate the problem
## all digits are always there so there will be no impasse.
### Substate included in case problem is generated without all digits generated.
sp {add-via-counting*propose*count
(state ^name add-via-counting
^counter
-^addend )
-->
( ^operator + =)
( ^name count)
}
sp {add-via-counting*apply*count
(state ^name add-via-counting
^operator
^counter
^sum )
( ^next )
( ^next-carry false
^next )
( ^name count)
-->
( ^counter -
^sum - )
}
sp {add-via-counting*apply*count*carry
(state ^name add-via-counting
^operator
^counter
^sum
^carry false)
( ^next )
( ^next-carry true
^next )
( ^name count)
-->
( ^counter -
^sum -
^carry false -
true)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy