my issue seems to be a common one, but none of the found answers could solve it. I am following the software foundations course on Coq, and so I come to the command:
> From LF Require Export Basics.
Whatever I try, I get always the following answer:
"Cannot find a physical path bound to logical path matching suffix <> and prefix LF."
I compiled Basics.v from coqIde, and the Basics.vo file is created correctly.
I also compiled it from the coqc command line, as suggested somewhere
My _CoqProject file exists, in the same folder as Basics.v, and states: -Q . LF
the _CoqProject parameter is set to "appended to arguments".
when I load Basics.v I see on the bottom of CoqIde "Reading Options from ..._CoqProject" I put the lf folder into a folder which is in the LoadPath of coq.
What else could I check?
My system is Windows 10. I run CoqIde 8.9.1
Thank you!
I usually work under a Linux machine, but here something I did using a virtual machine.
cygwin
tools to expand the file lf.tgz
so that I had a directory C:\Users\user\foundations\lf
containing Basics.v
, _CoqProject
etc.Then I used the search command to find coqide
as an installed app. I then proceeded with the following steps:
Basics.v
I could then observe that the directory C:\Users\user\foundations\lf
contained a file named Basics.vo
From LF Require Export Basics.
and did not try to execute this lineC:\Users\user\foundations\lf
. Let's assume this file is named toto.v
toto.v
buffer.toto.v
using the option File->OpenThis process is the result of trial-and-error. What I know is that Require Export ...
only works if there are ...vo
files on you disk, but coqide needs to know where to look for these files. For this it maintains a "load path". When opening a file from a given directory, coqide looks in this directory (and ancestors) to find a _CoqProject
file, and the latter may contain directives to modify the load path. It is the case here "-Q . LF" indicates that all .vo files in the current directory should be considered, and that their symbolic name should start with the prefix "LF."
The problem is that when you start from an empty buffer, no _CoqProject
file gets read and coqide does not where to look for your data. This is why I did the steps 5-6-7: when reading the file toto.v
, I provoked the reading of the _CoqProject
file.
Takeaway lesson: Make sure the Basics.vo
file exists, and then make sure the buffer you are working on was obtained through a reading operation from the same directory. If needed, save, close, and re-open to make sure this is the case.