Formal models and scripts: study-bkd-points-proof
Tools: Dafny, Python
These are the working models and scripts this part of the hunt used. Some encode the code as it is (a counterexample is the expected result), others a fixed or correct variant; read the header comment of each file. Paths inside them were replaced by placeholders such as $LUCENE (a Lucene checkout) and $WORK.
Findings
- PointInSetQuery silently misses most matches on selectively indexed points (fewer index dimensions than data dimensions) (finding LFV-006; repro · finding page)
- Flexible StandardQueryParser: an exclusive int/long point bound at MAX/MIN wraps around, so the query matches every document with the field instead of none (finding LFV-050; repro · finding page)
- Flexible StandardQueryParser misses -0.0 documents for exclusive float/double bounds (finding LFV-059; repro · finding page)
Files
dafny/Bounds.dfydafny/BoundsFailing.dfydafny/Bytes.dfydafny/MergePointVisitor.dfydafny/PointRange.dfydafny/RangeField.dfydafny/mutants/Bytes.dfydafny/mutants/MergePointVisitor_m1.dfydafny/mutants/MergePointVisitor_m2.dfydafny/mutants/PointRange_m1.dfydafny/mutants/PointRange_m2.dfydafny/mutants/RangeField_m1.dfydafny/mutants/RangeField_m2.dfyz3/comparators.pyz3/fp_nextup.py
How to run
- Dafny:
dafny verify <file>.dfy(a failed obligation marks where the code's contract breaks). - Python:
python3 <file>.py; scripts that importz3need thez3-solverpackage.
Snapshot of 2026-11-03. AI-assisted; not yet triaged by a human Lucene committer. Feedback: open an issue in lucene-ai-bug-hunt.