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

Crash when mapping unsat core to terms #61

Open
balasub opened this issue May 30, 2024 · 0 comments
Open

Crash when mapping unsat core to terms #61

balasub opened this issue May 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@balasub
Copy link

balasub commented May 30, 2024

The model below can be used to reproduce a NullReferenceException that happens with the following sequence of actions:

  1. Load model
  2. solve pm 1 Graph.conforms
  3. ex 0 0 0
domain Graph
{
  Node ::= new (id: Integer).
  Edge ::= new (src: Integer, dst: Integer).

  edgeHasSrc ::= (src: Integer).
  edgeHasDst ::= (dst: Integer).

  path ::= (Integer, Integer).
  cycle ::= (Integer).

  badSrc ::= (src: Integer).
  badDst ::= (dst: Integer).

  edgeHasSrc(a) :- Edge(a, b), Node(a).
  edgeHasDst(b) :- Edge(a, b), Node(b).

  badSrc(a) :- Edge(a, b), no edgeHasSrc(a).
  badDst(b) :- Edge(a, b), no edgeHasDst(b).

  path(a, b) :- Edge(a, b).
  path(a, c) :- path(a, b), path(b, c).
  cycle(a) :- path(a, a).

  conforms no badSrc(_).
  conforms no badDst(_).

  enoughNodes :- count({ n | n is Node(_)}) > 4. 
  conforms enoughNodes.

  enoughEdges :- count({ e | e is Edge(_, _)}) = 3. 
  conforms enoughEdges.
  
  enoughCycles :- count({ c | c is cycle(_)}) = 4. 
  conforms enoughCycles.
}

partial model pm of Graph
[solver_RecursionBound = 5]
{
  Node(t).
  Node(u).
  Node(v).
  Node(w).
  Node(x).
  Edge(l, m).
  Edge(n, o).
  Edge(p, q).
  Edge(r, s).
  Edge(a, b).
  Edge(c, d).
}

Stack trace below.

image

@balasub balasub added the bug Something isn't working label May 30, 2024
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