• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
              • Json2ast-mutual-recursion-expressions
              • Json-fixtype-span-removal
              • Json2ast-mutual-recursion-statements
              • Json-value-is-span-object-p
              • Json-value-is-core-span-object-p
              • Json2ast-mutual-recursion-types
              • J2f-struct-declaration
              • J2f-console-statement
              • Jsonast-looks-like-function-definition-p
              • J2f-function-definition
              • J2f-assign-statement
              • Json-member-is-span-p
              • J2f-struct-declarations
              • J2f-let-or-const-statement
              • J2f-console-error
              • J2f-struct-members
              • J2f-return-statement
              • J2f-function-definitions
              • J2f-console-log
                • J2f-console-assert
                • Jsonast-looks-like-struct-declaration-p
                • J2f-funinputs
                • J2f-if-statement-tail
                • Jsonast-looks-like-file-p
                • J2f-iteration-statement
                • J2f-if-statement
                • J2f-block-statement
                • J2f-statements
                • J2f-statement
                • J2f-type
              • Testing
              • Definition
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Json2ast

    J2f-console-log

    Converts a json-member console log statement to a leo::statement of kind :console

    Signature
    (j2f-console-log json-console-log) → (mv erp leo-console-log)
    Arguments
    json-console-log — Guard (json::memberp json-console-log).
    Returns
    erp — Type (booleanp erp).
    leo-console-log — Type (consolep leo-console-log).

    Definitions and Theorems

    Function: j2f-console-log

    (defun j2f-console-log (json-console-log)
     (declare (xargs :guard (json::memberp json-console-log)))
     (let ((__function__ 'j2f-console-log))
      (declare (ignorable __function__))
      (b*
       (((require-json-member-with-name json-console-log
                                        "Log" *error-console-log*))
        ((json::pattern
            (:object (:member "string" (:string litstring))
                     (:member "parameters"
                              (:array formatting-string-parameters..))))
         (json::member->value json-console-log))
        ((unless (and json::match? (stringp litstring)))
         (mv t *error-console-log*))
        ((mv erp leo-params)
         (j2f-expression-list formatting-string-parameters..))
        ((when erp) (mv t *error-console-log*)))
       (mv nil
           (make-console-log :string (acl2::explode litstring)
                             :exprs leo-params)))))