This is a little bit mangled: procedure Generalise in TPC constructs each clause that entails at least one positive example with respect to the background knowledge, not all constructible clauses. For example, there are constructible clauses that do not entail any positive examples and those are not constructed, because they can’t be proved. In Vanilla there are further constraints that exclude e.g. tautologies (as defined by the user) and arbitrary instantiations of single second-order definite clauses. This way it is possible to avoid constructing left-recursive clauses if that’s not necessary. This is yet another step that requires some insight into the desired hypothesis though. I don’t recall if Prolog^2 has the same kind of mechanism to exclude specific instantiations.
I should also explain that the newer version of TPC constructs not just single clauses that entail an example, but entire multi-clause hypotheses. Thus the earlier version of TPC (in the first two Louise papers in the Machine Learning Journal special issues) could not form arbitrary recursive programs. The new version that uses Vanilla, can. There’s really been an overhaul of the framework and the implementations since ca. 2023 if I’m not mistaken.
