The most promising feature of the Web services platform is its ability to form new (composite) services by combining the capabilities of already existing (component) services. The existing services may themselves be composite leading to a hierarchical composition. In this work, we focus on the discovery aspect. We generalize the characteristics of a service, which need to be considered for successful execution of the service, as constraints. We present a predicate logic model to specify the corresponding constraints. Further, composite services are also published in a registry and available for discovery (hierarchical composition). Towards this end, we show how the constraints of a composite service can be derived from the constraints of its component services in a consistent manner. Finally, we present an incremental matchmaking algorithm which allows bounded inconsistency.