简体   繁体   English

Linux中的CoqIDE配置

[英]CoqIDE configuration in Linux

I have a fresh install of Coq 8.6 in Ubuntu 17.04. 我在Ubuntu 17.04中全新安装了Coq 8.6。 When I try to compile my project using make, it works fine until I get the first error message. 当我尝试使用make编译我的项目时,它工作正常,直到我收到第一条错误消息。 Then, I try to use CoqIDE to locate and correct the error, but I get new error messages, such as: 然后,我尝试使用CoqIDE来定位并更正错误,但是我收到了新的错误消息,例如:

"The file foo.vo contains library Top.foo and not library foo" “文件foo.vo包含库Top.foo而不是库foo”

My guess is that something is wrong with the configuration of CoqIDE, but I do not know what that could be. 我的猜测是CoqIDE的配置出了问题,但我不知道那可能是什么。 Any hints? 任何提示?

Thanks in advance, Marcus. 提前谢谢,马库斯。

I guess that you are now standing in the directory with the file foo.vo 我猜你现在站在文件foo.vo的目录中

To map the files in the current dir . 映射当前目录中的文件. into the namespace Top you give the argument 进入命名空间Top你给出了参数

-Q . Top

Here is a "complete" example. 这是一个“完整”的例子。

mkdir test; cd test
echo 'Definition a:=1.' > foo.v

coqc -Q . Top foo.v    # this puts the foo module into Top as Top.foo.

coqtop -Q . Top

Coq <  Require Import Top.foo. Print a.

a = 1
     : nat

but using coqtop without mapping the .vo to the namespace into which it was compiled fails: 但是使用coqtop而不将.vo映射到编译它的命名空间失败:

coqtop

Coq <  Require foo.

> Require foo.
> ^^^^^^^^^^^^
Error: The file /.../test/foo.vo contains library Top.foo
and not library foo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM