An integrated framework for comparing forward- and backward-chaining algorithms