Closed kbak closed 11 years ago
the same problem with (mutually recursive declarations):
abstract AttributeToColumn
cat
bab
test
g : gtc ?
abstract gtc
test
atc : AttributeToColumn ?
k : AttributeToColumn
A solution is to analyze each containment path and and disallow recursive declarations:
fact { no iden & ^(r_child1.r_child2...) }
Running the first example in ClaferIG v0.3.0.1 produces correct instances. For example,
k
ComplexAttributeToColumn4
atc3
ComplexAttributeToColumn3
atc2
ComplexAttributeToColumn2
atc1
ComplexAttributeToColumn1
Running the first example in ClaferIG v0.3.0.1 produces only empty instances, regardless of the set scope.
With the current (in develop)
Clafer v0.3.3.29-5-2013 ClaferIG v0.3.3.3-6-2013
There are no problems at all. Both examples instantiate just fine with different scopes.
For the following code:
Generated Alloy code contains a cycle between ComplexAttributeToColumn and AttributeToColumn, so that they might exist without any instance of k.