Published online by Cambridge University Press: 05 July 2014
What follows is a very brief, operational introduction to two currently existing ASP solvers, clingo and DLV Since the field is developing rapidly, we recommend that users of this information learn about the most current versions of these solvers. To find DLV, go to http://www.dlvsystem.com. To find clingo,goto http://potassco.sourceforge.net/.For quick access to the manuals, just search online for DLV manual or clingo manual.
To find all answer sets of a given program, type
clingo 0 program_name
or
dlv -n=0 program_name
The 0 tells the programs to return all answer sets. If you omit the parameter when calling clingo, the program will return only one answer set; DLV will return all answer sets. Changing the number will return the corresponding number of answer sets. Both systems use – and :– instead of ¬ and ←, respectively. Epistemic disjunction or is denoted by ∣.
Often we may want to limit what a solver will output when it prints answer sets because complete sets can be large and we may only be interested in a few predicates. When using clingo, it is useful to learn the #show commands. For example, if you had a program with predicate mother(X, Y), and you included the following line in your program:
#show mother/2.
clingo would output only those atoms of the answer sets that are formed by predicate mother.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.