Is it possible for prolog to memoize calculated targets?
Under this, I want to say that Prolog should not recompile the goals that were previously calculated.
So, for example, for me the same calculations:
goal([first, one], he, she, var(cat, 5)).
goal([first, one], he, she, var(cat, 5)).
but not
goal([first, one], he, she, var(cat, 6)).
Thus, in fact, it should be possible to combine goals.
source
share