Literal::Set considers sign 2nd prio in comparator; ranges for loops.
* Atom, Literal comparators now use lexicographic comparators instead of std::tie. * The sign of a literal is now second priority; before, it was fourth (and last). This allows to iterate over all predicates with given symbol and sign, which is a common usecase for subsumption test and resolution. Before, we iterated over all predicates of the given predicate symbol and skipped the loop statement for the unwanted signed ones. * Added a range() method to Literal::Set which allows a compact way to iterate over all predicates with given sign and predicate like for (const Literal& ll : ls.range(l.sign(), l.pred()) { ... } (Why is there no such thing for std::set::equal_range(), by the way?)
Loading
Please register or sign in to comment