forked from ajreynol/CVC4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
44 changed files
with
1,368 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
; ============================================================================= | ||
; | ||
; This is porition of CPC that is not supported under cvc5's safe options. It | ||
; should *not* be included in proofs emitted by safe builds of cvc5 or when | ||
; --safe-options is enabled. All proofs emitted in such cases will never | ||
; reference any of the symbols or proof rules defined in this subdirectory. | ||
; | ||
; Note the theory definitions in this subdirectory are intended to cover *all* of | ||
; the experimental theory symbols that cvc5 supports. It also may contain proof | ||
; rules that are supported when experimental features are enabled, or definitions | ||
; that are works in progress. | ||
; | ||
; ============================================================================= | ||
|
||
(include "./theories/Arith.eo") | ||
(include "./theories/Bags.eo") | ||
(include "./theories/FloatingPoints.eo") | ||
(include "./theories/FiniteFields.eo") | ||
(include "./theories/SepLogic.eo") | ||
(include "./rules/Transcendentals.eo") | ||
(include "./rules/Sets.eo") | ||
|
||
; disclaimer: this function is not in SMT-LIB. | ||
(declare-const fmf.card (-> Type Int Bool)) | ||
; disclaimer: this function is not in SMT-LIB. | ||
(declare-const fmf.combined_card (-> Int Bool)) | ||
|
||
; Used in the --ho-elim preprocessing pass | ||
(declare-type @ho-elim-sort (Type)) | ||
(declare-const @fmf-fun-sort (-> (! Type :var T :implicit) T Type)) | ||
|
||
; The arrays equal-range predicate. | ||
; disclaimer: This function is not in SMT-LIB. | ||
(declare-const eqrange (-> (! Type :var U :implicit) (! Type :var T :implicit) (! Type :var I :implicit) | ||
(Array U T) (Array U T) I I Bool)) | ||
|
||
; Dataypes shared selector | ||
(declare-const @shared_selector (-> (! Type :opaque :var D) (! Type :opaque :var T) (! Int :opaque) D T)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
(include "../theories/Sets.eo") | ||
|
||
;;;;; ProofRewriteRule::SETS_FILTER_DOWN | ||
|
||
; rule: sets_filter_down | ||
; implements: ProofRewriteRule::SETS_FILTER_DOWN | ||
; premises: | ||
; - mem: A membership of element x into a set filter term. | ||
; conclusion: > | ||
; The membership holds for the set for which we are filtering, and the | ||
; predicate is true for x. | ||
(declare-rule sets_filter_down ((T Type) (P (-> T Bool)) (x T) (S (Set T))) | ||
:premises ((set.member x (set.filter P S))) | ||
:conclusion (and (set.member x S) (P x)) | ||
) | ||
|
||
;;;;; ProofRewriteRule::SETS_FILTER_UP | ||
|
||
; rule: sets_filter_up | ||
; implements: ProofRewriteRule::SETS_FILTER_UP | ||
; args: | ||
; - P (-> T Bool): The predicate to filter on. | ||
; premises: | ||
; - mem: A membership of element x into a set term. | ||
; conclusion: > | ||
; The membership into the same set, filtered by P, holds if and only if the | ||
; predicate is true for x. | ||
(declare-rule sets_filter_up ((T Type) (P (-> T Bool)) (x T) (S (Set T))) | ||
:premises ((set.member x S)) | ||
:args (P) | ||
:conclusion (= (set.member x (set.filter P S)) (P x)) | ||
) |
7 changes: 4 additions & 3 deletions
7
proofs/eo/cpc/rules/Transcendentals.eo → ...fs/eo/cpc/expert/rules/Transcendentals.eo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(include "../../theories/Arith.eo") | ||
|
||
; The "integer-and" operator, see Zohar et al VMCAI 2022. | ||
; disclaimer: This function is not in SMT-LIB. | ||
(declare-const iand (-> Int Int Int Int)) | ||
|
||
; skolems for virtual term substitution | ||
(declare-const @arith_vts_delta Real) | ||
(declare-const @arith_vts_delta_free Real) | ||
(declare-const @arith_vts_infinity (-> (! Type :var T) T)) | ||
(declare-const @arith_vts_infinity_free (-> (! Type :var T) T)) | ||
|
||
; used by --nl-cov | ||
(declare-const @indexed_root_predicate (-> Int Bool Real Bool)) |
6 changes: 3 additions & 3 deletions
6
proofs/eo/cpc/theories/Bags.eo → proofs/eo/cpc/expert/theories/Bags.eo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
proofs/eo/cpc/theories/FiniteFields.eo → ...fs/eo/cpc/expert/theories/FiniteFields.eo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
proofs/eo/cpc/theories/FloatingPoints.eo → .../eo/cpc/expert/theories/FloatingPoints.eo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
(include "../../programs/Utils.eo") | ||
(include "../../theories/Sets.eo") | ||
(include "../../theories/Builtin.eo") | ||
(include "../../theories/Arith.eo") | ||
(include "../../theories/Datatypes.eo") | ||
|
||
; Constants for the theory of sets. | ||
; note: type rule does not check the type is set. | ||
(declare-const set.universe (-> (! Type :var T) T)) | ||
|
||
; Operators for the theory of sets. | ||
(declare-const set.complement (-> (! Type :var T :implicit) (Set T) (Set T))) | ||
(declare-const set.card (-> (! Type :var T :implicit) (Set T) Int)) | ||
|
||
; Higher-order sets operators. | ||
(declare-const set.filter (-> (! Type :var T :implicit) (-> T Bool) (Set T) (Set T))) | ||
(declare-const set.all (-> (! Type :var T :implicit) (-> T Bool) (Set T) Bool)) | ||
(declare-const set.some (-> (! Type :var T :implicit) (-> T Bool) (Set T) Bool)) | ||
(declare-const set.map (-> (! Type :var T :implicit) (! Type :var U :implicit) (-> T U) (Set T) (Set U))) | ||
(declare-const set.fold (-> (! Type :var T :implicit) (! Type :var U :implicit) (-> T U U) U (Set T) U)) | ||
|
||
; Experimental sets operators. | ||
(declare-const set.comprehension (-> (! Type :var T :implicit) @List Bool T (Set T)) :binder @list) | ||
|
||
; Relation operators. | ||
(declare-const rel.tclosure (-> (! Type :var T :implicit) (Set (Tuple T T)) (Set (Tuple T T)))) | ||
(declare-const rel.transpose (-> (! Type :var T :implicit) (Set T) (Set ($nary_reverse T)))) | ||
(declare-const rel.product (-> (! Type :var T :implicit) (! Type :var U :implicit) (Set T) (Set U) (Set (eo::list_concat Tuple T U)))) | ||
(declare-const rel.join (-> (! Type :var T :implicit) (! Type :var U :implicit) (Set T) (Set U) (Set ($nary_join Tuple UnitTuple T U)))) | ||
(declare-const rel.group (-> (! Type :var T :implicit) @List (Set T) (Set (Set T)))) | ||
|
||
; Experimental relation operators. | ||
(declare-const rel.iden (-> (! Type :var T :implicit) (Set (Tuple T)) (Set (Tuple T T)))) | ||
(declare-const rel.join_image (-> (! Type :var T :implicit) (Set (Tuple T T)) Int (Set (Tuple T)))) | ||
|
||
; Skolems for the extended theory of sets. | ||
(declare-const @relations_group_part (-> (! Type :var T :implicit) (! (Set (Set T)) :opaque) T (Set T))) | ||
(declare-const @relations_group_part_element (-> (! Type :var T :implicit) (! (Set (Set T)) :opaque) (! (Set T) :opaque) T)) | ||
|
||
; The following skolems are not yet incorporated into the signature: | ||
;SETS_CHOOSE | ||
;SETS_FOLD_CARD | ||
;SETS_FOLD_COMBINE | ||
;SETS_FOLD_ELEMENTS | ||
;SETS_FOLD_UNION | ||
;SETS_MAP_DOWN_ELEMENT |
2 changes: 1 addition & 1 deletion
2
proofs/eo/cpc/theories/Transcendentals.eo → ...eo/cpc/expert/theories/Transcendentals.eo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.