【发布时间】:2019-04-02 21:23:21
【问题描述】:
我绝对是 prolog 的初学者。我刚刚阅读了一个基本教程,并试图自己解决一个快速问题。问题是,找到可能导致总和的数字组合。我期待这样的事情:
sum(A,B,11).
这将导致 A 和 B 的值相加为 10。
我的初始代码是这样的:
sum(A,B,C):-
C is A + B.
但是我没有得到任何结果。我得到以下信息。
ERROR: Arguments are not sufficiently instantiated
ERROR: In:
ERROR: [9] 11 is _3302+_3304
ERROR: [7] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
我对 Prolog 的理解缺少什么?
【问题讨论】:
标签: prolog