The current state of the art concerning the problem of service substitution raises the following issue: the complexity of the substitution process scales up with the number of available services that may serve as candidate substitutes for a target service. To deal with this issue, we propose a framework that is based on two substitution relations and corresponding theorems. The proposed relations and theorems allow organizing available services into groups. Then, the complexity of retrieving candidate substitute services for the target service and generating corresponding adapters scales up with the number of available groups, instead of scaling up with the number of available services.