Constraint-based coanalysis