;; ------------------------------------------------------------------------- ;; ;; -*- actr -*- ;; ;; Model to show/test compilation problems related to testing for equality ;; in compiled rules. ;; ;; HvR, 011120 ;; ;; ------------------------------------------------------------------------- (clear-all) (sgp :esc t :epl t ) (chunk-type gen-goal step slot1 slot2 answer) (chunk-type demo slot1 slot2) (add-dm (balance-goal ISA chunk) (will_be_retrieved isa demo slot1 1 slot2 1) (goal isa gen-goal) ) (goal-focus goal) (p Initiate-Retrieval =goal> isa gen-goal step nil ==> +retrieval> isa demo =goal> step t) (p Process-Retrieval =goal> isa gen-goal step t slot1 nil slot2 nil =retrieval> isa demo slot1 =slot1 slot2 =slot2 ==> =goal> slot1 =slot1 slot2 =slot2 ) (p Most-Active-Chunk-Has-Unequal-Values =goal> isa gen-goal step t slot1 =slot1 - slot2 =slot1 answer nil ==> =goal> answer "no" ) (p Most-Active-Chunk-Has-Equal-Values =goal> isa gen-goal step t slot1 =slot1 slot2 =slot1 answer nil ==> =goal> answer "yes" ) (run)