Last alternative optimization

The authors present a new optimization for or-parallel logic programming (Prolog) systems, called last alternative optimization (LAO). The LAO follows from the flattening principle and the principle of duality of or-parallelism and and-parallelism. Originally LAO was conceived as the dual of last parallel call optimization, an optimization developed for and-parallel systems. LAO enables Prolog programs that have data-or parallelism to execute more efficiently. It also enables more efficient (parallel) execution of constraint logic programs over finite domains. LAO is a fairly general optimization and can be readily applied to virtually any parallel system that exploits nondeterminism (e.g., parallel search based artificial intelligence systems). Last alternative optimization has been implemented in the ACE parallel Prolog system. The performance results indeed prove the effectiveness of LAO. They present a second optimization based on the flattening principle, called balanced nesting optimization (BNO), that is related to LAO, and that also leads to reduction of parallel overhead.