Esempio n. 1
0
    def ok_event(self):
        file, file_ext = os.path.splitext(self.path.text())
        options = ""
        options += "-cumulate" if self.consolidate.isChecked() else ""
        clif_converter.convert_single_clif_file(os.path.normpath(self.path.text()), file_ext, not(self.consolidate.isChecked()))

        self.close()
Esempio n. 2
0
def get_m4_cmd(ontology):
    """get a formatted command to run Mace4 with options (timeout, etc.) set in the class instance."""

    args = []
    args.append(filemgt.read_config('mace4', 'command'))
    args.append('-v0')
    args.append('-t' + filemgt.read_config('mace4', 'timeout'))
    args.append('-s' + filemgt.read_config('mace4', 'timeout_per'))
    args.append('-n' + filemgt.read_config('mace4', 'start_size'))
    args.append('-N' + filemgt.read_config('mace4', 'end_size'))
    args.append('-f')
    args.append(
        clif_converter.convert_single_clif_file(ontology,
                                                clif_converter.ladr_output,
                                                True))

    return args
Esempio n. 3
0
def get_vampire_cmd(ontology):
    args = []
    args.append(filemgt.read_config('vampire', 'command'))
    args.append('--mode')
    args.append('casc')
    args.append('--proof')
    args.append('tptp')
    args.append('-t')
    args.append(filemgt.read_config('vampire', 'timeout'))
    # needed for Windows
    args.append('--input_file')
    args.append(
        clif_converter.convert_single_clif_file(ontology,
                                                clif_converter.tptp_output,
                                                True))
    #logging.getLogger(__name__).debug("COMMAND FOR vampire IS " + str(args))
    # works for linux, not for Windows
    #return (args, [list(imports)[0].get_module_set(imports).get_single_tptp_file(imports)])

    return args
Esempio n. 4
0
def get_p9_cmd(ontology):
    """get a formatted command to run Prover9 with options (timeout, etc.) set in the class instance."""

    args = []
    args.append(filemgt.read_config('prover9', 'command'))
    args.append('-t' + filemgt.read_config('prover9', 'timeout'))
    args.append('-f')
    args.append(
        clif_converter.convert_single_clif_file(ontology,
                                                clif_converter.ladr_output,
                                                True))

    # check for possible options file (to change predicate order or other parameters)
    options_file = filemgt.read_config('prover9', 'options')

    if options_file is not None:
        options_file = os.path.abspath(options_file)
        args.append(options_file)

    return args
Esempio n. 5
0
def get_paradox_cmd(ontology):
    """ we only care about the first element in the list of imports, which will we use as base name to obtain a single tptp file of the imports,
    which is the input for paradox."""
    args = []
    args.append(filemgt.read_config('paradox', 'command'))
    # this option is needed for linux or mac to run paradox using wine, where "wine" is the command, but the path to paradox is the first argument, stored in the key "options"
    option = filemgt.read_config('paradox', 'options')
    if option is not None:
        args.append(option)
    args.append('--time')
    args.append(filemgt.read_config('paradox', 'timeout'))
    args.append('--verbose')
    args.append('2')
    args.append('--model')
    args.append('--tstp')
    args.append(
        clif_converter.convert_single_clif_file(ontology,
                                                clif_converter.tptp_output,
                                                True))

    return args