A VLSI architecture for a Prolog machine