Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected hang with partial model #62

Open
balasub opened this issue Jun 7, 2024 · 1 comment
Open

Unexpected hang with partial model #62

balasub opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@balasub
Copy link

balasub commented Jun 7, 2024

Running the following commands on the model below results in an unexpected termination.

solve pm 1 Mapping.conforms
ls
domain Mapping
{
  Component ::= new (id: Integer, utilization: Real).
  Processor ::= new (id: Integer).
  Mapping   ::= new (c: Component, p: Processor).

  // The utilization must be > 0
  invalidUtilization :- c is Component, c.utilization <= 0.

  badMapping :- p is Processor, 
    s = sum(0.0, { c.utilization |
              c is Component, Mapping(c, p) }), s > 100.

  conforms no badMapping, no invalidUtilization.
}

model m of Mapping
{
  c1 is Component(0, 10).
  c2 is Component(1, 90).
  p1 is Processor(0).
  Mapping(c1, p1).
  Mapping(c2, p1).
}

partial model pm of Mapping
{
  c1 is Component(0, x).
  p1 is Processor(0).
  Mapping(c1, p1).
  Mapping(c2, p1).
}
@balasub balasub self-assigned this Jun 7, 2024
@balasub balasub added the bug Something isn't working label Jun 7, 2024
@balasub
Copy link
Author

balasub commented Jun 11, 2024

This appears to be caused by the presence of Mapping(c2, p1) in the partial model pm, which should have been rejected when the model was loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant