Ampersand
Ampersand copied to clipboard
Allow implicit definition of relations by .xlsx files
There is a case to be made to define a relation implicitly, by means of the population statement: Either in an .adl file, or in the .xlsx file.
This issue is intended to discuss about this, and to see if we can agree on whatever outcome.
For concepts, we already have implicit definition. If a concept name occurs in whatever statement, Ampersand acts as if it was defined. For relations, if a relation is used anywhere, and it isn't explicitly defined, an error might be thrown. This depends if there is another relation defined with the same name and the source and target of that relation could match because of CLASSIFY
statements.
There are several cases what could happen:
- There is no relation with that name: A plain error message stating that the relation isn't defined.
- There are relation(s) with the same name, but not exactly one of them match based on source and target. Then you get an error message listing the relations with that name, suggesting you should be more specific by using one of those relations. This was the case in issue #1127.
In RULE
statements, this behaviour is fine, but in a population statement, especially if it comes from within an .xlsx file, this is hard to the user. In such a case, it could be very convenient to implicitly define that relation.
Opinions please, @stefjoosten , @sjcjoosten