Properly inherit constraints for nested abstracts #31

Closed
mantkiew opened this Issue Sep 5, 2016 · 1 comment

Projects

None yet

2 participants

@mantkiew
Member
mantkiew commented Sep 5, 2016 edited

The constraints seem not to be inherited properly:

abstract Component
    abstract Port
        throughput -> integer // [Mbit/s]
    abstract Port10Mbit : Port
        [ throughput = 10 ]

abstract Port100Mbit : Port
    [ throughput = 100 ]

C1 : Component
    R1 : Port10Mbit
    R2 : Port100Mbit

The expected instance (produced by AlloyIG) is:

C1
  R1
    throughput$1 -> 10
  R2
    throughput$2 -> 100

However, chocosolver produces:

C1
  R1
    throughput -> -1001
  R2
    throughput$1 -> -1001
@mantkiew mantkiew added this to the 0.4.4 milestone Sep 5, 2016
@mantkiew mantkiew added a commit that referenced this issue Sep 5, 2016
@mantkiew mantkiew test case for issue #31 50fb796
@JLiangWaterloo
Member

Fixed.

@mantkiew mantkiew referenced this issue Sep 19, 2016
Merged

Release 0.4.4 #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment