
APT.Arithmetic.arithmetic.elaborations.Verify.soar Maven / Gradle / Ivy
sp {arithmetic*elaborate*state*top-number*one-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit1
^next-column nil)
-->
# (write (crlf) |Top Number: | )
( ^top-number )
}
sp {arithmetic*elaborate*state*bottom-number*one-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit2
^next-column nil)
-->
# (write (crlf) |Bottom Number: | )
( ^bottom-number )
}
sp {arithmetic*elaborate*state*result-number*one-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^result
^next-column nil)
-->
# (write (crlf) |Result Number: | )
( ^result-number )
}
sp {arithmetic*elaborate*state*top-number*two-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit1
^next-column )
( ^digit1
^next-column nil)
-->
# (write (crlf) |Top Number: | (+ (* 10 ) ))
( ^top-number (+ (* 10 ) ))
}
sp {arithmetic*elaborate*state*bottom-number*two-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit2
^next-column )
( ^digit2
^next-column nil)
-->
# (write (crlf) |Bottom Number: | (+ (* 10 ) ))
( ^bottom-number (+ (* 10 ) ))
}
sp {arithmetic*elaborate*state*result-number*two-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^result
^next-column )
( ^result
^next-column nil)
-->
# (write (crlf) |Result Number: | (+ (* 10 ) ))
( ^result-number (+ (* 10 ) ))
}
sp {arithmetic*elaborate*state*top-number*three-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit1
^next-column )
( ^digit1
^next-column )
( ^digit1
^next-column nil)
-->
# (write (crlf) |Top Number: | (+ (* 100 ) (* 10 ) ))
( ^top-number (+ (* 100 ) (* 10 ) ))
}
sp {arithmetic*elaborate*state*bottom-number*three-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit2
^next-column )
( ^digit2
^next-column )
( ^digit2
^next-column nil)
-->
# (write (crlf) |Bottom Number: | (+ (* 100 ) (* 10 ) ))
( ^bottom-number (+ (* 100 ) (* 10 ) ))
}
sp {arithmetic*elaborate*state*result-number*three-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^result
^next-column )
( ^result
^next-column )
( ^result
^next-column nil)
-->
# (write (crlf) |Result Number: | (+ (* 100 ) (* 10 ) ))
( ^result-number (+ (* 100 ) (* 10 ) ))
}
sp {arithmetic*elaborate*state*top-number*four-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit1
^next-column )
( ^digit1
^next-column )
( ^digit1
^next-column )
( ^digit1
^next-column nil)
-->
# (write (crlf) |Top Number: | (+ (* 1000 ) (* 100 ) (* 10 ) ))
( ^top-number (+ (* 1000 ) (* 100 ) (* 10 ) ))
}
sp {arithmetic*elaborate*state*bottom-number*four-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^digit2
^next-column )
( ^digit2
^next-column )
( ^digit2
^next-column )
( ^digit2
^next-column nil)
-->
# (write (crlf) |Bottom Number: | (+ (* 1000 ) (* 100 ) (* 10 ) ))
( ^bottom-number (+ (* 1000 ) (* 100 ) (* 10 ) ))
}
sp {arithmetic*elaborate*state*result-number*four-column
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^one-column )
( ^result
^next-column )
( ^result
^next-column )
( ^result
^next-column )
( ^result
^next-column nil)
-->
# (write (crlf) |Result Number: | (+ (* 1000 ) (* 100 ) (* 10 ) ))
( ^result-number (+ (* 1000 ) (* 100 ) (* 10 ) ))
}
sp {arithmetic*elaborate*state*compute-answer*add
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^top-number
^bottom-number
^operation addition)
-->
( ^computed-result (+ ))
# (write (crlf) |Computed Addition Result : | (+ ))
}
sp {arithmetic*elaborate*state*compute-answer*sub
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^top-number
^bottom-number
^operation subtraction)
-->
( ^computed-result (- ))
# (write (crlf) |Computed Subtraction Result : | (- ))
}
#sp {arithmetic*elaborate*state*compare-results*equal
# (state ^name arithmetic
# ^superstate nil
# ^arithmetic-problem )
# ( ^computed-result
# ^result-number )
#-->
# (write (crlf) |Results Correct.|)
#}
sp {arithmetic*elaborate*state*compare-results*not-equal
(state ^name arithmetic
^superstate nil
^arithmetic-problem )
( ^computed-result
^top-number
^bottom-number
^operation-symbol
^result-number { <> })
-->
(write (crlf) |***************************Results Incorrect: | | | | | | = | | <> | | Diff | (- ))
(halt)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy