ground_notcoexistence instantiates NotCoExistence with the same operand twice
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Open nl2ltl/engines/grounding.py and inspect ground_notcoexistence. Run the reported _get_formulas reproduction with the two connectors, then correct the duplicated operand so the result is (NotCoExistence reject_request escalate_to_human). Done means the grounding preserves both connector names instead of producing a self-pair.
Written by the indexing model from the issue text.
Description
Bug
nl2ltl/engines/grounding.py:
def ground_notcoexistence(connectors: Dict[str, float]) -> Set[Template]:
if len(list(connectors)) >= 2:
return {
NotCoExistence(
Atomic(decapitalize(list(connectors)[1])),
Atomic(decapitalize(list(connectors)[1])), # <-- [1] twice
)
}
Both operands are built from list(connectors)[1], so any two-symbol grounding produces a degenerate self-pair. Reproduction:
>>> from nl2ltl.engines.utils import _get_formulas
>>> _get_formulas("notcoexistence", {"reject_request": 1.0, "escalate_to_human": 1.0})
{(NotCoExistence escalate_to_human escalate_to_human)}
Expected: (NotCoExistence reject_request escalate_to_human).
The resulting LTLf, F(x) -> ~F(x), is equivalent to G(!x) — "x never happens" — which silently changes the meaning of the translated requirement (we caught it because a round-trip paraphrase of the formula no longer matched the input sentence).
Fix
Atomic(decapitalize(list(connectors)[0])),
Atomic(decapitalize(list(connectors)[1])),
Observed on nl2ltl from PyPI (Python 3.13). Found while building a Claude-backed custom Engine for translating agent-guardrail policies to DECLARE. Can send a PR if useful.
- Dominant language
- Python
- Stars
- 101
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IBM/nl2ltl
-
Install problems Open
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Bug on Greedy filter Openbug
-
enhancement
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100