move id_to_string into semanticPrimitives