load ../../rtp fmod ORDERED-STEAMROLLER is pr PRED-BASE . sort S . sorts wolf fox bird caterpillar snail animal catsnail . subsorts wolf fox bird caterpillar snail catsnail < animal . subsorts caterpillar snail < catsnail . sorts grain plant . subsorts grain < plant . subsort wolf fox bird caterpillar snail animal catsnail grain plant < S . op smaller : animal animal -> Atom [metadata "1"] . op eat : animal S -> Atom [metadata "2"] . op ex-wolf : S S S S -> wolf [metadata "2"] . op ex-fox : S S S S -> fox [metadata "3"] . op ex-bird : S S S S -> bird [metadata "4"] . op ex-caterpillar : S S S S -> caterpillar [metadata "5"] . op ex-snail : S S S S -> snail [metadata "6"] . op ex-grain : S S S S -> grain [metadata "7"] . op ex-plant : catsnail S S S -> plant [metadata "8"] . endfm fmod TEST is inc RTP . inc ORDERED-STEAMROLLER . eq USER-MODULE-NAME = 'ORDERED-STEAMROLLER . endfm --- P0 = animal --- P1 = wolf --- P2 = fox --- P3 = bird --- P4 = caterpillar --- P5 = snail --- S0 = smaller --- R = eats --- f-x' = ex-wolf --- f-x'' = ex-fox --- f-x''' = ex-bird --- f-x'''' = ex-caterpillar --- f-x''''' = ex-snail --- f-x'''''' = ex-grain --- f-y'' = ex-plant --- Q0 = plant --- Q1 = grain red !(( (eat(w:animal,z:plant),smaller(w:animal,x:animal) -> eat(x:animal,y:plant),eat(x:animal,w:animal)), ((empty).AtomMagma -> eat(x:bird,y:caterpillar)), ((empty).AtomMagma -> eat(x:caterpillar,ex-plant(x:caterpillar,y:S,y':S,z:S))), ((empty).AtomMagma -> eat(x:snail,ex-plant(x:snail,y:S,y':S,z:S))), ((empty).AtomMagma -> smaller(x:fox,y:wolf)), ((empty).AtomMagma -> smaller(x:bird,y:fox)), ((empty).AtomMagma -> smaller(x:caterpillar,y:bird)), ((empty).AtomMagma -> smaller(x:snail,y:bird)), (eat(x:animal,y:animal),eat(y:animal,z:grain) -> (empty).AtomMagma), (eat(x:wolf,y:fox) -> (empty).AtomMagma), (eat(x:wolf,y:grain) -> (empty).AtomMagma), (eat(x:bird,y:snail) -> (empty).AtomMagma) )) . q .