gsdlab / clafer

Clafer is a lightweight modeling language
http://clafer.org
MIT License
45 stars 13 forks source link

help debugging the "dref problem" #87

Open mantkiew opened 8 years ago

mantkiew commented 8 years ago

The "dref problem" is a situation whereby the compiler cannot figure out whether a reference clafer should be automatically dereferenced or not. In such situations, the model is usually inconsistent and hard to debug.

A compiler could issue a warning that a reference clafer was not dereferenced. In some cases, it is intentional but in most cases it leads to an inconsistent model.

warning: a reference clafer `a` in expression `this.a = parent.b.a` not dereferenced automatically which may cause the model to be inconsistent. Add the ".dref" if needed.

Also, another way of dealing with that problem is to look at the desugared clafer output.