
APT.Arithmetic-smem.arithmetic.process-column.compute-result.subtract-via-counting.store.soar Maven / Gradle / Ivy
sp {subtract-via-counting*propose*store
(state ^name subtract-via-counting
^counter
^subtrahend
-^stored yes
^top-state.parameters.store yes)
-->
( ^operator + =)
( ^name store)
}
sp {subtract-via-counting*apply*store*no-borrow*store
(state ^name subtract-via-counting
^operator.name store
^smem.command
^top-state.parameters.store yes
^superstate.operator
^borrow false
^base-number
^top-state.zero ) #!!!!
( ^digit1
^digit2 )
-->
# (write |Store: | | + | | = | | no carry |)
# (write |Store: | | + | | = | | no carry |)
( ^stored yes)
( ^store )
( ^sum
^carry-borrow
^digit1
^digit2 )
( ^sum
^carry-borrow
^digit1
^digit2 )}
#
sp {subtract-via-counting*apply*store*borrow*store
(state ^name subtract-via-counting
^operator.name store
^quiescence t
^smem.command
^top-state.parameters.store yes
^superstate.operator
^borrow true
^base-number
^top-state.one ) #!!!!
( ^digit1
^digit2 )
-->
( ^stored yes)
# (write |Store: | | - | | = | | carry |)
( ^store )
( ^sum
^carry-borrow
^digit1
^digit2 )
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy