Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] how to require file in subdirectory

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] how to require file in subdirectory


Chronological Thread 
  • From: Théo Zimmermann <theo.zimmi AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] how to require file in subdirectory
  • Date: Thu, 6 Feb 2020 09:48:14 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=theo.zimmi AT gmail.com; spf=Pass smtp.mailfrom=theo.zimmi AT gmail.com; spf=None smtp.helo=postmaster AT mail-vk1-f179.google.com
  • Ironport-phdr: 9a23:HKKKMxPZjsKlH+/evYUl6mtUPXoX/o7sNwtQ0KIMzox0Ivj5rarrMEGX3/hxlliBBdydt6sYzbeM+Pm6AiRAuc/H7ClZNsQUFlcssoY/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbuv6FZTPgMupyuu854PcYxlShDq6fLh+MAi6oR/eu8ULjoZuMKY8xgXGrndVZehby35jKVaPkxrh/Mu984Nv/ipKt/4968JMVLjxcrglQ7BfEDkoKX0+6tfxtRnEQwuP538cXXsTnxFVHQXL7wz0U4novCfiueVzxCeVPcvtTbApQjui9LtkSAXpiCgcKTE09nzch9Fqg6JapBKhoAF/w5LRbYqIOvdyYr/RcNUHTmdaQM1fSzJODZ+9b4sXDuoOI+BYr5Xmp1ATqReyHBSgCP/zxjNNgHL9wK803Pk7EQze0wMgEdABvnTaotv2KakcT/y6wbLSwjnfdf5bwyvx5JTKfx0nvPqCXahwcc3UyUQ3CQ3Fjk+XqYv9MDyW1+QNtm2b4PR6VeKqkWEnrQdxqSWoy8cwionGmIUVxkrF9CV4xYY1INy4RVV0Yd6hCpRQtiWaO5FqTcMlRmFloSA3waAIt568eSgF0pUnxxjHZvyGdYiI+BPjW/yLLTd2nnJofq+0iRWq8UW41OHwSs253ExJoydFiNXAqG4B2wHJ5sSaSPZw+kGs0iuV2Q/J8OFLO0U0mLLbK5E/xr4wkYIesUHZES/3nEX6lbGWdkY59uSx5eTrf7frq5uGO497jQH+NasumsihDugiLgcOWG2b9fy91L3l40L5XK1HguMqnqTdqpzXJsQWqrSnDwNLz4ov8QuzAjWi3dgAmHkINlNFeBaJj4jzPFHOJej1Deu/g1uylzdn3fHHPrzkApXIL3jOi7jhfbNn5E5dzAo/18xQ55VRCr0ZOvL8RlfxtMDEDh8+KwG73+HnCMxk2owCXWKPH7SWPbjJsV6I4+IvO/ODaJUUuDb7Mfgl5uThgWU3mV8HLuGV2s48b2nwNfB7KQ3Nan31x9wFDG0ivwwkTeWshkfUAhBJYHPnY6K94QYJCYejAJ3GT4aryOid3Cq8WI9XY2VHIl+JGHbsMY6DXqFfO2qpPsZ9n2lcBvCaQIg72ETr7Veikus1Hq/v4iQd8Knb+p1w7uzXmws18GUtXcuY2mCJCWpzmzFRHmJk7OVEuUV4j2y7/+14jvhfT4IB4vpIVkIkNseZwbUlWpb9XQXOetrPQ1GjEI3/XWMBC+kpytpLWH5TXs24h0majSWvCr4R0beMAc5s/w==

Hi Jeremy,

The _CoqProject file is supported by editors with Coq support (Emacs with PG, VsCode with VsCoq, etc.) and by coq_makefile. You are never supposed to run coqc nor coqtop directly by yourself. In particular, today coqtop is considered as just a debugging tool. If you do insist on using it standalone, you are pretty much on your own (and you'll have to figure out the flags you need to give it).

Regarding how to make sure that a process such as make finished without error, you can print the exit code: echo $?

Cheers,
Théo


Le jeu. 6 févr. 2020 à 01:59, Jeremy Dawson <Jeremy.Dawson AT anu.edu.au> a écrit :
Well, make with the existing Makefile seems to make everything OK, I
suppose there is no way to tell for sure, but there is no apparent error.

With a new _CoqProject file there are all sorts of errors, presumably
because the existing _CoqProject file has useful stuff in it.

But in any event, running coq (to be exact, coqtop) does not access
either _CoqProject or Makefile, so I can't see how your solution should
work.  (Anyway, it doesn't).  Maybe I'm missing something here.  Can you
explain how your solution should work.

Or can anyone refer me to where the documentation on this issue is, if any?

Thanks

Jeremy


On 5/2/20 7:59 pm, Donald Leung wrote:
> Dear Jeremy,
>
> Try adding a `_CoqProject` file in the root directory of your Coq development with the following contents:
>
> ```
> -Q ./tttt/TTT/ tttt.TTT
>
> ./tttt/TTT/ssss.v
> ./tttt/TTT/file2.v
> ./tttt/TTT/file3.v
> …
> ./tttt/TTT/filen.v
> ```
>
> where file2.v, file3.v, …, filen.v are the other vernacular files in your Coq development that you would also like to compile. Then run:
>
> ```bash
> $ coq_makefile -f _CoqProject -o Makefile
> ```
>
> in your command line and select `Compile > Make` in your CoqIDE (or similar). Provided the build is successful, you should then be able to step through the line:
>
> ```coq
>  From tttt.TTT Require Import ssss.
> ```
>
> in your CoqIDE (or similar) without any issues.
>
> Yours sincerely,
> Donald
>
>> Jeremy Dawson <Jeremy.Dawson AT anu.edu.au>於2020年2月5日 15:00寫道:
>>
>> Hi,
>>
>> I'm trying to run a command which I was guessing should be
>>
>>  From tttt.TTT Require Import ssss.
>>
>> but I get the error
>>
>> Cannot find a physical path bound to logical path matching suffix
>> <> and prefix tttt.TTT.
>>
>> What does this mean?
>>
>> How do I use a file tttt/TTT/ssss.vo?
>>
>>
>> The documentation contains
>>   Variant From dirpath Require qualid
>> (in
>> https://coq.inria.fr/distrib/current/refman/proof-engine/vernacular-commands.html#coq:cmdv.from-require)
>>
>> What should a dirpath look like, and where is it to be found in the
>> documentation?  (Some of these syntax constructs seem to be defined in
>> https://coq.inria.fr/distrib/current/refman/language/gallina-specification-language.html
>> but dirpath isn't - and none of them seem to be in the index)
>>
>> Thanks
>>
>> Jeremy
>



Archive powered by MHonArc 2.6.18.

Top of Page