def spec_to_group_name(spec):
    """Return a name that can be used as a NuSMV identifier, based on spec."""
    return 'spec' + str(spec).replace(' ', '_').replace(',', '_').replace('&',
        'and').replace('|', 'or').replace('<', '').replace('>', '').replace('~'
        , '').replace("'", '').replace('=', '').replace('(', '').replace(')',
        '').replace('[', '').replace(']', '').replace('!', '')
