This looks really cool! After building various logic programming engines on top of Janet: https://codeberg.org/veqq/declarative-dsls I was considering something similar (though more bare bones). I'd love to talk to the maintainer to discuss certain design choices etc. Maybe I can wrap it instead of SQLite and Prolog directly as I was thinking.
shaism · 2026-06-30 00:20:19 UTC
What would be a good use case for this?
Spooky23 · 2026-06-30 04:06:37 UTC
Years ago I worked on an event system that correlated about 500k daily events to about 40 actionable daily events.
A big part of it used prolog to map artifacts to application to business and technical accountable individuals. So if a down storage device offlined a database and broke an app, the business user and storage guy would be called or paged.
My team does this with Splunk today. For probably 50x the compute and 10x the cost.
shaism · 2026-06-30 10:02:38 UTC
I see. Cool. So did you generate the inference / reasoning rules to map those 500k events to 40 by hand or are there solutions to automatically discover those rules based on past incidences?
Spooky23 · 2026-06-30 13:07:41 UTC
This was almost 20 years ago now so yes and no!
We wired up the network monitoring systems which built out the hierarchy of network gear, then used a fairly lightweight filter/rules engine to dedupe and normalize events. For example a Cisco 6500 switch might throw 100 events when an interfere dropped. We could roll 90% of them with the filter. Another device would send a junk “interface down” alert periodically… except an attribute would say “is_down=false” lol
So we pulled in our business-artifact mapping system (this would be ServiceNow today), the on-call rosters, the network topology, runbook/kb, and some other goodies and grabbed the attention of the right person at the right time with specific guidance about what to do.
Basically if a switch, server or critical app failed, we immediately knew what system was impacted, the scope of the impact, who to inform and who to call to resolve. Eventually we expanded it to batch non-critical failures and schedule repairs during outage windows and identify specific dev teams for components of larger apps.
I left after that. It was a fun project and a big break for me, all because I was the only person who had heard of prolog in a happy hour conversation!
ux266478 · 2026-06-30 14:55:31 UTC
> are there solutions to automatically discover those rules based on past incidences?
While it's not exactly what he did, the answer to this question is yes. That's called inductive logic programming. Essentially you provide background knowledge, positive examples and negative examples, and it spits out a logic program. It's where the frontier of symbolic AI has sat for a hot second now.
gobdovan · 2026-06-30 00:23:29 UTC
I'm developing a similar project, I also added scripts to it so it works like an hermetic/replayable system too. Do you use yours for anything cool? Maybe a truth maintenance system of sorts? Do the queries get unwieldy at some point?
veqq · 2026-06-30 01:54:30 UTC
What inspires your project etc.? I'm open to collaborating.
tern · 2026-06-30 02:40:11 UTC
Ah, interested to dive in—and have a project it could integrate with.
I built a similar thing recently, for agents, aimed at enabling prolog queries over handles in markdown corpora (and code): https://github.com/flowerornament/anneal. A true slopwerk in comparison to this, however.
snthpy · 2026-06-30 06:58:55 UTC
Looks cool. A somewhat adjacent question: what is the best, or what are common, approache(s) for handling time in knowledge graphs?
schmuhblaster · 2026-06-30 08:32:42 UTC
Awesome work! If I understand it correctly, it loads relevant subgraphs from the DB and then runs queries in Prolog on it? Or is it more similar to datalog?
srean · 2026-06-30 13:30:18 UTC
It would be good to link the Masters thesis too. I looked for it but could not find.
ux266478 · 2026-06-30 14:28:15 UTC
I'm curious, what inspired the workflow? The usecase strikes me as similar to a usecase I have with the normal Prolog REPL. Why an SQL database instead of of loading/unloading files? Did you run into scaling issues?
Comments
A big part of it used prolog to map artifacts to application to business and technical accountable individuals. So if a down storage device offlined a database and broke an app, the business user and storage guy would be called or paged.
My team does this with Splunk today. For probably 50x the compute and 10x the cost.
We wired up the network monitoring systems which built out the hierarchy of network gear, then used a fairly lightweight filter/rules engine to dedupe and normalize events. For example a Cisco 6500 switch might throw 100 events when an interfere dropped. We could roll 90% of them with the filter. Another device would send a junk “interface down” alert periodically… except an attribute would say “is_down=false” lol
So we pulled in our business-artifact mapping system (this would be ServiceNow today), the on-call rosters, the network topology, runbook/kb, and some other goodies and grabbed the attention of the right person at the right time with specific guidance about what to do.
Basically if a switch, server or critical app failed, we immediately knew what system was impacted, the scope of the impact, who to inform and who to call to resolve. Eventually we expanded it to batch non-critical failures and schedule repairs during outage windows and identify specific dev teams for components of larger apps.
I left after that. It was a fun project and a big break for me, all because I was the only person who had heard of prolog in a happy hour conversation!
While it's not exactly what he did, the answer to this question is yes. That's called inductive logic programming. Essentially you provide background knowledge, positive examples and negative examples, and it spits out a logic program. It's where the frontier of symbolic AI has sat for a hot second now.
I built a similar thing recently, for agents, aimed at enabling prolog queries over handles in markdown corpora (and code): https://github.com/flowerornament/anneal. A true slopwerk in comparison to this, however.