Update tuprolog implementation