datalog: disjunction via multiple rules test (231/231)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 52s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 52s
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"lang": "datalog",
|
||||
"total_passed": 230,
|
||||
"total_passed": 231,
|
||||
"total_failed": 0,
|
||||
"total": 230,
|
||||
"total": 231,
|
||||
"suites": [
|
||||
{"name":"tokenize","passed":26,"failed":0,"total":26},
|
||||
{"name":"parse","passed":18,"failed":0,"total":18},
|
||||
{"name":"unify","passed":28,"failed":0,"total":28},
|
||||
{"name":"eval","passed":31,"failed":0,"total":31},
|
||||
{"name":"eval","passed":32,"failed":0,"total":32},
|
||||
{"name":"builtins","passed":20,"failed":0,"total":20},
|
||||
{"name":"semi_naive","passed":8,"failed":0,"total":8},
|
||||
{"name":"negation","passed":10,"failed":0,"total":10},
|
||||
@@ -16,5 +16,5 @@
|
||||
{"name":"magic","passed":28,"failed":0,"total":28},
|
||||
{"name":"demo","passed":21,"failed":0,"total":21}
|
||||
],
|
||||
"generated": "2026-05-08T14:07:50+00:00"
|
||||
"generated": "2026-05-08T14:12:22+00:00"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# datalog scoreboard
|
||||
|
||||
**230 / 230 passing** (0 failure(s)).
|
||||
**231 / 231 passing** (0 failure(s)).
|
||||
|
||||
| Suite | Passed | Total | Status |
|
||||
|-------|--------|-------|--------|
|
||||
| tokenize | 26 | 26 | ok |
|
||||
| parse | 18 | 18 | ok |
|
||||
| unify | 28 | 28 | ok |
|
||||
| eval | 31 | 31 | ok |
|
||||
| eval | 32 | 32 | ok |
|
||||
| builtins | 20 | 20 | ok |
|
||||
| semi_naive | 8 | 8 | ok |
|
||||
| negation | 10 | 10 | ok |
|
||||
|
||||
@@ -273,6 +273,19 @@
|
||||
(dl-saturated? db))
|
||||
false)
|
||||
|
||||
;; Disjunction via multiple rules — Datalog has no `;` in
|
||||
;; body, so disjunction is expressed as separate rules with
|
||||
;; the same head. Here plant_based(X) is satisfied by either
|
||||
;; vegan(X) or vegetarian(X).
|
||||
(dl-et-test-set! "disjunction via multiple rules"
|
||||
(dl-query
|
||||
(dl-program
|
||||
"vegan(alice). vegetarian(bob). meat_eater(carol).
|
||||
plant_based(X) :- vegan(X).
|
||||
plant_based(X) :- vegetarian(X).")
|
||||
(list (quote plant_based) (quote X)))
|
||||
(list {:X (quote alice)} {:X (quote bob)}))
|
||||
|
||||
;; Bipartite-style join: pair-of-friends who share a hobby.
|
||||
;; Three-relation join exercising the planner's join order.
|
||||
(dl-et-test-set! "bipartite friends-with-hobby"
|
||||
|
||||
Reference in New Issue
Block a user