datalog: shortest-path demo on weighted DAG (176/176)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s

dl-demo-shortest-path-rules: path enumerates X→Z with cost
W = sum of edge weights via is/+; shortest filters to the
minimum cost path per (X, Y) pair via min aggregation.

3 demo tests cover direct/multi-hop choice, multi-hop wins on
cheaper route, and unreachable-empty.

Note: cycles produce infinite distance values without a depth
filter; the rule docstring flags this and suggests adding
(<, D, MAX) for graphs that may cycle.
This commit is contained in:
2026-05-08 09:35:38 +00:00
parent 380580af17
commit cf634ad2b1
5 changed files with 62 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
{
"lang": "datalog",
"total_passed": 173,
"total_passed": 176,
"total_failed": 0,
"total": 173,
"total": 176,
"suites": [
{"name":"tokenize","passed":26,"failed":0,"total":26},
{"name":"parse","passed":18,"failed":0,"total":18},
@@ -13,7 +13,7 @@
{"name":"negation","passed":10,"failed":0,"total":10},
{"name":"aggregates","passed":16,"failed":0,"total":16},
{"name":"api","passed":11,"failed":0,"total":11},
{"name":"demo","passed":15,"failed":0,"total":15}
{"name":"demo","passed":18,"failed":0,"total":18}
],
"generated": "2026-05-08T09:30:37+00:00"
"generated": "2026-05-08T09:35:25+00:00"
}