Datalog vs CLIPS vs Prolog

前端 未结 2 1105
花落未央
花落未央 2021-01-31 09:16

As many programmers I studied Prolog in university, but only very little. I understand that Prolog and Datalog are closely related, but Datalog is simpler? Also, I believe tha

2条回答
  •  广开言路
    2021-01-31 10:00

    datalog is a subset of prolog. the subset which datalog carries has two things in mind:

    1. adopt an API which would support rules and queries
    2. make sure all queries terminate

    prolog is Turing complete. datalog is not.

    getting datalog out of the way, let's see how prolog compares with clips.

    prolog's expertise is "problem solving" while clips is an "expert system". if i understand correctly, "problem solving" involves expertise using code and data. "expert systems" mostly use data structures to express expertise. see http://en.wikipedia.org/wiki/Expert_system#Comparison_to_problem-solving_systems

    another way to look at it is:

    expert systems operate on the premise that most (if not all) outcomes are known. all of these outcomes are compiled into data and then is fed into an expert system. give the expert system a scenario, the expert system computes the outcome from the compiled data, aka knowledge base. it's always a "an even number plus an even number is always even" kind of thinking.

    problem solving systems have an incomplete view of the problem. so one starts out with modeling data and behavior, which would comprise the knowledge base (this gives justice to the term "corner case") and ends up with "if we add two to six, we end up with eight. is eight divisible by two? then it is even"

提交回复
热议问题