Optimal Stable Model Search: Algorithms and Implementation.