stanfordnlp/CoreNLP · error · IllegalStateException
[should be impossible]: Incomplete join table for " + this…
Error message
[should be impossible]: Incomplete join table for " + this + " joined with " + other
What it means
NaturalLogicRelation.join() implements MacCartney's join (composition) table for the six natural logic relations. The table is supposed to be total over all pairs, so reaching the final throw indicates an internal bug or an incomplete table — it is marked "[should be impossible]" and thrown as an IllegalStateException.
Solutions
- Verify you are using an unmodified NaturalLogicRelation enum with exactly the six shipped constants.
- If you extended the enum, add the corresponding rows to the join table switch.
- Report/log the pair (this, other) and file a bug with the CoreNLP maintainers if it reproduces with stock code.
Defensive patterns
Strategy: try-catch
Try / catch
try {
result = a.join(b);
} catch (IllegalStateException e) {
log.error("Join table gap for " + a + " x " + b, e);
result = NaturalLogicRelation.INDEPENDENCE;
} Prevention
- Use stock CoreNLP without enum modifications
- If forking, exhaustively generate the full 6x6 join table in tests
- Assert the enum has exactly the six shipped constants
When it happens
Trigger: Calling join() on a pair of relations whose combination is not covered by the switch table — only realistically possible if the enum has been extended or the code modified, since the shipped table covers all pairs.
Common situations: Forked/patched versions of CoreNLP with an added NaturalLogicRelation constant; refactoring the join table and leaving rows incomplete.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Unhandled natural logic relation: " + insertionRel
- Cannot run Natural Logic forward entailment without…
- check flag in markMentionRelation…
- Comparing a mention with itself for representativeness
- Could not load clause splitter model at " + splitterModel
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/f1a37d923ad61711.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/naturalli/NaturalLogicRelation.java:170
return INDEPENDENCE;
}
case COVER:
switch (other) {
case EQUIVALENT:
case FORWARD_ENTAILMENT:
return COVER;
case NEGATION:
case ALTERNATION:
return REVERSE_ENTAILMENT;
case REVERSE_ENTAILMENT:
case COVER:
case INDEPENDENCE:
return INDEPENDENCE;
}
case INDEPENDENCE:
return INDEPENDENCE;
}
throw new IllegalStateException("[should be impossible]: Incomplete join table for " + this + " joined with " + other);
}
/**
* Implements the finite state automata of composing the truth value of a sentence with a natural logic relation being
* applied.
* @param initialTruthValue The truth value of the premise (the original sentence).
* @return The truth value of the consequent -- that is, the sentence once it's been modified with this relation.
* A value of {@link Trilean#UNKNOWN} indicates that natural logic cannot either confirm or disprove the truth
* of the consequent.
*/
public Trilean applyToTruthValue(boolean initialTruthValue) {
if (initialTruthValue) {
if (maintainsTruth) {
return Trilean.TRUE;
} else if (negatesTruth) {
return Trilean.FALSE;
} else {
return Trilean.UNKNOWN;View on GitHub (pinned to 1b7edd19c4)