Validation of tm.defines and tm.useDef#47
Merged
Merged
Conversation
… to make it grammatical
…ad of only type availability) of all `Define` values in a TModel
…tion of a TModel
…or) weren't included in `tm.uses` yet
… be able to change the config of the collector/solver depending on the particular example, if needed)
…ical instead of logical
PaulKlint
reviewed
Jun 1, 2026
PaulKlint
reviewed
Jun 1, 2026
PaulKlint
approved these changes
Jun 1, 2026
PaulKlint
left a comment
Member
There was a problem hiding this comment.
Looks fine to me. See two comments
…of Typepal's public API (and at least one consumer in the integration test exists)
297ef42 to
92744aa
Compare
Contributor
Author
|
Integration test succeeds |
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.
This PR:
checkAllTypesAvailablefunction to assert the general validaty (instead of only type availability) oftm.defines. Execution of this function can be configured using new flagassertValidDefinesinTypePalConfig(default:true; same behavior as before this PR).assertValidUseDeffunction to assert the general validity oftm.useDef. Execution of this function can be configured using new flagassertValidUseDefinTypePalConfig(default:false).nameargument togetModelfunction argument ofrunTestsin the test framework. This makes it possible to configure the collector/solver specifically for each example.assertValidUseDef, except in examples when an invalid use-def pair is expected to exist (using the previous point).assertValidUseDefto fail: uses discovered by the solver (instead of the collector) weren't included intm.usesyet.I locally ran the tests of
rascalwith this branch oftypepal-- no failures.