• 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-struct-declarations

    Converts list of members, all of which are supposed to be struct declarations, to a list of leo::topdecl.

    Signature
    (j2f-struct-declarations json-structs) 
      → 
    (mv erp leo-top-struct-declarations)
    Arguments
    json-structs — Guard (json::member-listp json-structs).
    Returns
    erp — Type (booleanp erp).
    leo-top-struct-declarations — Type (topdecl-listp leo-top-struct-declarations).

    Definitions and Theorems

    Function: j2f-struct-declarations

    (defun j2f-struct-declarations (json-structs)
      (declare (xargs :guard (json::member-listp json-structs)))
      (let ((__function__ 'j2f-struct-declarations))
        (declare (ignorable __function__))
        (if (endp json-structs)
            (mv nil nil)
          (b* ((first-json-struct (first json-structs))
               ((mv erp first-leo-struct)
                (j2f-struct-declaration first-json-struct))
               ((when erp)
                (mv erp (list first-leo-struct)))
               (rest-json-structs (rest json-structs))
               ((mv erp rest-leo-structs)
                (j2f-struct-declarations rest-json-structs))
               ((when erp) (mv erp rest-leo-structs)))
            (mv nil
                (cons first-leo-struct rest-leo-structs))))))