Define gfilter function on hidags.

I think this will be needed to define the graph of the predecessors of
an action.
More progress with hidags + PseudoC: confluence properties proved