Using graph grammars and fuzzy logic