Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
942c839
wip; towards universe-indexed terms in SMT
nikswamy Jun 26, 2020
fa78f35
wip; adding universes to the encoding of prims
nikswamy Aug 21, 2020
5c3238a
wip
nikswamy Aug 23, 2020
9ca6fd8
prims nearly verifies again, though with one universe encoding error
nikswamy Aug 25, 2020
1ef3703
closing over universes
nikswamy Dec 4, 2020
512eede
wip, with universes up to pervasives
nikswamy Dec 9, 2020
9254f27
WIP, about 76 ulib modules go through
nikswamy Dec 14, 2020
c87c8bc
tweaks to SMT definition if u_max. around 116 modules verify in ulib
nikswamy Dec 15, 2020
635a541
tighthening some quantifiers emitted for Sig_assumption. perf improve…
nikswamy Dec 15, 2020
fd889fa
Compile Pervasives.
gebner Dec 28, 2024
0c7232e
Comment out debugging code.
gebner Dec 28, 2024
736fb52
Fix negation.
gebner Dec 29, 2024
541ba56
Fix.
gebner Dec 31, 2024
17dfcf0
Improve error message.
gebner Dec 30, 2024
04b0ec5
push univ vars in the context before checking top-level VC, important…
nikswamy Jan 7, 2025
ae2e80b
Fix universal closure over universe variables.
gebner Jan 7, 2025
e877faf
Generate base construtors for inductives with univ params.
gebner Jan 7, 2025
0adbae1
Typo.
gebner Jan 7, 2025
cde1ed8
add universe field projectors and strenghten inversion axiom with equ…
nikswamy Jan 7, 2025
1cae1a2
fix order of universe application and fuel instrumentation (hacky)
nikswamy Jan 8, 2025
3f30528
weaken condition for permuting fuel and universe application---to rev…
nikswamy Jan 8, 2025
9103569
add universe variables into environment for top-level let recs
nikswamy Jan 8, 2025
8ea835f
explicit about universe instantiations in FStar.Sequence.Base
nikswamy Jan 8, 2025
8b418ab
revise triggering of universe-polymorphic function tokens, as shown i…
nikswamy Jan 8, 2025
51b4bbf
explicit universe instantiation in lemma
nikswamy Jan 8, 2025
8cfb2d0
bump rlimit
nikswamy Jan 8, 2025
c9d2756
push universes when checking an effect declaration
nikswamy Jan 8, 2025
c45a634
do not create spurious nullary Tm_uinst nodes
nikswamy Jan 8, 2025
cbeebac
explicit universe instantiations in lemma invocations of FStar.Sequen…
nikswamy Jan 8, 2025
ef3cf0c
revise all_seq_facts_ambient, so that it properly triggers with unive…
nikswamy Jan 8, 2025
fa9f1b1
FStar.FiniteMap --- universe polymorphism and ambient lemmas
nikswamy Jan 8, 2025
82f1e0e
universe equalities on inversions for all data types
nikswamy Jan 8, 2025
5e4c245
fix spurious double universe polymorphism in legacy Matrix2
nikswamy Jan 8, 2025
2a62adf
bump rlimit in FStar.Tactics.Typeclasses
nikswamy Jan 8, 2025
9447c3b
fix a brittle modular arithmetic proof in FStar.Euclid
nikswamy Jan 9, 2025
be03e58
track universe arities in SMT encoding and use it for more direct han…
nikswamy Jan 9, 2025
3e4663a
retain partial app triggering for non-universe polymorphic tokens
nikswamy Jan 9, 2025
4993bcf
remove needless additional generalization in inner lemma of FStar.Fun…
nikswamy Jan 9, 2025
f49b323
remove unused universe polymorphism in the interface for FStar.Monoto…
nikswamy Jan 9, 2025
7809cf9
explicit about universes in assertions of FStar.Cardinality.Universes…
nikswamy Jan 9, 2025
65d07ba
explicit about universes in assertions of FStar.WellFoundedRelation
nikswamy Jan 9, 2025
585f4e9
universe levels are non-negative
nikswamy Jan 10, 2025
feb5b05
make a Seq lemma universe-polymorphic and use it in LowStar.Monotonic…
nikswamy Jan 10, 2025
f4d3011
use context pruning and many restart-solvers and other proof stabiliz…
nikswamy Jan 10, 2025
195ed8a
restore context pruning for ToFStarBuffer
nikswamy Jan 10, 2025
2f76cb1
Fix build_let_rec_env: do not push duplicate universe binders in the …
nikswamy Jan 10, 2025
c03dfcf
encode reifiable actions with universe binders
nikswamy Jan 10, 2025
de055ae
before rebasing
nikswamy Jan 10, 2025
c8d08cb
no default includes in FStar.Compiler.fst.json (thanks @mtzguido)
nikswamy Jan 11, 2025
ff16b6e
add universe arguments to Prims.precedes in SMT encoding
nikswamy Jan 11, 2025
e8a1ba2
set universe to zero in mk_subtype_of_unit
nikswamy Jan 11, 2025
93dba77
avoid awful name clash in projector naming scheme
nikswamy Jan 11, 2025
da8c0a1
restore Bug2069 test case, with a universe-polymorphic version of WF.…
nikswamy Jan 11, 2025
e0d07a2
update expected output for error messages (changed ranges and gensyms)
nikswamy Jan 13, 2025
9fee831
Add (HasType (Tm_type u) (Tm_type (U_succ u)))
nikswamy Jan 13, 2025
3b77d08
fix typo
nikswamy Jan 13, 2025
2e3480e
tweaks to restore some tests
nikswamy Jan 13, 2025
02480e1
restore many examples, mainly in layered efffects, needing explicit u…
nikswamy Jan 14, 2025
78a67a0
removing admit in ModifiesGen; narrowing admit in Bug3120a
nikswamy Jan 25, 2025
cd692e8
remove admit in Bug3120a
nikswamy Jan 25, 2025
4879e42
merge master in
nikswamy Jan 25, 2025
870f277
fix merge in EncodeTerm.fsti; tweak rlimit
nikswamy Jan 25, 2025
34a7559
stabilize some examples, update expected error output
nikswamy Jan 28, 2025
5d6a219
Merge remote-tracking branch 'origin/master' into nik_smt_univs_2025
gebner Mar 19, 2025
e1524cb
Merge remote-tracking branch 'origin/master' into nik_smt_univs_2025
gebner Mar 31, 2025
e605d84
Fix some tests.
gebner Mar 31, 2025
4996386
Add showable instance for smt sorts.
gebner Mar 31, 2025
28acd46
remove_dups: preserve order
gebner Apr 1, 2025
38b96e7
Fix incorrect hash-consing for tm_arrow
gebner Apr 1, 2025
cf12fc4
Fix tests.
gebner Apr 1, 2025
8d4fe9e
merging in master
nikswamy Jun 25, 2025
3e57470
restore make test
nikswamy Jun 25, 2025
f3a2732
Merge remote-tracking branch 'origin/master' into nik_smt_univs_2025
gebner Jul 14, 2025
837cfb5
merging in master; restoring CI build
nikswamy Sep 16, 2025
1c76857
bump
nikswamy Sep 16, 2025
91ce50d
merging in master
nikswamy Sep 23, 2025
92c9197
update expected output
nikswamy Sep 24, 2025
9dd6560
Merge remote-tracking branch 'origin/master' into nik_smt_univs_2025
nikswamy Sep 26, 2025
de72860
fix a bug in term_eq, incorrectly removing universes
nikswamy Oct 2, 2025
d0b6cbc
Merge remote-tracking branch 'origin/master' into nik_smt_univs_2025
nikswamy Oct 2, 2025
2597124
fixup LowStar.Monotonic.Buffer.fst
nikswamy Oct 2, 2025
1e97045
fixup some test cases
nikswamy Oct 2, 2025
b071d85
Merge branch 'master' into nik_smt_univs_2025
nikswamy Oct 3, 2025
6ad5110
Merge branch 'master' into nik_smt_univs_2025
nikswamy Oct 4, 2025
fe95f59
enable proof_recovery in check-friends; point check-friends to a spec…
nikswamy Oct 5, 2025
7b44b90
Adding Z3 4.15.3 to the shipped versions
mtzguido Sep 26, 2025
3d8e0d8
try enable proof_recovery via OTHERFLAGS in check-friends
nikswamy Oct 5, 2025
baf6c3f
checkout branch using ref
nikswamy Oct 6, 2025
8ddebf5
Merge remote-tracking branch 'origin/master' into nik_smt_univs_2025
nikswamy Oct 6, 2025
5dbaf88
Merge branch 'master' into nik_smt_univs_2025
nikswamy Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/check-friends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- name: Checkout karamel
uses: actions/checkout@master
Expand Down Expand Up @@ -61,6 +62,8 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV


