forked from microsoft/formula
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The model below can be used to reproduce a NullReferenceException that happens with the following sequence of actions:
- Load model
solve pm 1 Graph.conforms- 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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
