Abstract
The benefits of the object, logic (or relational), functional, and constraint paradigms can be combined, by providing existential queries over objects and their attributes, subject to constraints. This paper provides a precise mathematical foundation for this novel programming paradigm, and shows that it is computationally feasible by reducing it to familiar problems over term algebras (i.e., Herbrand universes). We use the formalism of hidden logic, and our main result is a version of Herbrand's Theorem for that setting. By extending a result of Diaconescu, we lift our results from equational logic to Horn clause logic with equality.