Added functions for printing the Prolog program datatype, and a function to execute a list of queries.