• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
        • Defprojection
        • Deflist
        • Defaggregate
        • Define
        • Defmapping
        • Defenum
        • Add-io-pairs
        • Defalist
        • Defmapappend
        • Returns-specifiers
        • Defarbrec
          • Defarbrec-implementation
            • Defarbrec-event-generation
            • Defarbrec-input-processing
              • Defarbrec-process-terminates-name
              • Defarbrec-process-body
              • Defarbrec-process-inputs
              • Defarbrec-process-update-names
              • Defarbrec-process-measure-name
                • Defarbrec-default-update-names
                • Defarbrec-process-nonterminating
                • Defarbrec-process-x1...xn
                • Defarbrec-process-print
                • Defarbrec-process-fn
                • Defarbrec-process-show-only
                • Defarbrec-printp
              • Defarbrec-check-redundancy
              • Defarbrec-fn
              • Defarbrec-table
              • Defarbrec-macro-definition
          • Defines
          • Define-sk
          • Error-value-tuples
          • Defmax-nat
          • Defmin-int
          • Deftutorial
          • Extended-formals
          • Defrule
          • Defval
          • Defsurj
          • Defiso
          • Defconstrained-recognizer
          • Deffixer
          • Defmvtypes
          • Defconsts
          • Defthm-unsigned-byte-p
          • Support
          • Defthm-signed-byte-p
          • Defthm-natp
          • Defund-sk
          • Defmacro+
          • Defsum
          • Defthm-commutative
          • Definj
          • Defirrelevant
          • Defredundant
        • Std/strings
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Defarbrec-input-processing

    Defarbrec-process-measure-name

    Process the :measure-name input.

    Signature
    (defarbrec-process-measure-name 
         measure-name fn$ update-names$ 
         terminates-name$ terminates-witness-name 
         terminates-rewrite-name ctx state) 
     
      → 
    (mv erp measure-name$ state)
    Arguments
    fn$ — Guard (symbolp fn$).
    update-names$ — Guard (symbol-listp update-names$).
    terminates-name$ — Guard (symbolp terminates-name$).
    terminates-witness-name — Guard (symbolp terminates-witness-name).
    terminates-rewrite-name — Guard (symbolp terminates-rewrite-name).
    Returns
    measure-name$ — A symbolp.

    Return the name to use for the measure function.

    Definitions and Theorems

    Function: defarbrec-process-measure-name

    (defun defarbrec-process-measure-name
           (measure-name fn$ update-names$
                         terminates-name$ terminates-witness-name
                         terminates-rewrite-name ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (symbolp fn$)
                                 (symbol-listp update-names$)
                                 (symbolp terminates-name$)
                                 (symbolp terminates-witness-name)
                                 (symbolp terminates-rewrite-name))))
     (let ((__function__ 'defarbrec-process-measure-name))
      (declare (ignorable __function__))
      (b*
       (((er &)
         (ensure-value-is-symbol$ measure-name
                                  "The :MEASURE-NAME input" t nil))
        (symbol (or measure-name
                    (add-suffix-to-fn fn$ "-MEASURE")))
        (description
         (msg
          "The name ~x0 of the measure function, ~
                              determined (perhaps by default) by ~
                              the :MEASURE-NAME input,"
          symbol))
        ((er &)
         (ensure-symbol-new-event-name$ symbol description t nil))
        ((er &)
         (ensure-symbol-different$
              symbol fn$
              (msg "the name ~x0 of the function to generate"
                   fn$)
              description t nil))
        ((er &)
         (ensure-value-is-not-in-list$
          symbol update-names$
          (if
           (= 1 (len update-names$))
           (msg
            "the name ~x0 of ~
                              the iterated argument update function, ~
                              determined (perhaps by default) by ~
                              the :UPDATE-NAMES input"
            (car update-names$))
           (msg
            "the name ~&0 of ~
                            the iterated argument update functions, ~
                            determined (perhaps by default) by ~
                            the :UPDATE-NAMES input"
            update-names$))
          description t nil))
        ((er &)
         (ensure-symbol-different$
          symbol terminates-name$
          (msg
           "the name ~x0 of the termination testing predicate, ~
                          determined (perhaps by default) by ~
                          the :TERMINATES-NAME input"
           terminates-name$)
          description t nil))
        ((er &)
         (ensure-symbol-different$
          symbol terminates-witness-name
          (msg
           "the name ~x0 of the witness function associated to ~
                          the termination testing predicate, ~
                          determined (perhaps by default) by ~
                          the :TERMINATES-NAME input"
           terminates-witness-name)
          description t nil))
        ((er &)
         (ensure-symbol-different$
          symbol terminates-rewrite-name
          (msg
           "the name ~x0 of the rewrite rule associated to ~
                          the termination testing predicate, ~
                          determined (perhaps by default) by ~
                          the :TERMINATES-NAME input"
           terminates-rewrite-name)
          description t nil)))
       (value symbol))))