]> AND Private Git Repository - cours-maths-dis.git/blob - tpProlog/tp4/train.pl~
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
t
[cours-maths-dis.git] / tpProlog / tp4 / train.pl~
1
2 directTrain(forbach,saarbruecken).
3     directTrain(freyming,forbach).
4     directTrain(fahlquemont,stAvold).
5     directTrain(stAvold,forbach).
6     directTrain(saarbruecken,dudweiler).
7     directTrain(metz,fahlquemont).
8     directTrain(nancy,metz).
9     
10     
11 train(X,Y):-directTrain(X,Y).
12 train(X,Y):-directTrain(Y,X).
13
14
15 travelBetween(X,Y):-train(X,Y).
16 travelBetween(X,Y):-train(X,Z),not(Z=Y),
17     travelBetween(Z,Y).
18
19
20