Repository navigation
s2c: givens per goal by rank, generic externs, spec bodies; s1 tests through s2c in the gate - #26
Merged
Merged
Conversation
…ocate nothing; s1 tests compiled by s2c in the gate
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same change as #25, rebased on main (#24 was rebase-merged, so #25 conflicted).
Givens: a given's fns are typed under its binder groups. Mono reaches a trait goal (a method call on {} evidence at a ground type). It picks the given as Scala3 does (tests/given_rank.srs): the more specific head wins, and on a draw the given with fewer {} binders wins. It makes the given's fns at that goal, named g__.
Generic externs: one C symbol, a [] binder slot is void*, and a call casts a binder result (emit spec sec 3).
Spec bodies allocate nothing at run time: El.New holds El.Alloc (El.In(region) or El.Comptime). A loop measure (decreases) is I64.
Gate (237 ok, 0 FAIL): s2c1 compiles every tests/*.srs with the s1 libs, then each runs against its .out. 30 of 33 pass. The 3 type-decl tests (type_evidence, typelambda, type_values; TLEVEL, vic-m5r.30) print todo. If one starts to pass, the gate fails, so the list cannot go stale.
Mutant: rank inverted gives given_rank 111 (want 123): killed.