Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
0444fb2
Make the compiler name-agnostic about the primitive effects
nikswamy Aug 29, 2026
0cdb18b
Bump stage0
nikswamy Aug 29, 2026
127e66a
Generation 2: make Tot/GTot/Div primitive and desugar pre/postconditions
nikswamy Aug 29, 2026
09b2299
Do not coarsen a result type to a bare unification variable
nikswamy Aug 29, 2026
fd5f537
Remove the specification from a computation type
nikswamy Aug 29, 2026
13a568e
Rel: two fixes for squash implicits
nikswamy Aug 29, 2026
a1d49ed
Pulse: adapt to specifications living in binders and result types
nikswamy Aug 29, 2026
9c6b8e4
Do not drop an lcomp's guard in the tot/gtot fast path
nikswamy Aug 29, 2026
4cb0b96
Reflection: recover a postcondition from a result type; make apply wo…
nikswamy Aug 29, 2026
7e71460
Allow an 'ensures' on an effect abbreviation
nikswamy Aug 29, 2026
11a6f36
Overload: skip trailing implicit binders when reading a coercion's so…
nikswamy Aug 29, 2026
be436d2
Rel: solve a flex with a refined upper bound from its lower bounds
nikswamy Aug 29, 2026
39cae52
Adapt CBOR.Pulse and StringNormalization
nikswamy Aug 29, 2026
7861ace
Reflection: do not read a computation type before substituting into it
nikswamy Aug 30, 2026
7093cbb
Normalize: a singleton refinement is inhabited when its base is
nikswamy Aug 30, 2026
af0bf78
Rel: two rules for joining refined lower bounds
nikswamy Aug 30, 2026
3da6007
Tactics: adapt to specifications living in binders and result types
nikswamy Aug 30, 2026
192de71
Adapt the tactic library to specifications living in binders
nikswamy Aug 30, 2026
aec6252
Lemma's result type need not have decidable equality
nikswamy Aug 30, 2026
7e3419b
Do not unfold fixpoints when normalizing a term for printing
nikswamy Aug 30, 2026
6f73704
Restore the focus/smt scaffolding in Part5.Mapply
nikswamy Aug 30, 2026
2121025
Widen a lower bound that escapes a flex variable's scope
nikswamy Aug 30, 2026
2d70efb
Recognise a positional requires clause on a definition
nikswamy Aug 30, 2026
6ec7a0e
Fold a let body's guard into the continuation in program order
nikswamy Aug 30, 2026
02a179b
Keep primop arities and result refinements in step with preconditions
nikswamy Aug 30, 2026
a198fab
Normalizer: compute universes of types that mention local binders
nikswamy Aug 30, 2026
22ccd79
Preserve result-type precision in four places
nikswamy Aug 30, 2026
4b36e6f
Rel: require a refined lower bound before preferring lower bounds
nikswamy Aug 30, 2026
6817998
Teach Pulse.Simplify about preconditions' implicit arguments
nikswamy Aug 30, 2026
4af4e12
MApply0: do not fail when the lemma's codomain is an open term
nikswamy Aug 30, 2026
2262565
Adapt tests to specifications living in the type
nikswamy Aug 30, 2026
a7632cc
Tests: adapt bug reports and negatives to specifications living in th…
nikswamy Aug 30, 2026
71f9f1e
bind: only restate an intermediate value's refinement when the result…
nikswamy Aug 30, 2026
33d7084
Rel: a bound may mention names reached through the flex variable's su…
nikswamy Aug 30, 2026
ff2dda8
match: a common base type that is still a unification variable is sti…
nikswamy Aug 30, 2026
e103165
Tests: three files adapted to specifications living in the type
nikswamy Aug 30, 2026
202100c
bind: do not restate a unit-refinement binder twice
nikswamy Aug 30, 2026
9d9ef10
Pulse.Class.BoundedIntegers: a class method with a precondition canno…
nikswamy Aug 30, 2026
7e057e6
doc/book: give DataTypesALaCarte's rewrite_soundness a larger rlimit
nikswamy Aug 30, 2026
615e4fb
MachineInts: tolerate proof arguments on machine-integer literals
nikswamy Aug 30, 2026
090351b
extraction: tolerate proof arguments on FStar.SizeT.uint_to_t
nikswamy Aug 30, 2026
71ae0b6
Restore 'Assertion failed' for a failed proof obligation
nikswamy Aug 30, 2026
0ea363b
TcTerm: keep an annotated top-level let's refinement when generalizing
nikswamy Aug 30, 2026
debe90d
Resugar: recover preconditions, and tolerate proof arguments
nikswamy Aug 30, 2026
9d34a3c
smtencoding: don't warn about inert binders in SMT patterns; show squash
nikswamy Aug 30, 2026
dc401f3
Rel: report an implicit's obligation where the implicit was introduced
nikswamy Aug 30, 2026
682db44
tests: refresh expected outputs for the primitive-effect flip
nikswamy Aug 30, 2026
b2a0277
pulse/test: refresh expected outputs for the primitive-effect flip
nikswamy Aug 30, 2026
c76187c
Remove the expected-postcondition machinery
nikswamy Aug 30, 2026
7fe801c
Collapse Total/GTotal into Comp, and fix the regressions that surfaced
nikswamy Aug 30, 2026
1c902fa
Pin down the effect boundaries, and rewrite PR.md
nikswamy Aug 30, 2026
dd91007
PR.md: record the ulib solver-time measurement
nikswamy Aug 30, 2026
2b5fb35
Revert the library workarounds that later fixes made unnecessary
nikswamy Aug 30, 2026
220b8c7
Sweep every non-compiler change: revert what the later fixes made unn…
nikswamy Aug 30, 2026
32f17d3
Remove the MLEFFECT cflag, and narrow TOTAL to its one real job
nikswamy Aug 30, 2026
94a3f33
Remove comp_univs from comp_typ
nikswamy Aug 31, 2026
4e48fcd
Remove TypeChecker.Common.lcomp; work with comp everywhere
nikswamy Aug 31, 2026
48fe004
Tidy up three leftovers from the primitive-effect flip
nikswamy Aug 31, 2026
fc8dbb0
Do not let a plugin's failed reduction corrupt the term
nikswamy Aug 31, 2026
ac27706
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Aug 31, 2026
14351b8
Contain a matching loop in FStar.Rational.Gcd
nikswamy Aug 31, 2026
8b19adb
Route every Tot/GTot test through a Parser.Const predicate
nikswamy Aug 31, 2026
f313167
Rebuild a native tactic's .cmxs when the compiler changes
nikswamy Aug 31, 2026
bc8ea95
Drop the last traces of the lcomp type
nikswamy Aug 31, 2026
ab570a4
Remove the effect attributes syntax
nikswamy Sep 1, 2026
9e199f0
Let ToSyntax infer the element type of a Construct's arguments again
nikswamy Sep 1, 2026
7c9426d
Sort a computation type's arguments in one place
nikswamy Sep 1, 2026
e49dd59
Declare a lift between effects, not between abbreviations of them
nikswamy Sep 1, 2026
8f70eb8
Recover an escaping variable's refinement instead of dropping it
nikswamy Sep 1, 2026
f9c5414
Build a computation type with mk_Comp, not mk_triv_comp
nikswamy Sep 1, 2026
691d7c8
Give has_type its real universes
nikswamy Sep 1, 2026
5f60b4c
Don't record a specification in a monadic annotation
nikswamy Sep 1, 2026
184fa1a
a couple of cosmetic changes
nikswamy Sep 2, 2026
84a7fd4
Finish the rename of strengthen_precondition
nikswamy Sep 2, 2026
d62b4d6
Break bind_maybe_capture into single-purpose functions
nikswamy Sep 2, 2026
42f039a
Never substitute an impure term into a type
nikswamy Sep 2, 2026
3557bce
Never put a let rec-bound name in a refinement
nikswamy Sep 2, 2026
4c65f00
cosmetic change: rename close_wp_comp
nikswamy Sep 2, 2026
f8a8e05
Drop the optimize_let_vc knob and the layered-effect cases in bind
nikswamy Sep 2, 2026
4c798eb
Consolidate escape checking: move check_no_escape into TypeChecker.Util
nikswamy Sep 2, 2026
73a16ba
more cosmetic changes
nikswamy Sep 2, 2026
dd28947
Make an effect abbreviation a bare alias, resolved by the desugarer
nikswamy Sep 3, 2026
c542695
Take a total effect's universe from its representation, not its resul…
nikswamy Sep 3, 2026
425ac05
Rel: joining refinements must not compare universes by uvar identity
nikswamy Sep 3, 2026
4cdd477
Core: tolerate a `let` whose type annotation was never elaborated
nikswamy Sep 3, 2026
0a22cb2
A `let rec` returning a function must not lose its `ensures`
nikswamy Sep 3, 2026
5032796
Subtyping must eta-expand across an arity mismatch
nikswamy Sep 3, 2026
cc98680
PR.md: record the EverParse regression run and its findings
nikswamy Sep 3, 2026
745e2d5
PR.md: correct the squash-binder account and add two churn classes
nikswamy Sep 4, 2026
535db78
Extraction: find a spec binder hidden in a result-type abbreviation
nikswamy Sep 4, 2026
248e04c
PR.md: record the extraction bug and the last two EverParse findings
nikswamy Sep 4, 2026
b248c5c
Rel: two ways a refined bound was lost when solving a flex variable
nikswamy Sep 4, 2026
3fe2b97
Rel: only widen joined lower bounds when the bases were already equal
nikswamy Sep 4, 2026
b224f6c
Rel: don't defer a meta arg because of single-valued squash implicits
nikswamy Sep 4, 2026
a74e1b8
Core: relate two squashed propositions by implication, not equality
nikswamy Sep 4, 2026
719dc9f
Rel: relate two squashed propositions by implication, not equality
nikswamy Sep 4, 2026
8e8abd9
Pulse test: a let inside a Lemma-typed binder's ensures
nikswamy Sep 4, 2026
39fe0c6
PR.md: the kuiper regression campaign, and an answer on is_spec_binder
nikswamy Sep 4, 2026
105ef35
PR.md: audit the downstream kuiper changes, and remove two rlimit bumps
nikswamy Sep 5, 2026
f76074a
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 5, 2026
1141524
Deduplicate VC conjuncts; fix merge fallout from the new prop encoding
nikswamy Sep 5, 2026
8c7fec3
PR.md: record the post-merge EverParse and kuiper regression campaign
nikswamy Sep 5, 2026
4602849
Rel: ignore uvars in implicit positions when relating squashed propos…
nikswamy Sep 5, 2026
6a5d749
Util: eta-expansion across a missing 'requires' binder
nikswamy Sep 5, 2026
b170dde
pulse lib: stabilize two proofs that were sensitive to gensym numbering
nikswamy Sep 5, 2026
516be90
Rel: only interpreted heads make an implicit-position uvar ignorable
nikswamy Sep 6, 2026
91f8416
Record the pulse-verified-gc regression run; refresh a gensym-sensiti…
nikswamy Sep 6, 2026
9206a55
Rel: do not build a trivial 'forall x. phi ==> True' subtyping guard
nikswamy Sep 6, 2026
d209ae1
Quicksort.Base: name the index witness instead of retrying ten times
nikswamy Sep 6, 2026
02d90ec
PR.md: record the two benchmark outliers and their fixes
nikswamy Sep 6, 2026
1e59c69
Rel: confine the trivial-guard short-circuit to the implication case
nikswamy Sep 8, 2026
463c161
PR.md: cover the five commits it was missing, and correct what they i…
nikswamy Sep 8, 2026
d5269a8
PR.md: say plainly that TOTAL is gone from cflag
nikswamy Sep 8, 2026
5209ef1
PR.md: refresh the diffstat in the header
nikswamy Sep 8, 2026
afcdb52
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 10, 2026
bb84a82
PR.md: describe the merge of master's NDET effect
nikswamy Sep 10, 2026
7a878e1
PR.md: state what was re-verified after the NDET merge, and what was not
nikswamy Sep 10, 2026
94d62a5
PR.md: refresh the header diffstat
nikswamy Sep 10, 2026
34039b1
PR.md: re-measure Bug3800 after the NDET merge
nikswamy Sep 10, 2026
ce637b8
PR.md: refresh the header diffstat
nikswamy Sep 10, 2026
e042bd2
Rel: don't unfold to decide an equation whose heads already agree
nikswamy Sep 11, 2026
a85fe35
PR.md: document the TestBV outlier and the Rel fix
nikswamy Sep 11, 2026
ece1b50
PR.md: refresh the header diffstat
nikswamy Sep 11, 2026
1164a86
Revert "Rel: don't unfold to decide an equation whose heads already a…
nikswamy Sep 11, 2026
88bba86
PR.md: record the withdrawn TestBV fix and the three clean downstream…
nikswamy Sep 11, 2026
1ee7326
PR.md: refresh the header diffstat
nikswamy Sep 11, 2026
a7f1911
PR.md: refresh the header diffstat
nikswamy Sep 11, 2026
fa6b4dd
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 17, 2026
170515a
Restrict inspect_pack_comp_inv to the views that round trip
nikswamy Sep 17, 2026
12f4861
Extraction: instantiate the head's type before looking for spec args
nikswamy Sep 17, 2026
aebf8f7
Tactics: a guard's obligation goes behind the current goal, not in front
nikswamy Sep 17, 2026
3401868
Keep a trailing squash binder that the specification still mentions
nikswamy Sep 17, 2026
14d7179
Check a postcondition's binder annotation
nikswamy Sep 17, 2026
1f483b0
Resolve a requires clause's name before calling it trivial
nikswamy Sep 17, 2026
8ed8cdb
Rel: normalize an opened arrow's codomain in the opened scope
nikswamy Sep 17, 2026
4ee70f9
PR.md: document the seven review findings
nikswamy Sep 17, 2026
4d85d83
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 17, 2026
aa5625b
Reflection: make comp_view mirror comp_typ
nikswamy Sep 18, 2026
8473196
Pulse: a comp's flags are terms, so free_named_vars must visit them
nikswamy Sep 18, 2026
493c705
Recognize a lemma with SMT patterns from its structure, not its spelling
nikswamy Sep 18, 2026
201c9a4
Examples: two comments still named C_Total
nikswamy Sep 18, 2026
6fe517f
Docs: one reference for the simplified effect system
nikswamy Sep 18, 2026
26a7516
Docs: measure the TestBV regression from a clean slate
nikswamy Sep 18, 2026
40721c0
Rel: scope the equation-deciding normalisation in [equal]
nikswamy Sep 18, 2026
915dac1
Docs: why the try_eq fallback in same_formula was kept
nikswamy Sep 18, 2026
8b02685
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 18, 2026
d27b625
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 18, 2026
a611de4
Custard: an effect abbreviation is a bare alias
nikswamy Sep 19, 2026
1317101
Custard: a comp carries no specification
nikswamy Sep 19, 2026
355d16c
Custard: a precondition's squash binder is not a thunk
nikswamy Sep 19, 2026
85b5910
Custard: a rule outranks the erasability shortcut
nikswamy Sep 19, 2026
f983322
Custard: a rule's spine filter and its arity check read one list
nikswamy Sep 19, 2026
6c8984a
Custard: a binder kept for arity is not an argument to a rule
nikswamy Sep 19, 2026
4c18835
Custard: a template argument is not the last argument
nikswamy Sep 19, 2026
fcd6ab0
Custard: () is not a name
nikswamy Sep 19, 2026
1571197
tests/custard: a sub_effect names a root effect
nikswamy Sep 19, 2026
8936079
Docs: how the revised effect system reaches the Custard backend
nikswamy Sep 19, 2026
b5e9626
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 19, 2026
ece399a
Merge remote-tracking branch 'origin/master' into _revise_primitive_e…
nikswamy Sep 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 5 additions & 7 deletions doc/book/PoP-in-FStar/book/part5/part5_meta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,11 @@ goals.
In the following simplified example, we are looking to prove ``s``
from ``p`` given some lemmas. The first thing we do is apply the
``qr_s`` lemma, which gives us two subgoals, for ``q`` and ``r``
respectively. We then need to proceed to solve the first goal for
``q``. In order to isolate the proofs of both goals, we can ``focus``
on the current goal making all others temporarily invisible. To prove
``q``, we then just use the ``p_r`` lemma and obtain a subgoal for
``p``. This one we will just just leave to the SMT solver, hence we
call ``smt()`` to move it to the list of SMT goals. We prove ``r``
similarly, using ``p_r``.
respectively. We then proceed to solve the first goal for ``q`` using
the ``p_q`` lemma, and the second one for ``r`` using ``p_r``. The
precondition ``p`` of each of these lemmas is an implicit argument, so
it is left to the SMT solver, just as it would be at an ordinary call
site.

.. literalinclude:: ../code/Part5.Mapply.fst
:language: fstar
Expand Down
4 changes: 3 additions & 1 deletion doc/book/code/Alex.fst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ val f : (f:(nat -> int){unbounded f})

let g : (nat -> int) = fun x -> f (x+1)

#push-options "--fuel 0 --ifuel 0 --z3smtopt '(set-option :smt.qi.eager_threshold 2)'"
(* eager_threshold 3, not 2: [unbounded]'s quantifier now needs one more round
of eager instantiation to reach the goal. *)
#push-options "--fuel 0 --ifuel 0 --z3smtopt '(set-option :smt.qi.eager_threshold 3)'"
let find_above_for_g (m:nat) : Lemma(exists (i:nat). abs(g i) > m) =
assert (unbounded f); // apply forall to m
eliminate exists (n:nat). abs(f n) > m
Expand Down
5 changes: 5 additions & 0 deletions doc/book/code/Part3.DataTypesALaCarte.fst
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,10 @@ let ex6' = ex5'_l +^ ex5'_r
let test56 = assert_norm (rewrite_distr () ex6 == ex6')
//SNIPPET_END: rewrite_test$

(* The `Add` branch's obligation sits just above this file's default budget
(it needs ~24 rlimit units of the 20 that `--z3rlimit_factor 4` buys).
Kept outside the snippet markers so the book text is unaffected. *)
#push-options "--z3rlimit_factor 8"
//SNIPPET_START: rewrite_soundness$
let rec rewrite_soundness
(x:expr (value ++ add ++ mul))
Expand All @@ -460,6 +464,7 @@ let rec rewrite_soundness
rewrite_soundness a l; rewrite_soundness b l;
l.soundness()
//SNIPPET_END: rewrite_soundness$
#pop-options

//SNIPPET_START: rewrite_distr_soundness$
let rewrite_distr_soundness
Expand Down
Loading
Loading