0

完全な例が欲しいです。

私は次のようなものを試しました:

% swipl -s lib_safecode.pl
% library(swi_hooks) compiled into pce_swi_hooks 0.00 sec, 2,224 bytes
%  library(assoc) compiled into assoc 0.01 sec, 20,744 bytes
%   library(error) compiled into error 0.00 sec, 10,156 bytes
%   library(lists) compiled into lists 0.00 sec, 15,308 bytes
%  library(debug) compiled into prolog_debug 0.01 sec, 38,140 bytes
% /home/janus/Desktop/lib_safecode.pl compiled into safe_code 0.02 sec, 80,464 bytes

?- assert(tree(oak)).
true.

?- safe_code(tree(A)).
ERROR: toplevel: Undefined procedure: safe_code/1 (DWIM could not correct goal)
?- safe_code(tree(A)).
ERROR: toplevel: Undefined procedure: safe_code/1 (DWIM could not correct goal)
?- safe_code:safe_code(tree(A)).
ERROR: toplevel: Undefined procedure: safe_code:safe_code/1 (DWIM could not correct goal)
?- safe_code:safe(tree(A)).
ERROR: Undefined procedure: safe_code:safe/1
ERROR:     However, there are definitions for:
ERROR:         safe_code:safe/5
false.

?- safe_code:safe(tree(A),_,_,_,_).
ERROR: Out of global stack
?- use_module('lib_safecode.pl',[safe_code]).
ERROR: import/1: safe_code:safe_code/0 is not declared public (still imported)
true.

[trace]  ?- safe_code(tree(A)).
ERROR: toplevel: Undefined procedure: safe_code/1 (DWIM could not correct goal)
[trace]  ?- 
4

1 に答える 1