/*
NAME
  ferryman (LTL version)

SYNOPSIS
  run under the SLIM LTL mode
  property: not everybody cross the river without being eaten
  
AUTHOR
  Ryo Okabe

HISTORY
  2007/12/14(Fri)

*/

fe(0), wo(0), go(0), ca(0).

w@@ wo(W), fe(F) :- W=:=F, W2=1-W | wo(W2), fe(W2).
g@@ go(G), fe(F) :- G=:=F, G2=1-G | go(G2), fe(G2).
c@@ ca(C), fe(F) :- C=:=F, C2=1-C | ca(C2), fe(C2).
f@@ fe(F) :- F2=1-F | fe(F2).
