• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
        • Make-event
        • Defmacro
        • Untranslate-patterns
        • Tc
        • Trans*
        • Macro-aliases-table
        • Macro-args
        • Defabbrev
        • User-defined-functions-table
        • Trans
        • Untranslate-for-execution
        • Add-macro-fn
        • Check-vars-not-free
        • Safe-mode
        • Macro-libraries
          • B*
          • Defunc
          • Fty
          • Apt
            • Simplify-defun
            • Isodata
            • Tailrec
            • Schemalg
              • Schemalg-implementation
                • Schemalg-event-generation
                • Schemalg-fn
                  • Schemalg-macro-definition
                  • Schemalg-input-processing
                • Schemalg-divconq-oset-0-1
                • Schemalg-divconq-list-0-1
              • Restrict
              • Expdata
              • Casesplit
              • Simplify-term
              • Simplify-defun-sk
              • Parteval
              • Solve
              • Wrap-output
              • Propagate-iso
              • Simplify
              • Finite-difference
              • Drop-irrelevant-params
              • Copy-function
              • Lift-iso
              • Rename-params
              • Utilities
              • Simplify-term-programmatic
              • Simplify-defun-sk-programmatic
              • Simplify-defun-programmatic
              • Simplify-defun+
              • Common-options
              • Common-concepts
            • Std/util
            • Defdata
            • Defrstobj
            • Seq
            • Match-tree
            • Defrstobj
            • With-supporters
            • Def-partial-measure
            • Template-subst
            • Soft
            • Defthm-domain
            • Event-macros
            • Def-universal-equiv
            • Def-saved-obligs
            • With-supporters-after
            • Definec
            • Sig
            • Outer-local
            • Data-structures
          • Trans1
          • Defmacro-untouchable
          • Set-duplicate-keys-action
          • Add-macro-alias
          • Magic-macroexpand
          • Defmacroq
          • Trans!
          • Remove-macro-fn
          • Remove-macro-alias
          • Add-binop
          • Untrans-table
          • Trans*-
          • Remove-binop
          • Tcp
          • Tca
        • Mailing-lists
        • Interfacing-tools
      • Macro-libraries
        • B*
        • Defunc
        • Fty
        • Apt
          • Simplify-defun
          • Isodata
          • Tailrec
          • Schemalg
            • Schemalg-implementation
              • Schemalg-event-generation
              • Schemalg-fn
                • Schemalg-macro-definition
                • Schemalg-input-processing
              • Schemalg-divconq-oset-0-1
              • Schemalg-divconq-list-0-1
            • Restrict
            • Expdata
            • Casesplit
            • Simplify-term
            • Simplify-defun-sk
            • Parteval
            • Solve
            • Wrap-output
            • Propagate-iso
            • Simplify
            • Finite-difference
            • Drop-irrelevant-params
            • Copy-function
            • Lift-iso
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Std/util
          • Defdata
          • Defrstobj
          • Seq
          • Match-tree
          • Defrstobj
          • With-supporters
          • Def-partial-measure
          • Template-subst
          • Soft
          • Defthm-domain
          • Event-macros
          • Def-universal-equiv
          • Def-saved-obligs
          • With-supporters-after
          • Definec
          • Sig
          • Outer-local
          • Data-structures
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Schemalg-implementation

      Schemalg-fn

      Check redundancy, process the inputs, and generate the event.

      Signature
      (schemalg-fn old schema schema? 
                   list-input list-input? oset-input 
                   oset-input? cdr-output cdr-output? 
                   tail-output tail-output? fvar-0-name 
                   fvar-0-name? fvar-1-name fvar-1-name? 
                   fvar-2-name fvar-2-name? algo-name 
                   algo-enable spec-0-name spec-0-name? 
                   spec-0-enable spec-0-enable? 
                   spec-1-name spec-1-name? spec-1-enable 
                   spec-1-enable? spec-2-name spec-2-name? 
                   spec-2-enable spec-2-enable? 
                   equal-algo-name equal-algo-enable 
                   new-name new-enable old-if-new-name 
                   old-if-new-name? old-if-new-enable 
                   old-if-new-enable? verify-guards 
                   print show-only call ctx state) 
       
        → 
      (mv erp event state)
      Arguments
      schema? — Guard (booleanp schema?).
      list-input? — Guard (booleanp list-input?).
      oset-input? — Guard (booleanp oset-input?).
      cdr-output? — Guard (booleanp cdr-output?).
      tail-output? — Guard (booleanp tail-output?).
      fvar-0-name? — Guard (booleanp fvar-0-name?).
      fvar-1-name? — Guard (booleanp fvar-1-name?).
      fvar-2-name? — Guard (booleanp fvar-2-name?).
      spec-0-name? — Guard (booleanp spec-0-name?).
      spec-0-enable? — Guard (booleanp spec-0-enable?).
      spec-1-name? — Guard (booleanp spec-1-name?).
      spec-1-enable? — Guard (booleanp spec-1-enable?).
      spec-2-name? — Guard (booleanp spec-2-name?).
      spec-2-enable? — Guard (booleanp spec-2-enable?).
      old-if-new-name? — Guard (booleanp old-if-new-name?).
      old-if-new-enable? — Guard (booleanp old-if-new-enable?).
      call — Guard (pseudo-event-formp call).
      Returns
      event — A pseudo-event-formp.

      Definitions and Theorems

      Function: schemalg-fn

      (defun schemalg-fn (old schema schema?
                              list-input list-input? oset-input
                              oset-input? cdr-output cdr-output?
                              tail-output tail-output? fvar-0-name
                              fvar-0-name? fvar-1-name fvar-1-name?
                              fvar-2-name fvar-2-name? algo-name
                              algo-enable spec-0-name spec-0-name?
                              spec-0-enable spec-0-enable?
                              spec-1-name spec-1-name? spec-1-enable
                              spec-1-enable? spec-2-name spec-2-name?
                              spec-2-enable spec-2-enable?
                              equal-algo-name equal-algo-enable
                              new-name new-enable old-if-new-name
                              old-if-new-name? old-if-new-enable
                              old-if-new-enable? verify-guards
                              print show-only call ctx state)
        (declare (xargs :stobjs (state)))
        (declare (xargs :guard (and (booleanp schema?)
                                    (booleanp list-input?)
                                    (booleanp oset-input?)
                                    (booleanp cdr-output?)
                                    (booleanp tail-output?)
                                    (booleanp fvar-0-name?)
                                    (booleanp fvar-1-name?)
                                    (booleanp fvar-2-name?)
                                    (booleanp spec-0-name?)
                                    (booleanp spec-0-enable?)
                                    (booleanp spec-1-name?)
                                    (booleanp spec-1-enable?)
                                    (booleanp spec-2-name?)
                                    (booleanp spec-2-enable?)
                                    (booleanp old-if-new-name?)
                                    (booleanp old-if-new-enable?)
                                    (pseudo-event-formp call))))
        (let ((__function__ 'schemalg-fn))
          (declare (ignorable __function__))
          (b* ((encapsulate?
                    (previous-transformation-expansion call (w state)))
               ((when encapsulate?)
                (b* (((run-when show-only)
                      (cw "~x0~|" encapsulate?)))
                  (cw "~%The transformation ~x0 is redundant.~%"
                      call)
                  (value '(value-triple :invisible))))
               ((er (list old ??f x-x1...xn x-a1...am
                          & iorel x y ??g ??g0 ??g1 ??h ??f1...?fp
                          algo spec-0 spec-1 spec-2 equal-algo new
                          new-enable old-if-new old-if-new-enable
                          verify-guards names-to-avoid))
                (schemalg-process-inputs
                     old schema schema?
                     list-input list-input? oset-input
                     oset-input? cdr-output cdr-output?
                     tail-output tail-output? fvar-0-name
                     fvar-0-name? fvar-1-name fvar-1-name?
                     fvar-2-name fvar-2-name? algo-name
                     algo-enable spec-0-name spec-0-name?
                     spec-0-enable spec-0-enable?
                     spec-1-name spec-1-name? spec-1-enable
                     spec-1-enable? spec-2-name spec-2-name?
                     spec-2-enable spec-2-enable?
                     equal-algo-name equal-algo-enable
                     new-name new-enable old-if-new-name
                     old-if-new-name? old-if-new-enable
                     old-if-new-enable? verify-guards
                     print show-only ctx state))
               (event (schemalg-gen-everything
                           old ?f x-x1...xn x-a1...am
                           x y iorel schema ?g ?g0 ?g1 ?h algo
                           algo-enable spec-0 spec-0-enable spec-1
                           spec-1-enable spec-2 spec-2-enable
                           equal-algo equal-algo-enable new
                           new-enable old-if-new old-if-new-enable
                           verify-guards print show-only
                           call names-to-avoid (w state))))
            (value event))))