• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
          • Sin
          • Matching-functions
          • Def-sin-progress
          • Tshell
          • Unsound-eval
          • Hacker
          • ACL2s-interface
          • Startup-banner
          • Command-line
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
          • Sin
          • Matching-functions
          • Def-sin-progress
          • Tshell
          • Unsound-eval
          • Hacker
          • ACL2s-interface
          • Startup-banner
          • Command-line
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Clex

      Def-sin-progress

      Prove basic progress properties of a lexing function.

      The macro def-sin-progress can be used to prove basic progress properties about a function that updates sin.

      Typically for any function (f ... sin) --> (mv ... sin) you will want to prove:

      (defthm f-progress-weak
        (<= (len (strin-left (mv-nth ... (f ... sin))))
            (len (strin-left sin)))
        :rule-classes ((:rewrite) (:linear)))
      
      (defthm f-progress-strong
        (implies hyp
                 (< (len (strin-left (mv-nth ... (f ... sin))))
                    (len (strin-left sin))))
        :rule-classes ((:rewrite) (:linear)))

      Where hyp is some suitable hypothesis involving the inputs and/or other values returned by the function, e.g., frequently, that F produced a token instead of failing.

      (def-sin-progress name &key (hyp 't)) just tries to prove these theorems automatically about the function named name, with the given hyp. See the example-lexer for some examples of using it.