4 ms·
Prolog is a general purpose programming language. You can use it to implement provers, optimization problem solvers, or generally use it as a unification algori
by JimmyRuska 6y ago
Prolog is a general purpose programming language. You can use it to implement provers, optimization problem solvers, or generally use it as a unification algorithm engine and database.
You could say prolog has branched many ways. There are many similar languages now which take some aspect prolog did well and made it better. Problog, Mercury, Picat, logtalk, Allego Graph prolog
There's also datalog, which is like the logic database subset of prolog. There's datomic, datahike, datascript, dlv, abcdatalog, racket datalog.
Then there's the RDF / Semantic web side, which feels a lot like datalog. There's many reasoners for triple stores which work like logic databases. RDFox is also a bleeding edge datalog implementation for incremental materialization, you can use it as a business rules engine as well as a database, it keeps recursively derived facts always up to date even as you add new facts. The biggest triple store implementation is probably wikidata.
AI / ML these days try to find patterns in data and reproduce those patterns reliably. Many of the use cases with prolog and prolog-like languages are more about feeding in known facts, and deriving more facts, implications, putting models that represent known and relationships and rules between facts and hierarchical state. Who ever finally makes an ML capable of general intelligence, I'm willing to bet they will interface neural network technologies with a modifiable fact database capable of generating models for the rules and relationships between facts and the hierarchy of those facts.
Probably a lot of this declarative yaml state used in devops these days could benefit from prolog-like logic for drift detection, alerts and recovering broken configurations automatically. Any type of big data DAG that has constraints of complex implications of specific paths can benefit from logic programming. If you have a complex knowledge base like a legal corpus, it can help massively narrow down research needed by asking simple questions that half the search space each time. People have used it for NLP for it's pattern matching abilities. You can reuse the same function against multiple patterns.