If I understand your question correctly you are looking for bug detectors that find bugs beyond simple syntax checks that can lead to errors not easily debugged.
Prolog has a few predicates that detect anomalies that are possibly bugs.
For SWI-Prolog they are grouped together in style_check/1. style check is included as part of the make/0 command which does the compilation.
Since Prolog is so foreign to most programmers I will elaborate on some of the meanings of the anomalies.
- Singleton - A singleton variable is a variable that appears only one time in a clause.
This typically indicates that the high level concept of the model is wrong, a variable name was typed incorrectly or there
is code that is incomplete.
For more details see: Singleton variable checking
- no_effect - the compiler can prove that they are meaningless.
Since Prolog is a logic language some code can be proven based on logic. Prolog also has ways to create non-logical code but that is another discussion.
- var_branches - Verifies that if a variable is introduced in a branch and used after the branch, it is introduced in all branches.
Since using conditionals in Prolog is a bit tricky, it hides a cut, one has to be extra careful that the logic is correct.
- discontiguous - Warn if the clauses for a predicate are not together in the same source file.
In Prolog predicates (think methods or functions in other languages) use the same name and arity and are by custom entered contiguously in the code. When a predicate with the same arity appears latter in the code it is thus discontiguous. This typically is the result of a copy and paste that was not modified correctly, or an argument was added or removed and now there are two predicates with the same arity.
- charset - Warn on atoms and variable names holding non-ASCII characters that are not quoted.
I don't recall seeing that one but it definitely would be a big problem if detected.
Most seasoned Prolog programmers I know will not run their code without fixing all of the above mentioned checks. In other words, they rarely give false positives. I can't remember any of them ever being wrong.