2 ms·
The wikipedia page didn't really shed much light on what ASP is doing under the hood. How does it differ from constraint solvers like http://www.gecode.org/ htt
by jamii 16y ago
The wikipedia page didn't really shed much light on what ASP is doing under the hood. How does it differ from constraint solvers like http://www.gecode.org/ http://www.gecode.org/ ? I know that gecode can handle problems like your canvas example well by representing integer variables as sets of intervals. What kind of problems would ASP have the advantage on?
- _delirium 16y agoTo some extent why you would use each of the declarative-programming paradigms is still an open question imo. Lots of things can be modeled in several, with pros and cons. I think of ASP as "a semantically nicer Prolog, plus extensions". It originated as one of the attempts to give Prolog's semantics, which are logic-inspired but defined by its procedural goal-chaining algorithm, a clean declarative logical semantics. The "stable model semantics" were one of the competing ones, which became answer-set programming. It depends on which constraint solver exactly, but two features not present in most pure constraint-solving systems are the Prolog-style deductive reasoning, and negation-as-failure. ASP lets you freely intermingle deductive reasoning chains with constraints, rather than solving things as purely sets of variables with constraints on them (though this is true of other approaches that fall under the "constraint logic programming" heading as well). That lets you do the generate-and-filter style, where you might have a complex deductive logic program generating possibilities, and then effectively a constraint program filtering from them (and the constraint part can sometimes call out to deductive reasoning chains as well, since it's all the same language). ASP semantics are sort of a superset of Prolog + constraint solvers + abductive reasoners, where you can freely intermingle all those approaches. As a result it isn't, yet anyway, the most efficient reasoner if you fall more squarely into one of those paradigms. Here's an experimental ASP system that also adds efficient constraint variables, though: http://www.cs.uni-potsdam.de/clingcon/ http://www.cs.uni-potsdam.de/clingcon/