CodyReichert / awesome-cl

A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.
https://awesome-cl.com
Other
2.51k stars 187 forks source link

Inference systems? #499

Open dtenny opened 1 month ago

dtenny commented 1 month ago

Seems like the list should include a section on inference tools (forward and backward chaining), I didn't see them when I looked today.

Some links I have examined (not necessarily recently) and thought were interesting, but that I have not used and so cannot vouch for, include:

Presumably there are other Rete net implementations too. Which ones are good?

The links below I know little about and just quicksearched today to try to flesh out the topic:

Perhaps someone with experience using these or similar things can add some credible recommendations. Perhaps these things will become trendy once again in the age of LLM's.

fstamour commented 1 month ago

Related: https://gitlab.common-lisp.net/cl-unification/cl-unification

surabax commented 1 month ago

There is https://github.com/heshrobe/joshua-dist that can do both forward and backward chaining, but the license is not clear.

guitarvydas commented 1 month ago

WAM is Prolog. WAM is the defacto standard for a Prolog VM. My cl-wam repo was my attempt at understanding Ait-Kaci's tutorial about WAM and seeing if I could build my own in Common Lisp. I was testing it incrementally in bits and pieces and think that I veered off onto some other project just before I finished. Apparently, I once understood the WAM. I would be happy to kibbitz with anyone who would like to continue finishing this thing.

AFAIK, WAM is used in gnu prolog. I think that gnu prolog creates a WAM in Prolog. I think that gnu prolog is open source. I didn't go deeply in that direction.

IMO, Prolog is more interesting as a DSL for pattern-matching. I've looked at the main implementations of Prolog in Common Lisp and found that Nils Holm's version in Scheme is the most straight-forward. I've ported it to CL (and to JS). https://github.com/guitarvydas/cl-holm-prolog (the repo probably needs to be restructured to be more instantly usable - again I would be glad to kibbitz with anyone interested).

vindarel commented 1 month ago

related, an excerpt from https://european-lisp-symposium.org/static/proceedings/2024.pdf "Grants4Companies" paper:


While there are Prolog libraries for Common Lisp16, and even one that allows converting Lisp data to Prolog syntax and forward the result to an implementation17, none of them completely fulfilled the requirements: • bidirectional communication, • parsing the Prolog output to provide a highlighted/clickable display in the web UI, • multiple parallel, independent sessions to concurrently test different analyses, • ability to export the Prolog input data for use in a separated (offline), ISO-conformant Prolog system.

So we ended up with our own implementation, using Scryer Prolog18 as backend.

16See, e.g., [2 ], https://www.lispworks.com/documentation/lw445/KW-W/html/kwprolog-w-152.htm, https://github.com/nikodemus/screamer 17https://github.com/cl-model-languages/cl-prolog2


and they don't give a link to their project.

Paper co-authored by Philip Marek (https://github.com/phmarek).

dtenny commented 1 month ago

Trying to figure out if PowerLoom is used these days. There doesn't seem to be a page anywhere talking about who is using it, but it seems like it's being maintained. If anybody has knowledge on this. It's mentioned on cliki.net too.

dtenny commented 1 month ago

There is https://github.com/heshrobe/joshua-dist that can do both forward and backward chaining, but the license is not clear.

A search for additional information on Joshua turned up almost nothing, except for this link on reddit (with a video I have yet to watch), and in its comments a link to 2005 OpenCourseWare materials which includes pointers to Joshua reference and user guide PDF's. https://www.reddit.com/r/lisp/comments/704clr/symbolics_joshua_expert_system_operation_with/

https://ocw.mit.edu/courses/6-871-knowledge-based-applications-systems-spring-2005/pages/assignments/

It's interesting, but I'm thinking this isn't exactly mainstream inference tooling to link in awesome-cl.