转载自:https://mp.weixin.qq.com/s/v0YrW7IvSRtguRFG_Ha6Jg
第一章 上机操作
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.15)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- [user].
|: woman(mia). //知识库1
|: woman(jody).
|: woman(yolanda).
|: playsAirGuitar(jody).
|: party.
|: ^D% user://1 compiled 0.00 sec, 5 clauses
true.
?- woman(mia).
true.
?- playsAirGuitar(jody).
true.
?- playsAirGuitar(mia).
false.