The journal of logic and algebraic programming