sparc icon indicating copy to clipboard operation
sparc copied to clipboard

solveropts not working

Open JeremyButcheck opened this issue 9 years ago • 3 comments

Hi I'm having trouble with the solveropts argument "pfilter" and "filter" with sparc 2.48 and DLV Dec 17 2012. Somehow the argument is not being passed from sparc to DLV. In the screenshot I compile using sparc and pass the compiled file and desired filter to DLV and it gives the expected output. Thanks.

screenshot from 2016-03-21 13 51 40

JeremyButcheck avatar Mar 21 '16 18:03 JeremyButcheck

Thank you for reporting this issue. Indeed, command-line -pfilter is broken. In the latest SPARC, I rename most of the predicates in the DLV program, so using -pfilter from command line no longer has the desired effect.

Please use "display" section to show only "holds" predicates. To do so, please extend the file s_blocks3.sp with the following two lines:

display holds.

Please see section 4.5 of the manual for the details.

Thank you.

iensen avatar Mar 21 '16 20:03 iensen

Here is an example of using display section:

sorts #fluent = {f1, f2}. #action = {a1,a2}. #time = 1..5. predicates holds(#fluent, #time). occurs(#action, #time). rules holds(f1,1). occurs(a1,2).

display

holds.

The displayed answer sets will only include "holds(f1,1).". You can also try the example in online interface: http://ec2-52-25-88-7.us-west-2.compute.amazonaws.com/

iensen avatar Mar 21 '16 20:03 iensen

Gotcha. Thanks for your help.

JeremyButcheck avatar Mar 21 '16 22:03 JeremyButcheck