News for hackers. Stuff that matters.
Re:Prolog Control in Six Slides by sgt101 on Saturday August 03, 2019 @05:09AM (#20599422)
How does this fit with answer sets?

https://news.ycombinator.com/item?id=19663409

Re:Prolog Control in Six Slides by maweki on Saturday August 03, 2019 @05:20AM (#20599453)
ASP does not have operational semantics in that sense, or an order of execution. It's a set of stable models that satisfy the clauses.

Prolog with the SLD-resolution strategy (there are others but that's the presented one - even though it's not mentioned) does indeed induce an order on operations (which goal to prove first) and is therefore also useful for interactive programs. (Because of the order you can schedule side-effects)

In short: while Prolog is declarative, it does have imperative parts. ASP is purely declarative.

This means there is a lot of research in efficiently evaluating/compiling ASP programs while the evaluation strategy of Prolog is fixed with SLD resolution and therefore (in theory) only subject to minor improvements.

Edit: Also ASP always terminates and is therefore not turing complete. SLD resolution can lead to infinite derivation chains. The Logic program a :- a does not terminate with SLD resolution but does both with Datalog and ASP.

Re:Prolog Control in Six Slides by phonicwheel on Saturday August 03, 2019 @06:08AM (#20599588)
While the syntax of Answer Set Programming is similar to Prolog, inference in ASP is closer to SAT solving, and ASP solvers are typically extensions of SAT solvers.