【发布时间】:2016-04-01 04:04:36
【问题描述】:
在 C# 应用程序中,我想使用 Aleph 来构建理论。
以下工作在 SWI-Prolog 中:
?- [aleph.pl]。 ?-working_directory(CDW,'C:/Users/admin/Desktop/inputFiles')。 ?- read_all(数据输入)。 ?-诱导。但在 C# 中,这些命令不会:
if (!PlEngine.IsInitialized) { 字符串[] 参数 = { "-q" }; PlEngine.Initialize(参数); PlQuery.PlCall("咨询('C:/Users/admin/Desktop/Aleph_pack/Aleph.pl')"); PlQuery.PlCall("working_directory(CDW,'C:/Users/admin/Desktop/inputFiles')); PlQuery.PlCall("assert(read_all(datainput))"); // 错误! PlQuery.PlCall("assert(induce)"); }PlQuery.PlCall("assert(read_all(datainput))") 出现以下错误:
在 SwiPlCs.dll 中发生“SbsSW.SwiPlCs.Exceptions.PlException”类型的未处理异常 细节: SbsSW.SwiPlCs.Exceptions.PlException 未处理 H结果=-2146233088 Message=assert/1:无权修改静态过程“read_all/1” 定义在 c:/users/admin/desktop/aleph_pack/aleph.pl:8857
我该如何解决这个错误?
【问题讨论】:
-
没有特别的原因,感谢您的编辑。
标签: c# prolog ffi swi-prolog aleph-ilp