• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
          • Svstmt-case
          • Svstmt-while
          • Svstmt-p
          • Svstmt-if
          • Svstmt-equiv
          • Svstmt-xcond
          • Svstmt-scope
          • Svstmt-assign
          • Svstmt-compile
            • Svstmt-compile.lisp
              • Svstate-merge-branches
              • Svex-alist-merge-branches
              • Svstmt-assign->subst
              • Svstack-merge-branches
              • Svstacks-compatible
              • Svjumpstate-merge-svstate-branches
              • Svjumpstate-svstate-compatible
              • Svstmt-lhs-check-masks
              • Svjumpstate
              • Svjumpstates-compatible
              • Svstmtlist-compile-top
              • Svjumpstate-sequence-svstates
              • Constraintlist-merge-branches
              • Svjumpstate-merge-branches
              • Svex-replace-range
              • Svex-svstmt-ite
              • Svstmt-process-write
              • Svjumpstate-sequence
              • Svstmt-process-writelist
              • Svstack-assign
              • Svstmt-writelist-var-sizes
              • Svstates-compatible
              • 4vec-replace-range
              • Svstmt-write-var-sizes
              • Make-empty-svjumpstate
              • Constraintlist-add-pathcond
                • Svjumpstate-pop-scope
                • Constraintlist-compose-svstack
                • Svstack-to-svex-alist
                • Svstack-filter-global-lhs-vars
                • Svjumpstate-vars
                • Svex-svstmt-or
                • Svex-svstmt-andc1
                • Svstate-push-scope
                • Svstate-pop-scope
                • Svstate-vars
                • Svstack-lookup
                • Svar-subtract-delay
                • Svstmt-initialize-locals
                • Svstack-fork
                • Svstack-clean
                • Svstack-nonempty-fix
                • Svstate-fork
                • Svstate-clean
                • Svstack-globalp
                • Svjumpstate-fork
                • Svar-delayed-member
                • Svjumpstate-levels
                • Svjumpstate-free
                • Svstate-free
                • Svstack-free
                • Svstack
                • Svar-size-alist
              • Svstate
            • Svstmt-constraints
            • Svstmt-jump
            • Svstmtlist
            • Svstmt-kind
            • Svstmt.lisp
            • Svstmt-fix
            • Svstmt-count
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svstmt-compile.lisp

    Constraintlist-add-pathcond

    Signature
    (constraintlist-add-pathcond cond negatedp constraints) 
      → 
    new-constraints
    Arguments
    cond — Guard (svex-p cond).
    constraints — Guard (constraintlist-p constraints).
    Returns
    new-constraints — Type (constraintlist-p new-constraints).

    Definitions and Theorems

    Function: constraintlist-add-pathcond

    (defun constraintlist-add-pathcond (cond negatedp constraints)
     (declare (xargs :guard (and (svex-p cond)
                                 (constraintlist-p constraints))))
     (let ((__function__ 'constraintlist-add-pathcond))
       (declare (ignorable __function__))
       (if (atom constraints)
           nil
         (cons (change-constraint
                    (car constraints)
                    :cond (svcall bitor
                                  (if negatedp cond
                                    (svcall bitnot (svcall uor cond)))
                                  (constraint->cond (car constraints))))
               (constraintlist-add-pathcond
                    cond negatedp (cdr constraints))))))

    Theorem: constraintlist-p-of-constraintlist-add-pathcond

    (defthm constraintlist-p-of-constraintlist-add-pathcond
     (b* ((new-constraints
               (constraintlist-add-pathcond cond negatedp constraints)))
       (constraintlist-p new-constraints))
     :rule-classes :rewrite)

    Theorem: vars-of-constraintlist-add-pathcond

    (defthm vars-of-constraintlist-add-pathcond
     (b* ((?new-constraints
               (constraintlist-add-pathcond cond negatedp constraints)))
       (implies (and (not (member v (constraintlist-vars constraints)))
                     (not (member v (svex-vars cond))))
                (not (member v
                             (constraintlist-vars new-constraints))))))

    Theorem: constraintlist-add-pathcond-of-svex-fix-cond

    (defthm constraintlist-add-pathcond-of-svex-fix-cond
      (equal (constraintlist-add-pathcond (svex-fix cond)
                                          negatedp constraints)
             (constraintlist-add-pathcond cond negatedp constraints)))

    Theorem: constraintlist-add-pathcond-svex-equiv-congruence-on-cond

    (defthm constraintlist-add-pathcond-svex-equiv-congruence-on-cond
     (implies
      (svex-equiv cond cond-equiv)
      (equal
         (constraintlist-add-pathcond cond negatedp constraints)
         (constraintlist-add-pathcond cond-equiv negatedp constraints)))
     :rule-classes :congruence)

    Theorem: constraintlist-add-pathcond-of-constraintlist-fix-constraints

    (defthm
          constraintlist-add-pathcond-of-constraintlist-fix-constraints
     (equal
          (constraintlist-add-pathcond cond negatedp
                                       (constraintlist-fix constraints))
          (constraintlist-add-pathcond cond negatedp constraints)))

    Theorem: constraintlist-add-pathcond-constraintlist-equiv-congruence-on-constraints

    (defthm
     constraintlist-add-pathcond-constraintlist-equiv-congruence-on-constraints
     (implies
      (constraintlist-equiv constraints constraints-equiv)
      (equal
         (constraintlist-add-pathcond cond negatedp constraints)
         (constraintlist-add-pathcond cond negatedp constraints-equiv)))
     :rule-classes :congruence)