all code fragments added, but need to split each redefined implementation of Prolog and OOP into its own package