-3

so I am required to do an Answer-Set-Programming project, where we should solve some problem and create test cases, using the DLV solver.

According to the specification of the project we need to make the files G.dl, Ch.dl, and test.dl so keeping in mind that I am very new to all of this, here is my question:

what is this .dl file and how do I create one? or better yet:

Where am I supposed to write all these facts and rules (which I have on paper, by the way) to be able to save the as a .dl file?

DS_UNI
  • 2,600
  • 2
  • 11
  • 22
  • You can also use an IDE: ASPIDE https://www.mat.unical.it/ricca/aspide/ or SeaLION http://www.sealion.at/ Looking at answer-sets as a text output can be time consuming and slow the testing cycle down, both IDEs parse the output and put into a table. I use ASPIDE presently. – Dr. Thomas C. King Jun 12 '15 at 07:48
  • thanks, I'll try it for my personal project – DS_UNI Jun 14 '15 at 09:21

1 Answers1

1

Those are simple text files, you can write them in any text editor. There is also an online DLV solver at this webpage.

meskobalazs
  • 15,741
  • 2
  • 40
  • 63
  • that's what I though but when I tried in the command prompt `dlv.exe test.dl G.dl Ch.dl` the cmp wrote : can't open input .... what am I doing wrong? – DS_UNI Jun 09 '15 at 13:31
  • I downloaded DLV for windows from here: [link] (http://www.dlvsystem.com/dlv/) – DS_UNI Jun 09 '15 at 13:52
  • I managed to run both of my test files (copied code from here: http://www.dbai.tuwien.ac.at/proj/dlv/tutorial/) – meskobalazs Jun 09 '15 at 13:59
  • just to make sure: ..... I open a Notepad I type the program and then save it as G.dl? ..... nothing more? .... do I need for example some heading at the beginning of the file like {HTML} ...... {\HTML} or something? – DS_UNI Jun 09 '15 at 13:59
  • Yes, it has no headers and such. – meskobalazs Jun 09 '15 at 14:02
  • first: thanks for your help and second: I hope you are patient :) but here is what I tried now:.............. I copied this from the link you gave me : `parent(john, james). parent(james, bill). grandparent(X, Y) :- parent(X, Z), parent(Z, Y)` and then in cmp in wrote `dlv.exe t.dl.txt` and I got a syntax error on line 3 – DS_UNI Jun 09 '15 at 14:08
  • You forgot the dot after `parent(Z, Y)`. By the way I am no export of DLV, I haven't even heard of it until now :) – meskobalazs Jun 09 '15 at 14:15
  • Thanks, you were a big help for me . it seems you should learn more about DLV, since you solved my "problem" from scratch in half an hour, I think you'll be an expert in no time :)) – DS_UNI Jun 09 '15 at 14:30