Fix constraint validator order-dependence and dedupe, broaden typing coverage, widen 30/36/37/38 scope#14
Merged
Conversation
…coverage, widen 30/36/37/38 scope
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.
Changes
startTime/endTimeinto the start/end event-time sets and comparemax(starts)againstmin(ends), so a start that follows any end is caught regardless of record order. Own times are aggregated per URI (a restated activity declaration reports once), anonymous activities are checked against their own times inline, and referenced-but-undeclared activities are ordered by their start/end events.RelationMetadata::TYPING_ROLES(class => [property => entity|activity|agent]) and drive constraint 50 off it, replacing the hand-written instanceof branches. Invalidation, Start/End trigger/starter/ender, Derivation, Association's activity, Attribution's entity, Specialization/Alternate/Membership/Mention, and the dictionary relations now contribute element roles, and the validator also walks dictionarykeyEntityPairs(an array-typed formal the table cannot express) for their member entities, so clashes likewasInvalidatedBy(entity: x)+used(activity: x)are detected.RecordIndex::getEntityUrisWithEvents()(the union of generation/usage/invalidation entity keys): referenced-but-undeclared entities are now checked, a restated entity declaration no longer double-reports, and each entity is reported once per constraint viamax-vs-mininstead of O(G×U) pairwise violation objects.??=event-time site incollectUniqueEventGroupand at the last-wins assignments in constraints 39/40.