Repository navigation
Conversation
…0000 The test ran close to the 1 s cap per s2 test under load. Sizes 0..40 still cover every group remainder at each level; the 100k fill and seq workloads (the imap.out lines) stay.
Names.facts walks the declarations once: each declaration by namespace (calls: defs and enum cases;
types: enums, protocols, handlers, the builtins) with its own id, every call and name a body uses that
no local binds (params, {} binders, val, var, handle, pattern binders), every type named outside the []
binders in scope, protocol states, start, transitions and drop op, handler fns with their arities. One
D.solve with Names.rules derives the clashes: Dup (both declarations), Unknown, NoType, BadState,
NoDrop, NoProto, NoInit, NoOp, BadArity (op params + 1). The readback is typed: another tuple shape is
RulesBad.
tests/s2/names: a program that passes (a generic enum, locals, cases, a match, a handle), then one
program per clash kind. Mutants: dup without distinct ids, locals ignored, [] binders ignored, val not
binding, pattern binders not binding, arity unchecked, arity without self: each changes the output.
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.
P4 NAMES + DECL: whole-program declaration checks as one Datalog solve (
s2/names.srs, moduleNames).[]binders in scope; protocol states, start, transitions, drop op; handler fns and arities.RulesBad.Tests: tests/s2/names has a passing program (generic enum, locals, cases, a match, a handle) and one failing program per clash kind. Seven one-line mutants each change the output.
Also in this PR: tests/s2/bmap checks build-from-sorted over 1..20000 instead of 1..100000, because the test ran near the 1 s per-test cap under load. Local tests/run.sh: 183 ok, 0 FAIL.