Using Prolog to present abstract machines

  • Authors:
  • D. Crookes

  • Affiliations:
  • The Queen's Univ., Belfast, Northern Ireland

  • Venue:
  • ACM SIGCSE Bulletin
  • Year:
  • 1988

Quantified Score

Hi-index 0.00

Visualization

Abstract

Introductory courses in Theory of Computation usually include a study of abstract machines such as finite state machines and Turing machines. This paper demonstrates that a neat and useful way of presenting these automata is to use a logic programming language such as Prolog, making the approach useful from a teaching point of view. Not only does a Prolog specification provide a precise definition of an automoton's behaviour, but it also gives an immediately-executable simulator. The reversible execution property of Prolog programs can make these simulators inherently more powerful than traditional simulators. The paper includes Prolog specifications for finite state machines, Turing machines, linear bounded automata, and pushdown automata.