I did come across terminusdb: https://github.com/terminusdb/terminusdb which looks interesting.
Any other codebases people would recommend that are worth a read?
1–10 of 64 posts
I did come across terminusdb: https://github.com/terminusdb/terminusdb which looks interesting.
Any other codebases people would recommend that are worth a read?
Also, tests were surprisingly enjoyable in Prolog: [2].
[1] https://github.com/EarlGray/language-incubator/blob/29755c32... [2] https://github.com/EarlGray/language-incubator/blob/29755c32...
https://github.com/dcnorris/precautionary/blob/main/exec/pro...
This Prolog program can be used to exhaustively enumerate all possible arising cases, and also to complete partially given trials. In addition to the specific usage mode of telling the clinician what action to perform next after a sequence of events has occurred, it is also possible to ask interesting questions about the trial design as a whole, such as whether specific cases can arise at all, or whether a specific instance was performed according to the protocol. In this sense, the formulation truly serves as an executable specification of trial designs that are otherwise stated only comparatively informally in the medical literature, and may even be subject to divergent interpretations. The formulation uses Scryer Prolog and the latest Prolog language constructs (such as if_/3 and CLP(ℤ) constraints) to achieve a short and very general description. Such declarative specifications may help considerably to improve safety and efficiency of clinical trials, by making all steps and outcomes amenable to analysis and comparison.
Theorem provers and reasoning engines are also often implemented in Prolog. A recent example is solidarity by Jos De Roo:
https://github.com/josd/solidarity
Prolog is also frequently used for prototyping interpreters. For example, Adrián Arroyo Calle is working on a MIPS simulator written in Prolog:
https://github.com/aarroyoc/mipsie
Simon Forman has implemented a Prolog interpreter of Joy in which, remarkably, the declarative description also serves as a type inferencer and type checker:
https://git.sr.ht/~sforman/Thun/tree/master/item/source/thun...
Porting this code to Scryer Prolog could be an interesting project if it appeals to you. There is already an issue for it and pertaining discussion:
Not exactly a big codebase, but it was a revelation for me how natural typecheckers can feel in Prolog: I basically rewrote typing rules with some tweaks: [1] Also, tests were surprisingly enjoyable in Prolog: [2]. [1] https://github.com/EarlGray/language-incubator/blob/29755c32... [2] https://github.com/EarlGray/language-incubator/blob/29755c32...
Is anyone aware of any higher level abstractions for logic based languages that is actually used in industry? From what I’ve seen in the various banks and fintech groups I’ve worked with, prolog itself was very rarely if ever used ‘in anger’, but I have heard of it being used for automation so I’m very curious what that looks like.