# krml test needs node
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -89,6 +92,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- name: Checkout steel
uses: actions/checkout@master
Expand Down Expand Up @@ -121,6 +125,8 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV


- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -150,6 +156,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -182,6 +189,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- name: Build (after setting up cargo env)
run: . $HOME/.cargo/env && make -C pulse -skj$(nproc)
Expand All @@ -208,6 +216,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -243,6 +252,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -284,6 +294,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -323,6 +334,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand All @@ -347,6 +359,7 @@ jobs:
uses: actions/checkout@master
with:
path: everparse/
ref: _nik_smt_univs_2025
repository: project-everest/everparse

- name: Build
Expand Down Expand Up @@ -378,6 +391,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -424,6 +438,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -463,6 +478,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -497,6 +513,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -540,6 +557,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -578,6 +596,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -621,6 +640,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: mtzguido/gci-download@master
with:
Expand Down Expand Up @@ -654,6 +674,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- name: Checkout steel
uses: actions/checkout@master
Expand Down Expand Up @@ -687,6 +708,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: actions/checkout@master
with:
Expand All @@ -712,6 +734,7 @@ jobs:
name: fstar.tar.gz
- run: tar -xzf fstar.tar.gz
- run: echo "FSTAR_EXE=$(pwd)/fstar/bin/fstar.exe" >> $GITHUB_ENV
- run: echo "OTHERFLAGS=--proof_recovery" >> $GITHUB_ENV

