PROLOG TRANSITION NET INTERPRETER Contributed by Jocelyn Ireson-Paine, Oxford University. Shelved on the 11th of January 1991 This is for those occasions when you need to represent a program as a network of labels and gotos, perhaps because you're interpreting a finite-state machine. The entry defines predicates for loading and interpreting such networks. Here is an example network: go :: to count(1). count(10) :: write( 'Done.' ), nl to success. count(N) :: write( 'N = ' ), write( N ), write('.'), nl, Rem is N mod 2 to odd(N) if Rem=1 to even(N). odd(N) :: write( 'That is even.' ), nl to inc(N). even(N) :: write( 'That is odd.' ), nl to inc(N). inc(N) :: Ni is N+1 to count(Ni). To run it, you would load it, and then call ?- do_node( go ). SIZE : 14 kilobytes. CHECKED ON EDINBURGH-COMPATIBLE (POPLOG) PROLOG : yes. PORTABILITY : should be no problems. INTERNAL DOCUMENTATION : as program comments.