Answer set programming modulo theories