G-Log: A declarative graphical query language