The basic interaction is best described by the bj-hello-world.c program
#include <stdio.h>
int main(int argc, char** argv)
{
if(argc < 2){
printf("args: <cnf_file_path> [<db_dir>]\n");
return 1;
}
char* dd = ".";
char* ff = argv[1];
if(argc > 2){
dd = argv[2];
}
switch(vv){
printf("%s is SAT instance\n", ff);
break;
printf("%s is UNS instance\n", ff);
break;
{
printf("ERROR ! in %s\n", ff);
printf("%s\n", e_str);
}
break;
default:
printf("FATAL ERROR ! in %s\n", ff);
break;
}
return 0;
}
Posible final results of the solving process.
Enumerator |
---|
bjr_unknown_satisf |
Unknown result.
|
bjr_yes_satisf |
Satisfiable CNF.
|
bjr_no_satisf |
Unsatisfiable CNF.
|
bjr_error |
Error result.
|
Posible errors of the solving process.
Enumerator |
---|
bje_no_error |
No error.
|
bje_internal |
Internal.
|
bje_internal_ex |
Internal with explanation.
|
bje_memout |
Out of memory.
|
bje_timeout |
Timeout.
|
bje_instance_cannot_load |
Can not load instance.
|
bje_file_cannot_open |
Can not open file.
|
bje_file_corrupted |
Corrupted file.
|
bje_file_too_big |
Too big file (must fit in memory)
|
bje_path_too_long |
Path too long.
|
bje_invalid_root_directory |
Invalid root (database) directory.
|
bje_parse_bad_number |
Found a non number where a number is expected.
|
bje_dimacs_no_cnf_declaration |
Bad DIMACS format. Non existant cnf declaration line.
|
bje_dimacs_bad_cls_num |
Bad DIMACS format. Inconsistent clause count with cnf declaration.
|
bje_dimacs_format_err |
Bad DIMACS format. General format error.
|
bje_dimacs_zero_vars |
Bad DIMACS format. No variables found.
|
bje_dimacs_zero_clauses |
Bad DIMACS format. No clauses found.
|
bje_dimacs_bad_literal |
Bad DIMACS format. Invalid clause literal.
|
bje_dimacs_clause_too_long |
Bad DIMACS format. Clause too long.
|
Posible parameters for the solving process.
Enumerator |
---|
bjp_invalid |
Invalid parameter.
|
bjp_as_release |
Run debug version of library as release version. Assumes linking with the debug version.
|
bjp_only_deduc |
Run only deduction (do not use training). For debugging purposes only.
|
bjp_write_proofs |
Write a JSON proof if the CNF is unsatisfiable.
|
bjp_test_result |
Compare results to an existing .test file or write one if not found.
|