• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
      • Break-rewrite
      • Proof-builder
      • Accumulated-persistence
      • Cgen
      • Proof-tree
      • Forward-chaining-reports
      • Print-gv
      • Dmr
      • Splitter
      • Guard-debug
      • Set-debugger-enable
      • Redo-flat
      • Time-tracker
      • Set-check-invariant-risk
      • Removable-runes
      • Efficiency
      • Tail-biting
      • Failed-forcing
      • Sneaky
        • Sneaky-mutate
        • Sneaky-push
        • Sneaky-incf
          • Sneaky-incf-mutator
        • Sneaky-save
        • Sneaky-load
        • Sneaky-load-list
        • Sneaky-alist
        • Sneaky-pop
        • Sneaky-cw
        • Sneaky-delete
        • Sneaky-clear
      • Invariant-risk
      • Failure
      • Measure-debug
      • Dead-events
      • Remove-hyps
      • Type-prescription-debugging
      • Pstack
      • Set-register-invariant-risk
      • Trace
      • Walkabout
      • Disassemble$
      • Nil-goal
      • Cw-gstack
      • Set-guard-msg
      • Find-lemmas
      • Watch
      • Quick-and-dirty-subsumption-replacement-step
      • Profile-all
      • Profile-ACL2
      • Set-print-gv-defaults
      • Minimal-runes
      • Spacewalk
      • Try-gl-concls
      • Near-misses
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Sneaky

Sneaky-incf

Increment a value in the sneaky store.

Signature
(sneaky-incf name &optional (amount '1)) → *
Arguments
amount — Guard (acl2-numberp amount).

Example:

(sneaky-save 'foo 3)
(sneaky-incf 'foo)   ;; increment by 1
(sneaky-incf 'foo 2) ;; increment by 2
(sneaky-load 'foo state) --> (mv 6 state)

In the logic, sneaky-incf just returns nil. Under the hood, we update the sneaky store, incrementing the value of name by the indicated amount. The accumulated values can later be accessed with sneaky-load. See also sneaky-save.

Definitions and Theorems

Function: sneaky-incf-fn

(defun sneaky-incf-fn (name amount)
       (declare (xargs :guard (acl2-numberp amount)))
       (let ((__function__ 'sneaky-incf))
            (declare (ignorable __function__))
            (sneaky-mutate 'sneaky-incf-mutator
                           (list name)
                           (cons name amount))))

Subtopics

Sneaky-incf-mutator