bsongen: some rudimentary code gen