work on adding template rule support for gates.  Need to make a map of
gate type-integer to gate type-string name (will use names for 1.7 type
ID)