- uses: actions/checkout@master
with:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ test-1: override FSTAR_EXE := $(abspath stage1/out/bin/fstar.exe)
test-1: stage1
$(MAKE) _test FSTAR_EXE=$(FSTAR_EXE)

_unit-tests-1: override FSTAR_EXE := $(abspath stage1/out/bin/fstar.exe)
_unit-tests-1: stage1
$(MAKE) _unit-tests FSTAR_EXE=$(FSTAR_EXE)

test-2: override FSTAR_EXE := $(abspath stage2/out/bin/fstar.exe)
test-2: stage2
$(MAKE) _test FSTAR_EXE=$(FSTAR_EXE)
Expand Down
10 changes: 7 additions & 3 deletions examples/algorithms/BinarySearch.fst
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ let hint1 y a = ()
val hint2 : t:(seq int) -> a:int -> mid:int
-> Lemma
(requires
(forall i1 i2. (0 <= i1) ==> (i1 <= i2) ==> (i2 < length t) ==> (index t i1 <= index t i2)) /\
(forall i1 i2.
{:pattern index t i1; index t i2}
(0 <= i1) ==> (i1 <= i2) ==> (i2 < length t) ==> (index t i1 <= index t i2)) /\
(0 <= mid) /\
(mid < length t) /\
(index t mid < a))
(ensures
(forall p. (((0 <= p) /\ (p < length t) /\ (index t p = a) /\ (p <= mid)) ==> False)))
let hint2 t a mid = hint1 (index t mid) a
let hint2 t a mid = ()

val hint3 : y:int -> a:int -> Lemma
(requires True)
Expand All @@ -122,7 +124,9 @@ let hint3 y a = ()
val hint4 : t:(seq int) -> a:int -> mid:int
-> Lemma
(requires
(forall i1 i2. (0 <= i1) ==> (i1 <= i2) ==> (i2 < length t) ==> (index t i1 <= index t i2)) /\
(forall i1 i2.
{:pattern index t i1; index t i2}
(0 <= i1) ==> (i1 <= i2) ==> (i2 < length t) ==> (index t i1 <= index t i2)) /\
(0 <= mid) /\
(mid < length t) /\
(a < index t mid))
Expand Down
2 changes: 1 addition & 1 deletion examples/crypto/Sig.fst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type sk = lbytes sksize

assume val fdh_rsa: sk -> text -> Tot sig_t

assume new type key_prop : pk -> text -> Type
assume val key_prop : pk -> text -> Type0
type prop_pk (p:(text -> Type)) = k:pk{key_prop k == p}

