fix: support between predicate in FOL dense DSL

- grammar.ts: add 'between' to isKeywordThatCanBePredicate() so the parser
  recognizes it as a valid predicate keyword in forall/exists formula bodies
- compiler.ts: add special case in compileDenseFOLToFormula for
  between(, min, max, dimension?) that extracts numeric args into
  options ({min, max, dimension}) instead of dropping them in the generic
  arg loop. The existing betweenPredicate evaluator already handles these.
- fol-dense-combinations.test.ts: replace GAP test with two verified-working
  tests for between and between with dimension
This commit is contained in:
John Dvorak
2026-05-22 10:48:26 -07:00
parent 1bc92e1f7d
commit 1ac30c6e18
3 changed files with 46 additions and 6 deletions
+1 -1
View File
@@ -665,7 +665,7 @@ export class GrammarParser {
// Spatial aliases
'beside', 'nextTo', 'adjacent', 'touching', 'near', 'under', 'within',
// Size predicates that can appear in FOL formula bodies
'width', 'height', 'size',
'width', 'height', 'size', 'between',
]
return predicateKinds.includes(kind)
}