Prolog-取得语法错误:运算符应为

时间:2018-11-30 18:19:03

标签: prolog

symptom(thermal nociceptors, acrocyanosis).   

symptom(swelling, acrocyanosis).  
symptom(cold temperature, acrocyanosis).  
symptom(discoloration, acrocyanosis).  
symptom(vomit, acrocyanosis).  
symptom(headache, acrocyanosis). 

treatment(acrocyanosis, sympathectomy). 
treatment(acrocyanosis, antibiotics). 
treatment(acrocyanosis, hospitalization). 
treatment(acrocyanosis, shots). 
treatment(acrocyanosis, vasoactive drugs). 

test(acrocyanosis, central cyanosis). 
test(acrocyanosis, laboratory studies). 
test(acrocyanosis, physical examination). 


Illness(Acrocyanosis, Symptom, Treatment,Test) :-
    symptom(Sympt, Acrocyanosis),
    treatment(Acrocyanosis, Treat),
    test(Acrocyanosis, Examin).

需要帮助

  

语法错误:应为运算符

1 个答案:

答案 0 :(得分:0)

您有事实和谓词。

事实和谓词必须以Prolog中的小写字母开头,因为大写字母用于表示变量。

Illness(Acrocyanosis, Symptom, Treatment,Test) :-
    symptom(Sympt, Acrocyanosis),
    treatment(Acrocyanosis, Treat),
    test(Acrocyanosis, Examin).

您需要将大写Illness的{​​{1}}更改为小写I

i