All Downloads are FREE. Search and download functionalities are using the official Maven repository.

APT.Arithmetic-smem.arithmetic.process-column.compute-result.add-via-counting.store.soar Maven / Gradle / Ivy

sp {add-via-counting*propose*store
   (state  ^name add-via-counting
              ^counter 
              ^addend 
             -^stored yes
              ^top-state.parameters.store yes)
-->
   ( ^operator  + =)
   ( ^name store)
}

sp {add-via-counting*apply*store*no-carry*store
   (state  ^name add-via-counting
              ^operator.name store
              ^smem.command 
              ^superstate.operator 
              ^carry false
              ^sum 
              ^top-state.zero ) #!!!!
   ( ^digit1 
        ^digit2 )
-->
   ( ^stored yes)
   ( ^store  )
   ( ^sum 
         ^carry-borrow 
         ^digit1 
         ^digit2 )
   ( ^sum 
          ^carry-borrow 
          ^digit1 
          ^digit2 )
}

sp {add-via-counting*apply*store*carry*store
   (state  ^name add-via-counting
              ^operator.name store
              ^smem.command 
              ^top-state.parameters.store yes
              ^superstate.operator 
              ^carry true
              ^sum 
              ^top-state.one ) #!!!!
   ( ^digit1 
        ^digit2 )
-->
   ( ^stored yes)
   ( ^store  )
   ( ^sum 
         ^carry-borrow 
         ^digit1 
         ^digit2 )
   ( ^sum 
          ^carry-borrow 
          ^digit1 
          ^digit2 )
}