This module provides several implementations of the Homomorphism interface family.
The implementations called BacktrackHomomorphism, BacktrackHomomorphismPattern and BacktrackHomomorphismWithNegation are based on a backtracking search over variables. Optimizations are inspired by constraint satisfaction algorithms, see in particular Jean-François Baget's PhD Thesis (Chapter 5, in French), or Backtracking Through Biconnected Components of a Constraint Graph by J.-F. Baget, Y. Tognetti, IJCAI 2001.
This homomorphism algorithm is configurable with :
This module also provides other homomorphisms for particular cases such as homomorphism for a union of conjunctive queries (DefaultUCQHomomorphism ), for atomic queries (AtomicQueryHomomorphism ) or for a small set of facts (PureHomomorphism ).
If you do not know which homomorphism you should use, you can use the class SmartHomomorphism which will make a choice for you. This choice is made thanks to implementations of HomomorphismChecker associated with each homomorphism implementation. Each HomomorphismChecker implementation allows to check if the associated homomorphism is applicable and it defines a priority for it.
You can allow SmartHomomorphism to take your own homomorphism implementation into account by loading an associated HomomorphismChecker with the addChecker method.