A Haskell based graph rewriting package I encountered recently.
You can find more information at Jon Rachel’s webpage. And the Wikipedia page on graph rewriting. (The Wikipedia page also has pointers to a number of graph rewriting software packages.)
For the definition of port graph grammars, see Charles Stewart, Reducibility Between Classes of Port Graph Grammar (2001).