%% 法学部法律学科???????? SM %%HY 解答ファイルの先頭に??????と???を最初に記入して下さい。 %%HY コンサルトのところのtraceは不必要です。 %%HY 下記は正解です。 SICStus 3.12.7 (x86-win32-nt-4): Fri Oct 6 00:15:14 WEST 2006 Licensed to mita.cc.keio.ac.jp | ?- ['contract(3b).txt']. % consulting h:/contract(3b).txt... * [T2] - singleton variables in user:become_effective/2 * Approximate lines: 4-8, file: 'h:/contract(3b).txt' * [C,T2] - singleton variables in user:become_effective/2 * Approximate lines: 8-12, file: 'h:/contract(3b).txt' % consulted h:/contract(3b).txt in module user, 0 msec 1840 bytes yes | ?- trace. % The debugger will first creep -- showing everything (trace) yes % trace | ?- | ?- ['contract(3b).txt']. % consulting h:/contract(3b).txt... * [T2] - singleton variables in user:become_effective/2 * Approximate lines: 4-8, file: 'h:/contract(3b).txt' * [C,T2] - singleton variables in user:become_effective/2 * Approximate lines: 8-12, file: 'h:/contract(3b).txt' % consulted h:/contract(3b).txt in module user, 0 msec -56 bytes yes % trace | ?- | ?- is_concluded(X,T). 1 1 Call: is_concluded(_463,_483) ? 2 2 Call: become_effective(acceptance(_1106,_1105,offer(_1105,_1106 ,_1107)),_483) ? 3 3 Call: reach(acceptance(_1106,_1105,offer(_1105,_1106,_1107)),_1 105,_483) ? 3 3 Exit: reach(acceptance(bernard,anzai,offer(anzai,bernard,sale(a griculture_machine,'$50000'))),anzai,t0409) ? 2 2 Exit: become_effective(acceptance(bernard,anzai,offer(anzai,ber nard,sale(agriculture_machine,'$50000'))),t0409) ? 1 1 Exit: is_concluded(contract(anzai,bernard,sale(agriculture_mach ine,'$50000')),t0409) ? T = t0409, X = contract(anzai,bernard,sale(agriculture_machine,'$50000')) ? yes % trace | ?-