leaks.pl

来自「超多的prolog源代码 具体内容见压缩包里面的programs.txt」· PL 代码 · 共 19 行

PL
19
字号
% A toy knowledge base (Fig. 15.5 translated to Prolog)

if  kitchen_dry and hall_wet  then   leak_in_bathroom.

if  hall_wet and bathroom_dry  then  problem_in_kitchen.

if  window_closed or no_rain  then  no_water_from_outside.

if  problem_in_kitchen and no_water_from_outside  then  leak_in_kitchen.


% Declare fact/1 as a dynamic predicate to enable assert for this predicate

:- dynamic fact/1.

fact( window_closed).
fact( hall_wet).
fact( bathroom_dry).

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?