Exemplo n.º 1
0
    description='Move various statements out of proof blocks')
parser.add_argument('input_files',
                    metavar='INFILE',
                    nargs='+',
                    type=str,
                    help='.v files to update')
parser.add_argument(
    '--in-place',
    '-i',
    metavar='SUFFIX',
    dest='suffix',
    nargs='?',
    type=str,
    default='',
    help='update files in place (makes backup if SUFFIX supplied)')
add_logging_arguments(parser)

ALL_DEFINITIONS_REG = re.compile(
    r'^\s*(?:(?:Global|Local|Polymorphic|Monomorphic|Time|Timeout)\s+)?(?:' +
    r'Theorem|Lemma|Fact|Remark|Corollary|Proposition|Property' +
    r'|Definition|Example|SubClass' + r'|Let|Fixpoint|CoFixpoint' +
    r'|Structure|Coercion|Instance' + r'|Add Parametric Morphism' + r')\s',
    re.MULTILINE)

ONELINE_DEFINITIONS_REG = re.compile(
    r'^\s*(?:(?:Global|Local|Polymorphic|Monomorphic|Time|Timeout)\s+)?(?:' +
    r'Coercion|Existing\s+Instance' + r')\s', re.MULTILINE)

ALL_ENDINGS = re.compile(
    r'^(?:[}{]|\s)*(?:(?:Time|Timeout)\s+)?(?:Qed|Defined|Save|Admitted|Abort)\s*\.',
    re.MULTILINE)
Exemplo n.º 2
0
                          "on which files have been Required, not absolutizing constants " +
                          "may cause name resolution to fail."))
parser.add_argument('--coqbin', metavar='COQBIN', dest='coqbin', type=str, default='',
                    help='The path to a folder containing the coqc and coqtop programs.')
parser.add_argument('--coqc', metavar='COQC', dest='coqc', type=str, default='coqc',
                    help='The path to the coqc program.')
parser.add_argument('--coqtop', metavar='COQTOP', dest='coqtop', type=str, default=DEFAULT_COQTOP,
                    help=('The path to the coqtop program (default: %s).' % DEFAULT_COQTOP))
parser.add_argument('--coqc-args', metavar='ARG', dest='coqc_args', type=str, nargs='?',
                    help='Arguments to pass to coqc; e.g., " -indices-matter" (leading and trailing spaces are stripped)')
parser.add_argument('--coqtop-args', metavar='ARG', dest='coqtop_args', type=str, nargs='?',
                    help='Arguments to pass to coqtop; e.g., " -indices-matter" (leading and trailing spaces are stripped)')
parser.add_argument('--coq_makefile', metavar='COQ_MAKEFILE', dest='coq_makefile', type=str, default='coq_makefile',
                    help='The path to the coq_makefile program.')
add_libname_arguments(parser)
add_logging_arguments(parser)

if __name__ == '__main__':
    args = process_logging_arguments(parser.parse_args())

    env = {
        'verbose': args.verbose,
        'log': args.log,
        'coqc': (args.coqc if args.coqbin == '' else os.path.join(args.coqbin, args.coqc)),
        'absolutize': args.absolutize,
        'as_modules': args.wrap_modules,
        'fast': args.fast_merge_imports,
        'coq_makefile': args.coq_makefile,
        'walk_tree': args.walk_tree
        }
    update_env_with_libnames(env, args)