assume val sk_to_pk : sk -> Tot pk
Expand Down
7 changes: 4 additions & 3 deletions examples/data_structures/BinaryTreesEnumeration.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,17 @@ let memP_concatMap_intro #a #b (x: a) (y: b) (f:a -> list b) (l: list a) :
can I get rid of them without cluttering the rest of the proof with many
copies of the same function? Can I infer them by unifying with the
current “goal”? *)
let product_complete (#a #b: Type) (l1: list a) (l2: list b) x1 x2 :
module T = FStar.Tactics
let product_complete (#a:Type u#a) (#b: Type u#b) (l1: list a) (l2: list b) x1 x2 :
Lemma (List.memP x1 l1 ==>
List.memP x2 l2 ==>
List.memP (x1, x2) (product #a l1 l2)) =
let x = (x1, x2) in
let unfold f2 x1 = fun x2 -> (x1, x2) in
let f1 = fun x1 -> List.Tot.map (f2 x1) l2 in
let unfold f1 = fun x1 -> List.Tot.map (f2 x1) l2 in
let l = f1 x1 in
let ls = List.Tot.map f1 l1 in
assert (product l1 l2 == List.Tot.concatMap f1 l1);
assert (product l1 l2 == List.Tot.concatMap f1 l1) by (T.trefl());

memP_map_intro (f2 x1) x2 l2
<: Lemma (List.memP x2 l2 ==> List.memP x l);
Expand Down
4 changes: 2 additions & 2 deletions examples/data_structures/LowStar.Lens.Buffer.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ val mk (#a:_) (#p:_) (#q:_) (b:B.mbuffer a p q) (f:flavor b) (snap:HS.mem{B.live
: Tot (l:buffer_lens b f{(lens_of l).snapshot == snap})

/// `elim_inv`: Revealing the abstract invariant of buffer lenses
val elim_inv (#a:_) (#p:_) (#q:_)
val elim_inv (#a:Type) (#p:_) (#q:_)
(#b:B.mbuffer a p q)
(#f:flavor b)
(bl:buffer_lens b f)
: Lemma (reveal_inv();
: Lemma (reveal_inv u#0 u#0 ();
(forall (h:HS.mem).{:pattern (lens_of bl).invariant (lens_of bl).x h}
let l = lens_of bl in
(exists h'.{:pattern mk b f h'} B.live h' b /\ bl == mk b f h') /\
Expand Down
2 changes: 1 addition & 1 deletion examples/data_structures/LowStar.Lens.Tuple2.fst
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ let elim_tup2_inv
(bl1:LB.buffer_lens b1 f1)
(bl2:LB.buffer_lens b2 f2{composable (LB.lens_of bl1) (LB.lens_of bl2)})
: Lemma (let t = mk_tup2 bl1 bl2 in
reveal_inv();
reveal_inv u#0 u#0 ();
(forall h. {:pattern inv (lens_of t) h}
inv (lens_of t) h ==>
(LB.lens_of bl1).invariant b1 h /\
Expand Down
2 changes: 1 addition & 1 deletion examples/data_structures/LowStar.Lens.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ effect LensST (a:Type)

/// `reveal_inv`: Revealing the abstract invariant
val reveal_inv (_:unit)
: Lemma ((forall #a #b (l:hs_lens a b) h. {:pattern inv l h}
: Lemma ((forall (#a:Type u#a) (#b:Type u#b) (l:hs_lens a b) h. {:pattern inv l h}
inv l h <==>
(l.invariant l.x h /\
B.modifies (as_loc l.footprint) l.snapshot h /\
Expand Down
1 change: 1 addition & 0 deletions examples/data_structures/RBTreeIntrinsic.fst
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ val balanceLB_preserves_sort : #h:nat -> #c:color -> a:almostNode h -> x:int ->
(requires almostNode_sorted a /\ sorted b /\ chain (almostNode_max a) x (min b))
(ensures hiddenTree_sorted (balanceLB a x b))
let balanceLB_preserves_sort #h #c left z d = ()
#restart-solver

val balanceRB_preserves_sort : #h:nat -> #c:color -> a:rbnode h c -> x:int -> b:almostNode h ->
Lemma
Expand Down
6 changes: 3 additions & 3 deletions examples/doublylinkedlist/DoublyLinkedList.fst
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ let lemma_dll_links_contained (#t:Type) (h0:heap) (d:dll t) (i:nat) :
lemma_unsnoc_is_last nl

#set-options "--z3rlimit 10 --initial_ifuel 2"

#restart-solver
let lemma_dll_links_disjoint (#t:Type) (h0:heap) (d:dll t) (i:nat) :
Lemma
(requires (
Expand Down Expand Up @@ -1964,8 +1964,8 @@ let dll_append (#t:Type) (d1 d2:dll t) :

#reset-options

#set-options "--z3rlimit 60 --max_fuel 2 --max_ifuel 1"

#set-options "--z3rlimit 200 --max_fuel 2 --max_ifuel 1 --query_stats --split_queries no --z3smtopt '(set-option :smt.qi.eager_threshold 5)'"
#restart-solver
let dll_split_using (#t:Type) (d:dll t) (e:pointer (node t)) :
StackInline (dll t * dll t)
(requires (fun h0 ->
Expand Down
4 changes: 2 additions & 2 deletions examples/doublylinkedlist/DoublyLinkedListIface.fst
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ let dll_insert_at_tail #t d n =
#reset-options

#set-options "--z3rlimit 80 --max_fuel 2 --max_ifuel 1"

#push-options "--z3rlimit_factor 4"
let dll_insert_before #t n' d n =
let h00 = HST.get () in
HST.push_frame ();
Expand Down Expand Up @@ -693,7 +693,7 @@ let dll_insert_before #t n' d n =
// assert (as_payload_list h11 d == l_insert_before'
// (as_list h00 d `L.index_of` n') (as_payload_list h00 d) (g_node_val h00 n));
()

#pop-options
#reset-options

#set-options "--z3rlimit 80 --max_fuel 2 --max_ifuel 1"
Expand Down
15 changes: 12 additions & 3 deletions examples/dsls/bool_refinement/BoolRefinement.fst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ module R = FStar.Reflection.V2
module L = FStar.List.Tot
open FStar.List.Tot

#set-options "--z3cliopt 'smt.qi.eager_threshold=100' --z3cliopt 'smt.arith.nl=false'"

#set-options "--z3smtopt '(set-option :smt.qi.eager_threshold 20)' --z3smtopt '(set-option :smt.arith.nl false)'"
let var = nat
let index = nat

Expand Down Expand Up @@ -126,6 +125,7 @@ let rec close_exp' (e:src_exp) (v:var) (n:nat)

let open_exp e v = open_exp' e v 0
let close_exp e v = close_exp' e v 0
#restart-solver

let rec open_close' (e:src_exp) (x:var) (n:nat { ln' e (n - 1) })
: Lemma (open_exp' (close_exp' e x n) x n == e)
Expand Down Expand Up @@ -607,6 +607,7 @@ let rec extend_env_l_lookup_bvar (g:R.env) (sg:src_env) (x:var)

//key lemma about src types: Their elaborations are closed
#push-options "--z3rlimit_factor 4 --fuel 8 --ifuel 2"
#restart-solver
let rec src_refinements_are_closed_core
(n:nat)
(e:src_exp {ln' e (n - 1) && closed e})
Expand Down Expand Up @@ -1146,7 +1147,8 @@ let rec src_typing_freevars #f (sg:src_env) (e:src_exp) (t:s_ty) (d:src_typing f
src_typing_freevars _ _ _ dbody
#pop-options

#push-options "--z3rlimit_factor 4"
#push-options "--z3rlimit_factor 8 --query_stats --split_queries no --fuel 2 --ifuel 2"
#restart-solver
let rec src_typing_renaming (#f:RT.fstar_top_env)
(sg sg':src_env)
(x:var { None? (lookup sg x) && None? (lookup sg' x) })
Expand Down Expand Up @@ -1259,6 +1261,7 @@ let rec src_typing_renaming (#f:RT.fstar_top_env)
in
let dt = src_ty_ok_renaming _ _ _ _ _ _ dt in
T_If _ _ _ _ _ _ _ _ db dt1 dt2 st1 st2 dt
#pop-options

let sub_typing_weakening #f (sg sg':src_env)
(x:var { None? (lookup sg x) && None? (lookup sg' x) })
Expand Down Expand Up @@ -1323,6 +1326,8 @@ let sub_typing_weakening #f (sg sg':src_env)

| _ -> admit ())

#push-options "--z3rlimit_factor 8 --query_stats --split_queries no --fuel 2 --ifuel 2"
#restart-solver
let rec src_typing_weakening #f (sg sg':src_env)
(x:var { None? (lookup sg x) && None? (lookup sg' x) })
(b:binding)
Expand Down Expand Up @@ -1518,6 +1523,8 @@ let freevars_refinement (e:R.term) (bv0:_)
= ()
#pop-options

#push-options "--z3rlimit_factor 8 --query_stats --split_queries no --fuel 2 --ifuel 2"
#restart-solver
let rec soundness (#f:RT.fstar_top_env)
(#sg:src_env { src_env_ok sg } )
(#se:src_exp { ln se })
Expand Down Expand Up @@ -1673,7 +1680,9 @@ and src_ty_ok_soundness (#f:RT.fstar_top_env)
in
freevars_refinement (elab_exp e) bv0;
RT.T_Refine (extend_env_l f sg) x RT.bool_ty refinement' _ _ _ _ bool_typing dr
#pop-options

#restart-solver
let soundness_lemma (f:RT.fstar_top_env)
(sg:src_env { src_env_ok sg })
(se:src_exp { ln se })
Expand Down
Loading
Loading