ASP(AC): Answer Set Programming with Algebraic Constraints