awberabwerbawervawerawberavwerbawervawebrawevrbawerv
您的常量以大写字母开头,因此Prolog认为它们是variables不是常量。
您应该重写它们以大写字母或带引号的原子开头:
station(al, [metropolitan]).
station(bg, [central]).
station(br, [victoria]).
station(bs, [metropolitan]).
station(cl, [central]).
station(ec, [bakerloo]).
station(em, [bakerloo,northern]).
station(eu, [northern]).
station(fp, [victoria]).
station(fr, [metropolitan]).
station(ke, [northern]).
station(kx, [metropolitan,victoria]).
station(lg, [central]).
station(ls, [central,metropolitan]).
station(nh, [central]).
station(oc, [bakerloo,central,victoria]).
station(pa, [bakerloo]).
station(tc, [central,northern]).
station(vi, [victoria]).
station(wa, [bakerloo]).
station(ws, [northern,victoria]).