This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
Rewrite DefaultOpMatcher as a set of MatchingRoutines - #42
Merged
Merged
Conversation
gselzer
force-pushed
the
scijava/scijava-ops-api/matching-routine
branch
from
September 16, 2021 21:21
4f885eb to
8a899e5
Compare
gselzer
force-pushed
the
scijava/scijava-ops-api/matching-routine
branch
2 times, most recently
from
September 27, 2021 16:46
13fb850 to
8a899e5
Compare
gselzer
force-pushed
the
scijava/scijava-ops-api/matching-routine
branch
from
November 15, 2021 22:15
8a899e5 to
4f885eb
Compare
24 of 25 tasks
gselzer
force-pushed
the
scijava/scijava-ops-api/matching-routine
branch
from
November 16, 2021 19:18
4f885eb to
f6eea84
Compare
typesMatch() shouldn't really pertain to the OpMatcher. It might instead belong in OpCandidate, or in RuntimeSafeMatchingRoutine... TBD.
ctrueden
force-pushed
the
scijava/scijava-ops-api/matching-routine
branch
from
December 6, 2021 23:15
f6eea84 to
bb317a5
Compare
ctrueden
approved these changes
Dec 6, 2021
ctrueden
left a comment
Member
There was a problem hiding this comment.
I know that later work transitions the MatchingRoutines (and other plugin types) away from SJC2 in favor of JPMS service loader discovery, so I think this branch is good to go.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 adds the
MatchingRoutineinterface, an abstraction designed to increase the extensibility of theDefaultOpMatcher. Previously,DefaultOpMatcherconsisted of a hardcoded ordering of matching routines: first a direct (runtime-safe) match was searched for, then an adapted match, and finally a simplified match. Other matching routines, such as the reduction routine of #32 would have to be explicitly added to this chain, or be shoehorned into one of the existing routines (the reduction routine was shoehorned into the direct routine by expanding the number of initialOpInfos).By adding the
MatchingRoutineinterface, altering the order of these matching routines becomes much easier, and the routines more isolated.TODO:
MatchingRoutines. They are currently supported by thePluginService, and it would be nice to switch to SciJava Ops ServiceLoader. This can't really be done without puttingMatchingRoutinein SciJava Ops SPI, however, and I am not sure whether this is something we want to do.