Algorithms for fast evaluation of Boolean expressions