fujaba / org.fujaba.graphengine

This project's aim is to build a graph engine, that is able to build and compare graphs - and to match patterns and apply actions on the graph, to effectively use it as a graph-transformation framework.
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

fix faulty handling of negative nodes #19

Closed hoechp closed 7 years ago

hoechp commented 7 years ago

fix faulty handling of negative nodes!

see #13

hoechp commented 7 years ago
(from #11:)

What I got wrong (here's an example):
node with attribute 'type': 'Car' and edge to negative node with attributes
'type': 'Wheel' and 'color': 'blue' means "a car that has no blue wheel".

A negative node is not supposed to match with anything.
Effectively, you look for a match of the rest of the Pattern - not minding the negative node.
Whenever a match is then found, you try to find this negative node
in context of the current match. If you don't find it - it's all fine.
If you do find it, this match doesn't work out and the search continues
with the next valid configuration of matchable nodes for the main pattern.
Something like that. Gotta figure that out and write some tests!