datalog: diagonal query (repeated var) regression test (223/223)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 21s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 21s
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"lang": "datalog",
|
"lang": "datalog",
|
||||||
"total_passed": 222,
|
"total_passed": 223,
|
||||||
"total_failed": 0,
|
"total_failed": 0,
|
||||||
"total": 222,
|
"total": 223,
|
||||||
"suites": [
|
"suites": [
|
||||||
{"name":"tokenize","passed":26,"failed":0,"total":26},
|
{"name":"tokenize","passed":26,"failed":0,"total":26},
|
||||||
{"name":"parse","passed":18,"failed":0,"total":18},
|
{"name":"parse","passed":18,"failed":0,"total":18},
|
||||||
{"name":"unify","passed":28,"failed":0,"total":28},
|
{"name":"unify","passed":28,"failed":0,"total":28},
|
||||||
{"name":"eval","passed":29,"failed":0,"total":29},
|
{"name":"eval","passed":30,"failed":0,"total":30},
|
||||||
{"name":"builtins","passed":19,"failed":0,"total":19},
|
{"name":"builtins","passed":19,"failed":0,"total":19},
|
||||||
{"name":"semi_naive","passed":8,"failed":0,"total":8},
|
{"name":"semi_naive","passed":8,"failed":0,"total":8},
|
||||||
{"name":"negation","passed":10,"failed":0,"total":10},
|
{"name":"negation","passed":10,"failed":0,"total":10},
|
||||||
@@ -16,5 +16,5 @@
|
|||||||
{"name":"magic","passed":24,"failed":0,"total":24},
|
{"name":"magic","passed":24,"failed":0,"total":24},
|
||||||
{"name":"demo","passed":21,"failed":0,"total":21}
|
{"name":"demo","passed":21,"failed":0,"total":21}
|
||||||
],
|
],
|
||||||
"generated": "2026-05-08T10:31:43+00:00"
|
"generated": "2026-05-08T10:33:34+00:00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# datalog scoreboard
|
# datalog scoreboard
|
||||||
|
|
||||||
**222 / 222 passing** (0 failure(s)).
|
**223 / 223 passing** (0 failure(s)).
|
||||||
|
|
||||||
| Suite | Passed | Total | Status |
|
| Suite | Passed | Total | Status |
|
||||||
|-------|--------|-------|--------|
|
|-------|--------|-------|--------|
|
||||||
| tokenize | 26 | 26 | ok |
|
| tokenize | 26 | 26 | ok |
|
||||||
| parse | 18 | 18 | ok |
|
| parse | 18 | 18 | ok |
|
||||||
| unify | 28 | 28 | ok |
|
| unify | 28 | 28 | ok |
|
||||||
| eval | 29 | 29 | ok |
|
| eval | 30 | 30 | ok |
|
||||||
| builtins | 19 | 19 | ok |
|
| builtins | 19 | 19 | ok |
|
||||||
| semi_naive | 8 | 8 | ok |
|
| semi_naive | 8 | 8 | ok |
|
||||||
| negation | 10 | 10 | ok |
|
| negation | 10 | 10 | ok |
|
||||||
|
|||||||
@@ -273,6 +273,16 @@
|
|||||||
(dl-saturated? db))
|
(dl-saturated? db))
|
||||||
false)
|
false)
|
||||||
|
|
||||||
|
;; Repeated variable (diagonal): p(X, X) only matches tuples
|
||||||
|
;; whose two args are equal. The unifier handles this via the
|
||||||
|
;; subst chain — first occurrence binds X, second occurrence
|
||||||
|
;; checks against the binding.
|
||||||
|
(dl-et-test-set! "diagonal query"
|
||||||
|
(dl-query
|
||||||
|
(dl-program "p(1, 1). p(2, 3). p(4, 4). p(5, 5).")
|
||||||
|
(list (quote p) (quote X) (quote X)))
|
||||||
|
(list {:X 1} {:X 4} {:X 5}))
|
||||||
|
|
||||||
;; A relation can be both EDB-seeded and rule-derived;
|
;; A relation can be both EDB-seeded and rule-derived;
|
||||||
;; saturate combines facts + derivations.
|
;; saturate combines facts + derivations.
|
||||||
(dl-et-test-set! "mixed EDB + IDB same relation"
|
(dl-et-test-set! "mixed EDB + IDB same relation"
|
||||||
|
|||||||
Reference in New Issue
Block a user