• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
      • Std/system
        • Fresh-logical-name-with-$s-suffix
        • Irrelevant-formals-info
        • Std/system/function-queries
        • Std/system/term-queries
        • Std/system/term-transformations
          • Make-mv-let-call
          • Mvify
          • Remove-trivial-vars
          • Remove-unused-vars
          • Fsublis-fn-rec
          • Close-lambdas
          • Fsublis-var
          • Remove-mbe-logic/exec
          • Untranslate$
            • Remove-dead-if-branches
            • Remove-progn
            • Make-mv-nth-calls
            • Apply-fn-into-ifs
            • Conjoin-equalities
            • Fapply-unary-to-terms
            • Apply-unary-to-terms
            • Apply-terms-same-args
            • Apply-term
            • Fsublis-fn-lst-simple
            • Fsublis-fn
            • Fapply-terms-same-args
            • Fsublis-fn-simple
            • Fapply-term
            • Remove-mbe-logic
            • Remove-mbe-exec
            • Quote-term
            • Quote-term-list
            • Apply-term*
            • Std/system/fsubcor-var
            • Std/system/conjoin
            • Std/system/flatten-ands-in-lit
            • Fapply-term*
            • Std/system/dumb-negate-lit
          • Std/system/enhanced-utilities
          • Install-not-normalized-event
          • Install-not-normalized-event-lst
          • Std/system/term-function-recognizers
          • Genvar$
          • Std/system/event-name-queries
          • Pseudo-tests-and-call-listp
          • Maybe-pseudo-event-formp
          • Add-suffix-to-fn-or-const
          • Chk-irrelevant-formals-ok
          • Table-alist+
          • Pseudo-tests-and-callp
          • Add-suffix-to-fn-or-const-lst
          • Known-packages+
          • Add-suffix-to-fn-lst
          • Unquote-term
          • Event-landmark-names
          • Add-suffix-lst
          • Std/system/theorem-queries
          • Unquote-term-list
          • Std/system/macro-queries
          • Pseudo-command-landmark-listp
          • Install-not-normalized$
          • Pseudo-event-landmark-listp
          • Known-packages
          • Std/system/partition-rest-and-keyword-args
          • Rune-enabledp
          • Rune-disabledp
          • Included-books
          • Std/system/pseudo-event-formp
          • Std/system/plist-worldp-with-formals
          • Std/system/w
          • Std/system/geprops
          • Std/system/arglistp
          • Std/system/constant-queries
        • 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
    • Std/system/term-transformations

    Untranslate$

    A logic-mode guard-verified version of untranslate.

    This is a logic mode version of the function, untranslate. See untranslate, but note that instead of (untranslate term iff-flg wrld) one calls (untranslate$ term iff-flg state); that is, the world has been replaced by state.

    The untranslation operated by this utility does not make any use of the user-defined-functions-table: neither the untranslate-preprocess capability nor wholesale replacement of untranslate. (Technical Note: Untranslate$ calls untranslate1 instead of untranslate, using a preprocess-fn argument of nil to avoid certain hard errors.)

    If the call to untranslate1 causes a hard error, so does untranslate$; this is achieved by passing nil as the hard-error-returns-nilp argument of magic-ev-fncall. If the magic-ev-fncall fails, we also stop with a hard error.

    Definitions and Theorems

    Function: untranslate$

    (defun untranslate$ (term iff-flg state)
      (declare (xargs :stobjs state
                      :guard (pseudo-termp term)))
      (let* ((wrld (w state))
             (tbl (untrans-table wrld))
             (fn nil))
        (mv-let (erp val)
                (magic-ev-fncall 'untranslate1
                                 (list term iff-flg tbl fn wrld)
                                 state nil t)
          (if erp (er hard? 'untranslate$ "~@0" val)
            val))))