ocaml - K 框架在 OCaml 后端产生错误
问题描述
我正在使用K 语义框架并运行教程,这是我的 TEST1.k :
module TEST1-SYNTAX
import DOMAINS
syntax Fun ::= "add(" Pgm "," Pgm ")" [strict]
syntax Pgm ::= Int
| Fun
endmodule
module TEST1
import TEST1-SYNTAX
rule add( I1:Int , I2:Int) => I1 +Int I2
configuration <T color="blue">
<k color ="red"> $PGM:Pgm </k>
</T>
endmodule
但是在运行命令 Komile Test1.k 时出现此错误:
File "realdef.ml", line 2151, characters 331-338:
Error: This variant expression is expected to have type bool
The constructor KApply1 does not belong to type bool
[Error] Critical: ocamlopt returned nonzero exit code: 2
Examine output to see errors.
解决方案
推荐阅读
- c# - 找不到方法:进行 Http 调用时的 System.Threading.Tasks.Task UserInfoResponse
- php - 从 wordpress 页面调用 SOAP 服务
- regex - 如何匹配两个组,其中组 2 是强制性的,组 1 是可选的
- mysql - 三表关联
- javascript - 识别算子并进行计算
- php - 按自定义顺序对 Laravel 集合排序,除了 asc 或 desc
- mysql - 我需要每个用户的特定表格数据
- azure - 手动安装 azure-cli 时出错
- ceph - ceph-deploy 时如何修复 Ceph 错误
- python - Python - 接受 CLI 参数并处理它