Skip to content

Commit 914f926

Browse files
committed
fix some universes to 0
needed because GenElim in FStarLang/FStar#2349 now accepts universe 1
1 parent 5761ad5 commit 914f926

7 files changed

+44
-29
lines changed

Diff for: src/lowparse/LowParse.SteelST.Access.fst

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ let ghost_peek_strong
219219
inline_for_extraction
220220
let peek_strong_with_size
221221
(#k: Ghost.erased parser_kind)
222-
(#t: Type)
222+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
223223
(#va: AP.v byte)
224224
(p: parser k t)
225225
(a: byte_array)

Diff for: src/lowparse/LowParse.SteelST.Combinators.fst

+19-15
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ let jump_pair
163163

164164
let g_split_pair
165165
#opened
166-
#k1 #t1 (p1: parser k1 t1)
166+
#k1 (#t1: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
167+
(p1: parser k1 t1)
167168
#k2 #t2 (p2: parser k2 t2)
168169
#y (a: byte_array)
169170
: STGhost (Ghost.erased (byte_array)) opened
@@ -209,7 +210,8 @@ let split_pair'
209210
inline_for_extraction
210211
let split_pair
211212
(#k1: Ghost.erased parser_kind) #t1 (#p1: parser k1 t1) (j1: jumper p1)
212-
(#k2: Ghost.erased parser_kind) #t2 (p2: parser k2 t2)
213+
(#k2: Ghost.erased parser_kind) (#t2: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
214+
(p2: parser k2 t2)
213215
#y (a: byte_array)
214216
: ST (byte_array)
215217
(aparse (p1 `nondep_then` p2) a y)
@@ -269,7 +271,8 @@ let clens_fst
269271
inline_for_extraction
270272
let with_pair_fst
271273
(#k1: Ghost.erased parser_kind) #t1 (p1: parser k1 t1)
272-
(#k2: Ghost.erased parser_kind) #t2 (p2: parser k2 t2)
274+
(#k2: Ghost.erased parser_kind) (#t2: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
275+
(p2: parser k2 t2)
273276
: Pure (accessor (p1 `nondep_then` p2) p1 (clens_fst _ _))
274277
(k1.parser_kind_subkind == Some ParserStrong)
275278
(fun _ -> True)
@@ -405,7 +408,7 @@ let read_synth'
405408
inline_for_extraction
406409
let write_synth
407410
(#k: parser_kind)
408-
(#t1: Type)
411+
(#t1: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
409412
(#p: parser k t1)
410413
(#s: serializer p)
411414
(w: writer s)
@@ -505,7 +508,8 @@ let jump_fail
505508

506509
inline_for_extraction
507510
let validate_filter
508-
(#k: Ghost.erased parser_kind) #t (#p: parser k t) (v: validator p) (r: leaf_reader p)
511+
(#k: Ghost.erased parser_kind) (#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
512+
(#p: parser k t) (v: validator p) (r: leaf_reader p)
509513
(f: t -> GTot bool)
510514
(f' : ((x: t) -> Tot (y: bool { y == f x } )))
511515
: Pure (validator (p `parse_filter` f))
@@ -603,7 +607,7 @@ let read_filter
603607
inline_for_extraction
604608
let write_filter
605609
(#k: parser_kind)
606-
(#t: Type)
610+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
607611
(#p: parser k t)
608612
(#s: serializer p)
609613
(w: writer s)
@@ -743,7 +747,7 @@ let exists_and_then_payload
743747
let ghost_split_and_then
744748
(#opened: _)
745749
(#k1: parser_kind)
746-
(#t1: Type)
750+
(#t1: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
747751
(p1: parser k1 t1)
748752
(#k2: parser_kind)
749753
(#t2: Type)
@@ -772,7 +776,7 @@ let split_and_then
772776
(#p1: parser k1 t1)
773777
(j1: jumper p1)
774778
(#k2: Ghost.erased parser_kind)
775-
(#t2: Type)
779+
(#t2: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
776780
(p2: (t1 -> parser k2 t2))
777781
(u: squash (and_then_cases_injective p2 /\ k1.parser_kind_subkind == Some ParserStrong))
778782
(#va: _)
@@ -799,7 +803,7 @@ let ghost_and_then_tag
799803
(#t1: Type)
800804
(p1: parser k1 t1)
801805
(#k2: parser_kind)
802-
(#t2: Type)
806+
(#t2: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
803807
(p2: (t1 -> parser k2 t2))
804808
(u: squash (and_then_cases_injective p2 /\ k1.parser_kind_subkind == Some ParserStrong))
805809
#y #y1 (a1: byte_array) (a2: byte_array)
@@ -878,7 +882,7 @@ let intro_and_then
878882
inline_for_extraction
879883
let validate_tagged_union
880884
(#kt: Ghost.erased parser_kind)
881-
(#tag_t: Type)
885+
(#tag_t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
882886
(#pt: parser kt tag_t)
883887
(vt: validator pt)
884888
(rt: leaf_reader pt)
@@ -920,7 +924,7 @@ let validate_tagged_union
920924
inline_for_extraction
921925
let jump_tagged_union
922926
(#kt: Ghost.erased parser_kind)
923-
(#tag_t: Type)
927+
(#tag_t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
924928
(#pt: parser kt tag_t)
925929
(vt: jumper pt)
926930
(rt: leaf_reader pt)
@@ -989,7 +993,7 @@ let exists_tagged_union_payload
989993
let ghost_split_tagged_union
990994
(#opened: _)
991995
(#kt: parser_kind)
992-
(#tag_t: Type)
996+
(#tag_t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
993997
(pt: parser kt tag_t)
994998
(#data_t: Type)
995999
(tag_of_data: (data_t -> GTot tag_t))
@@ -1018,7 +1022,7 @@ let split_tagged_union
10181022
(#tag_t: Type)
10191023
(#pt: parser kt tag_t)
10201024
(jt: jumper pt)
1021-
(#data_t: Type)
1025+
(#data_t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
10221026
(tag_of_data: (data_t -> GTot tag_t))
10231027
(#k: Ghost.erased parser_kind)
10241028
(p: (t: tag_t) -> Tot (parser k (refine_with_tag tag_of_data t)))
@@ -1046,7 +1050,7 @@ let ghost_tagged_union_tag
10461050
(#kt: parser_kind)
10471051
(#tag_t: Type)
10481052
(pt: parser kt tag_t)
1049-
(#data_t: Type)
1053+
(#data_t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
10501054
(tag_of_data: (data_t -> GTot tag_t))
10511055
(#k: parser_kind)
10521056
(p: (t: tag_t) -> Tot (parser k (refine_with_tag tag_of_data t)))
@@ -1219,7 +1223,7 @@ let hop_dtuple2_tag_with_size
12191223
(#tag_t: Type)
12201224
(pt: parser kt tag_t)
12211225
(#k: Ghost.erased parser_kind)
1222-
(#data_t: tag_t -> Type)
1226+
(#data_t: tag_t -> Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
12231227
(p: (t: tag_t) -> Tot (parser k (data_t t)))
12241228
#y #y1 (a1: byte_array) (sz1: SZ.t) (a2: Ghost.erased byte_array)
12251229
: ST byte_array

Diff for: src/lowparse/LowParse.SteelST.Fold.Gen.fst

+20-9
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ let elim_impl_for_inv_aux_false
488488
#state_i #state_t #ll_state #ll_state_ptr
489489
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
490490
(inv: state_i)
491-
(#t: Type)
491+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
492492
(from0: SZ.t) (to: SZ.t)
493493
(f: Ghost.erased ((x: nat { SZ.v from0 <= x /\ x < SZ.v to }) -> fold_t state_t t unit inv inv))
494494
(l: t)
@@ -593,7 +593,8 @@ let impl_for_inv
593593

594594
inline_for_extraction
595595
let impl_for_test
596-
#state_i #state_t #ll_state #ll_state_ptr
596+
#state_i #state_t (#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
597+
#ll_state_ptr
597598
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
598599
(inv: state_i)
599600
(#k: Ghost.erased parser_kind)
@@ -647,7 +648,8 @@ let rec fold_for_snoc
647648

648649
inline_for_extraction
649650
let impl_for_body
650-
#state_i #state_t #ll_state #ll_state_ptr
651+
#state_i #state_t (#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
652+
#ll_state_ptr
651653
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
652654
(inv: state_i)
653655
(#k: Ghost.erased parser_kind)
@@ -796,7 +798,8 @@ let elim_impl_for_inv_aux_false_strong
796798

797799
inline_for_extraction
798800
let impl_for_post
799-
#state_i #state_t #ll_state #ll_state_ptr
801+
#state_i #state_t (#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
802+
#ll_state_ptr
800803
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
801804
(inv: state_i)
802805
(#k: Ghost.erased parser_kind)
@@ -875,7 +878,7 @@ let impl_for
875878
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
876879
(inv: state_i)
877880
(#k: Ghost.erased parser_kind)
878-
(#t: Type)
881+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
879882
(p: parser k t)
880883
(from: SZ.t) (to: SZ.t)
881884
(f: Ghost.erased ((x: nat { SZ.v from <= x /\ x < SZ.v to }) -> fold_t state_t t unit inv inv))
@@ -1497,7 +1500,9 @@ let impl_list_hole_inv
14971500

14981501
inline_for_extraction
14991502
let impl_list_post_true
1500-
#state_i #state_t #ll_state #ll_state_ptr
1503+
#state_i (#state_t: _ -> Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1504+
(#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1505+
#ll_state_ptr
15011506
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
15021507
(inv: state_i)
15031508
(#t: Type)
@@ -1548,7 +1553,9 @@ let impl_list_post_true
15481553

15491554
inline_for_extraction
15501555
let impl_list_post_false
1551-
#state_i #state_t #ll_state #ll_state_ptr
1556+
#state_i (#state_t: _ -> Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1557+
(#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1558+
#ll_state_ptr
15521559
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
15531560
(inv: state_i)
15541561
(#t: Type)
@@ -1624,7 +1631,9 @@ let fold_list_snoc
16241631

16251632
inline_for_extraction
16261633
let impl_list_body_false
1627-
#state_i #state_t #ll_state #ll_state_ptr
1634+
#state_i (#state_t: _ -> Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1635+
(#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1636+
#ll_state_ptr
16281637
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
16291638
(inv: state_i)
16301639
(#t: Type)
@@ -1654,7 +1663,9 @@ let impl_list_body_false
16541663

16551664
inline_for_extraction
16561665
let impl_list_body_true
1657-
#state_i #state_t #ll_state #ll_state_ptr
1666+
#state_i (#state_t: _ -> Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1667+
(#ll_state: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
1668+
#ll_state_ptr
16581669
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
16591670
(inv: state_i)
16601671
(#t: Type)

Diff for: src/lowparse/LowParse.SteelST.Fold.Gen.fsti

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ val impl_for
514514
(cl: low_level_state state_i state_t ll_state ll_state_ptr)
515515
(inv: state_i)
516516
(#k: Ghost.erased parser_kind)
517-
(#t: Type)
517+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
518518
(p: parser k t)
519519
(from: SZ.t) (to: SZ.t)
520520
(f: Ghost.erased ((x: nat { SZ.v from <= x /\ x < SZ.v to }) -> fold_t state_t t unit inv inv))

Diff for: src/lowparse/LowParse.SteelST.Fold.SerializationState.fst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ let r_to_l_write_t
16761676
let r_to_l_write_post_rewrite
16771677
(#opened: _)
16781678
(#k: parser_kind)
1679-
(#t: Type)
1679+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
16801680
(p: parser k t)
16811681
(#k': parser_kind)
16821682
(p': parser k' t)

Diff for: src/lowparse/LowParse.SteelST.List.Iter.WithInterrupt.fst

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ let list_iter_with_interrupt_close
179179
inline_for_extraction
180180
let list_iter_with_interrupt_test
181181
(#k: Ghost.erased parser_kind)
182-
(#t: Type)
182+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
183183
(p: parser k t)
184184
(state: bool -> list t -> vprop)
185185
(v0: v parse_list_kind (list t))

Diff for: src/lowparse/LowParse.SteelST.Write.fst

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ let exact_writer
5252
inline_for_extraction
5353
let exact_write
5454
(#k: parser_kind)
55-
(#t: Type)
55+
(#t: Type0) // FIXME: if the universe is left out, then F* master will determine universe 0, but F* #2349 cannot, since gen_elim now allows universes 0 and 1. So let's stay at universe 0 for now.
5656
(#p: parser k t)
5757
(#s: serializer p)
5858
(w: writer s)

0 commit comments

Comments
 (0)