make rule compilation helper functions consistent signature