Hi Karl
Thanks for showing your schema diagram. That clarifies the semantics you intended. I misunderstood your intent, as I assumed that if a Rate was owned by a company it couldn't be shared.
It is now clear why you get a syntax error for that exclusion constraint. I have modified my model to be sufficiently similar to yours to expose the problem (see diagram). If you select the exclusion constraint and open the verbalization Browser, here is what you get:
For each Office1 and Office2, at most one of
the following holds:
that Office1 is the
headquarters of that Office2;
some Rate is owned by that Office1;
some IntercompanyRate is shared
with that Office2.
Model Error: Sequence '2' of constraint
'ExclusionConstraint3' in model 'ORMModel1' requires a join path.
Notice that the constraint verbalization does not include the identity relationship between the intercompany rate and rate. In principle there could be many paths between IntercompanyRate and Rate (e.g. additional fact types other than the subtyping connection), and currently NORMA does not perform an exhaustive analysis to determine that no such other paths exist. This is why NORMA asks you to do the work and choose the join path (even though in this case there is only one such path).
If you instead attach the "is shared with" predicate to Rate, NORMA knows without further analysis that that there is only one possible join path, so you don't get a syntax error. You can still use a subset constraint to the unary fact type "Rate is an intercompany rate" to ensure that only intercompany rates are shared (as in my previous model). The exclusion constraint then verbalizes as follows:
For each Office1 and Office2, at most one of
the following holds:
that Office1 is the
headquarters of that Office2;
some Rate is owned by that Office1
and
is shared with that Office2.