This simple program works like the good old diff but for files that contain Prolog code. It prints out the clauses that it finds are different in the files. Its use avoids textual differences such as different variable names and different formatting of the code in the files.
pldiff <file1> <file2> : find differences pldiff -h : print this information
but you can also use the program as a library and invoke the predicate:
pldiff( <filename> , <filename> )