• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
          • Soft-future-work
          • Soft-macros
          • Updates-to-workshop-material
          • Soft-implementation
          • Soft-notions
            • Second-order-functions
              • Defsoft
              • Defun2
              • Defun-sk2
              • Defchoose2
              • Define-sk2
              • Defund-sk2
              • Define2
              • Defund2
            • Second-order-function-instances
            • Function-variable-instantiation
            • Second-order-theorems
            • Function-variable-dependency
            • Function-variables
            • Second-order-theorem-instances
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Soft-notions

Second-order-functions

Notion of second-order function.

A second-order function is an ACL2 function that depends on one or more function variables and that is explicitly recorded via defsoft.

The function variables that the second-order function depends on may be replaced by functions of matching arities, obtaining a new function that is an instance of the second-order function.

Naming Conventions

Ending second-order function names with the function variables it depends on (in any order), enclosed in square brackets, as in the examples in the SOFT documentation pages, conveys the dependency on the function variables and provides a visual cue for their implicit presence. However, SOFT does not enforce this naming convention.

Subtopics

Defsoft
Record an existing function as second-order.
Defun2
Introduce a second-order function via a second-order version of defun.
Defun-sk2
Introduce a second-order function via a second-order version of defun-sk.
Defchoose2
Introduce a second-order function via a second-order version of defchoose.
Define-sk2
Introduce a second-order function via a second-order version of std::define-sk.
Defund-sk2
Introduce a second-order function via a second-order version of ACL2::defund-sk.
Define2
Introduce a second-order function via a second-order version of define.
Defund2
Introduce a second-order function via a second-order version of defund.