Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 41s
Real bugs surfaced by parser/safety bug-hunt round: - `not(X) :- p(X).` parsed as a regular literal with relation "not". The user could accidentally define a `not` relation, silently shadowing the negation construct. - `count(N, X, p(X)) :- ...` defined a `count` relation that would conflict with the aggregate operator. - `<(X, 5) :- p(X).` defined a `<` relation. - `is(N, +(1, 2)) :- p(N).` defined an `is` relation. - `+.` (operator alone) parsed as a 0-ary fact. Fix: dl-add-fact! and dl-add-rule! now reject any literal whose head's relation name is in dl-reserved-rel-names — built-in operators (< <= > >= = != + - * /), aggregate operators (count sum min max findall), `is`, `not`, and the arrows (:-, ?-). 4 new eval tests cover the rejection cases. Note: an initial "no compound args in facts" check was overly strict — it would reject findall's list output (which derives a fact like (all_p (a b c))). Reverted that branch; treating findall results as opaque list values rather than function symbols.