Incorrect application of rule involving unary minus
Closed this issue · 0 comments
ivaylohristakiev commented
Below is a GP 2 program that uses a single rule matching a (-x) node. The host graph contains a single integer labelled node (-1). The rule application produces the graph (0) instead of the graph (-1) since the rule is a predicate rule and makes no changes.
The program
Main = r
r
(
x : int
)
[<73,92>
| (n0, -x <66.5, 66.5> )
|
]
=>
[<73,92>
| (n0, -x <66.5, 66.5> )
|
]
interface =
{
n0
}
The host graph
[<68,92>
| (0, -1 <64, 66.5> )
|
]
The result graph
[ (0, 0) | ]