SemanticApplicationDesignLanguage / sadl

Semantic Application Design Language (SADL) Open Source Code
http://semanticapplicationdesignlanguage.github.io/sadl/
Eclipse Public License 1.0
30 stars 12 forks source link

[A] Error in ambiguous name detection, import of import #328

Open crapo opened 6 years ago

crapo commented 6 years ago

Given this simple set of SADL files: M1.sadl: uri "http://sadl.org/M1.sadl" alias M1. Rock is a class described by hardness with values of type decimal.

M2.sadl: uri "http://sadl.org/M2.sadl" alias M2. Person is a class described by M2:hardness with values of type Character. Character is a class, must be one of {Soft, Moderate, Hard}.

M3.sadl: uri "http://sadl.org/M3.sadl" alias M3. import "http://sadl.org/M1.sadl". import "http://sadl.org/M2.sadl". George is a Person with hardness Moderate.

The correct thing happens--"hardness" is detected to be an ambiguous name and two quick fix alternatives are provided.

However, with a minor change a different result is obtained: M1.sadl remains the same.

M2.sadl is modified to import M1.sadl: uri "http://sadl.org/M2.sadl" alias M2. import "http://sadl.org/M1.sadl". Person is a class described by M2:hardness with values of type Character. Character is a class, must be one of {Soft, Moderate, Hard}.

M3.sadl is modified to only import M2.sadl (which imports M1.sadl): uri "http://sadl.org/M3.sadl" alias M3. import "http://sadl.org/M2.sadl". George is a Person with hardness Moderate.

Now rather than detect an ambiguous name, it is assumed that "hardness" is linked to the property in M1.sadl. Note that M3.sadl doesn't need to be changed to obtain the same result.

kittaakos commented 6 years ago

I cannot build the project. See here: https://github.com/crapo/sadlos2/issues/331 Am I missing something? Once that has been fixed, I can look into this issue.