id(G, Id) is det[private]
 goal(G, Goal) is det[private]
 vars(G, Vars) is det[private]
Extract fields from the goal structure.