-1

I have a program written in a text file and I want to execute this file using dlv in the command prompt, however it keeps returning this error:

heba.txt: line 0: can't open input.

Any idea how to solve this issue?

Thank you in advance.

  • What exactly is "dlv"? – Progman Jan 16 '22 at 14:47
  • DLV is a deductive database system, based on disjunctive logic programming, which offers front-ends to several advanced KR formalisms. – heba hammad Jan 16 '22 at 15:02
  • Welcome to Stack Overflow. Please take the [tour] to learn how Stack Overflow works and read [ask] on how to improve the quality of your question. Then check the [help/on-topic] to see which questions are on-topic on this site. – Progman Jan 16 '22 at 18:30
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 26 '22 at 10:49

1 Answers1

0

This is probably not a problem with dlv but with your console/terminal. Depending on your operating system etc.. i would guess that you first have to switch to the directory that contains your file heba.txt. Search for command like cd list dir depending on your operating system.

Max Ostrowski
  • 575
  • 1
  • 3
  • 15
  • I have added the correct path to the cmd and I got the correct version of the dlv as: C:\Users\hebaw>Downloads\datalog\dlv.exe DLV [build BEN/Dec 17 2012 gcc 4.6.1] usage: Downloads\datalog\dlv.exe {FRONTEND} {OPTIONS} [filename [filename [...]]] Specify -help for more detailed usage information. however when I try to run the file ,txt using dlv it return the following error: C:\Users\hebaw>Downloads\datalog\dlv heba.txt DLV [build BEN/Dec 17 2012 gcc 4.6.1] heba.txt: line 0: can't open input. {} – heba hammad Jan 18 '22 at 08:24