GithubHelp home page GithubHelp logo

lonsing / depqbf Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 11.0 1.86 MB

DepQBF, a solver for quantified boolean formulae (QBF).

Home Page: http://lonsing.github.io/depqbf/

License: GNU General Public License v3.0

C 96.27% Makefile 0.45% Java 2.88% Objective-C 0.21% Shell 0.19%

depqbf's People

Contributors

bfontaine avatar lonsing avatar sadger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

depqbf's Issues

macOS build failure: ld: unknown option: -soname

depqbf 5.0 fails to build on macOS with the error

/usr/bin/clang -shared -Wl,-soname,libqdpll.so.1 qdpll.fpico qdpll_pqueue.fpico qdpll_mem.fpico qdpll_dep_man_qdag.fpico -o libqdpll.so.1.0
ld: unknown option: -soname
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Full build log: https://gist.github.com/ilovezfs/f2f22c676ef6c4300bccfa41536de1f5

For the Homebrew formula, I'm using the following hack to workaround the issue:

    inreplace "makefile" do |s|
      s.gsub! "-Wl,-soname,libqdpll.so.$(MAJOR)", ""
      s.gsub! ".so.$(VERSION)", ".$(VERSION).dylib"
    end

It would be great if there were a proper upstream fix to the makefile that used the appropriate build options depending on the detected operating system. Thanks for your help!

How to add additional variables to the solver

I'm trying to check properties about arrays (lets say at least one is true in the whole array or a trivial sorting).

  1. As far i can see i can talk about quantified variables i,j,k. But how to represent assertions about the array such that the quantified variables are indexes of the array.
    for i for j > i a[j] > a[i].
    I can build the Boolean variable B1. Using _Bool B1 = false and iterate over array elements and make sure that B1 = B1 && a[j] > a[i] but how can i add assert(B1 == true) to the solver ? i.e a[i] such that B1 is true. Unable to code it in last few hours.

  2. How can i quantify over boolean functions ?

  3. How can specify facts about the code ?
    Something of this kind.
    __CPROVER_assume(__CPROVER_forall { int i; (i>=0 && i<5) ==> b[i]==a[i]});

In your directory provided examples are great, please add more to those.

One additional type that i can think of now
(assert (not (forall ((a (Array Int Int)) (b (Array Int Int)))
(=> (forall ((i Int)) (= (select a i) (select b i))) (= a b)))))
(check-sat)
Like in Z3 ? how should i achieve same here ?

Thanks,

symbol(s) not found for architecture arm64

I'm using MacBook M1 with arm64 architecture.
I'm trying to compile the package into a static library, and I type ./compile.sh in the terminal, but the process seems unsuccessful. There are following lines indicating some symbols are not found for architecture arm64:

Undefined symbols for architecture arm64:
  "_picosat_add", referenced from:
      _nnf_to_cnf_forward in nenofex.fpico
      _nnf_to_cnf_standard_tseitin_forward in nenofex.fpico
  "_picosat_decisions", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_deref", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_init", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_reset", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_sat", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_set_verbosity", referenced from:
      _nenofex_solve in nenofex.fpico
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libnenofex.1.1.dylib] Error 1

I'm a beginner in programming and did not know much about shellscripts or things like that. I'm wondering why the above errors occur and how I can possibly fix them. Any ideas or advices are greatly appropriated! Thanks!

The whole outputs in the terminal are what follows:

Found directory 'picosat'
version ... 960
debug ... no
log ... no
stats ... no
trace ... no
static ... no
shared ... no
targets ... picosat picomcs picomus picogcnf libpicosat.a
cc ... gcc
cflags ...  -Wall -Wextra -DNDEBUG -O3
makefile ... done
gcc -Wall -Wextra -DNDEBUG -O3 -c picosat.c
rm -f config.h; ./mkconfig > config.h
gcc -Wall -Wextra -DNDEBUG -O3 -c version.c
ar rc libpicosat.a picosat.o version.o
ranlib libpicosat.a
gcc -Wall -Wextra -DNDEBUG -O3 -c app.c
gcc -Wall -Wextra -DNDEBUG -O3 -c main.c
gcc -Wall -Wextra -DNDEBUG -O3 -o picosat main.o app.o -L. -lpicosat
gcc -Wall -Wextra -DNDEBUG -O3 -c picomcs.c
gcc -Wall -Wextra -DNDEBUG -O3 -o picomcs picomcs.o -L. -lpicosat
gcc -Wall -Wextra -DNDEBUG -O3 -c picomus.c
gcc -Wall -Wextra -DNDEBUG -O3 -o picomus picomus.o -L. -lpicosat
gcc -Wall -Wextra -DNDEBUG -O3 -c picogcnf.c
gcc -Wall -Wextra -DNDEBUG -O3 -o picogcnf picogcnf.o -L. -lpicosat
Found directory 'nenofex'
ar rc libnenofex.a nenofex.o stack.o queue.o mem.o atpg.o ../picosat/picosat.o
ranlib libnenofex.a
cc  -shared -Wl,-install_name,libnenofex.1.dylib nenofex.fpico stack.fpico queue.fpico mem.fpico atpg.fpico -o libnenofex.1.1.dylib
Undefined symbols for architecture arm64:
  "_picosat_add", referenced from:
      _nnf_to_cnf_forward in nenofex.fpico
      _nnf_to_cnf_standard_tseitin_forward in nenofex.fpico
  "_picosat_decisions", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_deref", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_init", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_reset", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_sat", referenced from:
      _nenofex_solve in nenofex.fpico
  "_picosat_set_verbosity", referenced from:
      _nenofex_solve in nenofex.fpico
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libnenofex.1.1.dylib] Error 1
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_main.c -o qdpll_main.o
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_app.c -o qdpll_app.o
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll.c -o qdpll.o
qdpll.c:6809:24: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
                       sp - qdpll->qbcp_qbce_blocked_clauses.start);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qdpll.c:11414:77: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      fprintf (stderr, "WATCHING: deleting list entry, new list size %u\n", QDPLL_COUNT_STACK (*list));
                                                                     ~~     ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                                     %zu
./qdpll_stack.h:55:34: note: expanded from macro 'QDPLL_COUNT_STACK'
#define QDPLL_COUNT_STACK(stack) ((size_t) ((stack).top - (stack).start))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qdpll.c:12609:42: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
                                         QDPLL_COUNT_STACK (*occs), qdpll->options.qbcp_qbce_find_witness_max_occs);
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
./qdpll_stack.h:55:34: note: expanded from macro 'QDPLL_COUNT_STACK'
#define QDPLL_COUNT_STACK(stack) ((size_t) ((stack).top - (stack).start))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_dep_man_qdag.c -o qdpll_dep_man_qdag.o
ar rc libqdpll.a qdpll.o qdpll_pqueue.o qdpll_mem.o qdpll_dep_man_qdag.o qdpll_dynamic_nenofex.o nenofex/nenofex.o nenofex/stack.o nenofex/queue.o nenofex/mem.o nenofex/atpg.o picosat/picosat.o
ranlib libqdpll.a
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll.c -o qdpll.fpico
qdpll.c:6809:24: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
                       sp - qdpll->qbcp_qbce_blocked_clauses.start);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qdpll.c:11414:77: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      fprintf (stderr, "WATCHING: deleting list entry, new list size %u\n", QDPLL_COUNT_STACK (*list));
                                                                     ~~     ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                                     %zu
./qdpll_stack.h:55:34: note: expanded from macro 'QDPLL_COUNT_STACK'
#define QDPLL_COUNT_STACK(stack) ((size_t) ((stack).top - (stack).start))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qdpll.c:12609:42: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
                                         QDPLL_COUNT_STACK (*occs), qdpll->options.qbcp_qbce_find_witness_max_occs);
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
./qdpll_stack.h:55:34: note: expanded from macro 'QDPLL_COUNT_STACK'
#define QDPLL_COUNT_STACK(stack) ((size_t) ((stack).top - (stack).start))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll_dep_man_qdag.c -o qdpll_dep_man_qdag.fpico
cc -L./picosat/ -lpicosat -L./nenofex -lnenofex -shared -Wl,-install_name,libqdpll.1.dylib qdpll.fpico qdpll_pqueue.fpico qdpll_mem.fpico qdpll_dep_man_qdag.fpico qdpll_dynamic_nenofex.fpico -o libqdpll.1.0.dylib
cc -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  qdpll_main.o qdpll_app.o -L. -lqdpll -o depqbf

doc request: difference between --qbce-preprocessing and bloqqer

Hi.

What is the difference between calling bloqqer as a preprocessor, and using --qbce-preprocessing?
(are there --qbce-* parameter settings that would achieve what bloqqer does?)

In our application, we actually want --qdo which is not available when using bloqqer (since there is no unbloqqer back-transformation)?

Inconsistent behaviour of `--qdo` on input with no clauses

Consider the following input: a formula with 4 variables and no clauses.

p cnf 4 0                                                                                                                                                                                                  
e 1 2 3 4 0                                                                                                                                                                                                

Running depqbf on it returns SAT as expected. However, running depqbf --no-dynamic-nenofex --qdo on the same input segfaults:

s cnf 1 4 0
Segmentation fault (core dumped)

It would be desirable to return any model (ideal case) or some error message stating that inputs with no clauses are not accepted (in which case depqbf should be made to reject those inputs as well, for the sake of consistency).

(By the way, thank you for the great tool!)

Understanding basic examples.

Hi, I'm trying to create basic one level quantifier alternation and test all 4 possible cases. I have picked your first example as a basis.

 #include <string.h>
 #include <stdlib.h>  
 #include <stdio.h> 
 #include <assert.h>
 #include "../qdpll.h"

 int main (int argc, char** argv)
 {
      QDPLL *depqbf = qdpll_create ();
      qdpll_configure (depqbf, "--dep-man=simple");
      qdpll_configure (depqbf, "--incremental-use");

      qdpll_new_scope_at_nesting (depqbf, QDPLL_QTYPE_FORALL, 1);
      qdpll_add (depqbf, 1);
      qdpll_add (depqbf, 0);

      qdpll_new_scope_at_nesting (depqbf, QDPLL_QTYPE_EXISTS, 2);
      qdpll_add (depqbf, 2);
      qdpll_add (depqbf, 0);

      /* Add clause: 1 -2 0 */
      qdpll_add (depqbf, 1);
      qdpll_add (depqbf, -2);
      qdpll_add (depqbf, 0);

     /* Add clause: -1 2 0 */
      qdpll_add (depqbf, -1);
      qdpll_add (depqbf, 2);
      qdpll_add (depqbf, 0);

      qdpll_print (depqbf, stdout);

  unsigned int i = 0;
  QDPLLResult res;
  while ((res = qdpll_sat (depqbf)) == QDPLL_RESULT_SAT)
  {
      i++;
      if (i > 5) 
    break;
      fprintf (stderr, "\nResult after iteration %u: %u\n", i, res);
      /* Get current values for variables '1' and '2'. */
      QDPLLAssignment val1 = qdpll_get_value (depqbf, 1);
      QDPLLAssignment val2 = qdpll_get_value (depqbf, 2);
      fprintf (stderr, "Value of 1: %d\n", val1);
      fprintf (stderr, "Value of 2: %d\n", val2);
 
    // Block the previous result.
      qdpll_reset (depqbf);
      fprintf (stderr, "Adding a new blocking clause.\n");
      if (val1 != QDPLL_ASSIGNMENT_UNDEF)
          qdpll_add (depqbf, val1 == QDPLL_ASSIGNMENT_FALSE ? 1 : -1);
     if (val1 != QDPLL_ASSIGNMENT_UNDEF)
          qdpll_add (depqbf, val2 == QDPLL_ASSIGNMENT_FALSE ? 2 : -2);
          qdpll_add (depqbf, 0);
      fprintf (stderr, "Formula with blocking clause:\n");
      qdpll_print (depqbf, stderr);
   }
  qdpll_delete (depqbf);
 }

The formula is : Forall [x, Exists [y, (x || !y) && (!x || y) ) ] ]
Cases :

  1. Exists x , Exists y
    x = 1, y = 1. x = -1, y = -1.

  2. Forall x and Forall y : Unsat.

  3. Exists x, Forall y: Unsat. Everything is fine till now.

  4. Forall x, Exists y ... The output is not what i except. The solver goes on adding the -1 , 1 assignment. How to get assignments in case of satisfying formula in alternation of quantifiers. because this formula is true for every value in universe of discourse (True, False) for the variable x.

Also,
I can see that the tool simplifies formula. Is that basic "simplify" or does depqbf eliminates quantifer? for example in the case of Exists x, Forall y (case 3) it removes y from the formula. I would like to understand the over-ahead for that.

Question about all the possible outputs.

Hi.
I am new to the satisfiability problem. I found DepQBF is a great thing to help me, but I noticed that option "--qdo" will show only one output of the QBF, so could you please tell me whether there is a way to show all the outputs?
Thanks a lot.

invalid trace on small example

Running depqbf --dep-man=simple --trace=qrp --traditional-qcdcl test.qdimacs,
with test.qdimacs containing:

p cnf 3 2
e 1 0
a 2 0
e 3 0
1 2 3 0
-1 -3 0

Produces trace:

p qrp 3 2
e 1 0
a 2 0
e 3 0
1 1 2 3 0 0
2 -1 -3 0 0
3 0 2 0
r SAT

(along with WARNING: tracing is not yet fully compatible with generalized axioms.)
which qrpcheck -f test.qdimacs reports as an invalid proof.

This is seemingly because the proof involves an initial cube of -1 -3 0, which is invalid.

This issue could be what the warning is about, but I couldn't find a collection of options to produce a trace without the warning.

This is on depqbf version 6.03, compiled from source on Ubuntu.

macOS build failure "ld: library not found for -lcrt0.o"

==> ./compile.sh
Found picosat directory 'picosat-960'
version ... 960
debug ... no
log ... no
stats ... no
trace ... no
static ... no
shared ... no
targets ... picosat picomcs picomus picogcnf libpicosat.a
cc ... clang
cflags ...  -O
makefile ... done
clang -O -c picosat.c
rm -f config.h; ./mkconfig > config.h
clang -O -c version.c
ar rc libpicosat.a picosat.o version.o
ranlib libpicosat.a
clang -O -c app.c
clang -O -c main.c
clang -O -o picosat main.o app.o -L. -lpicosat
clang -O -c picomcs.c
clang -O -o picomcs picomcs.o -L. -lpicosat
clang -O -c picomus.c
clang -O -o picomus picomus.o -L. -lpicosat
clang -O -c picogcnf.c
clang -O -o picogcnf picogcnf.o -L. -lpicosat
Found bloqqer directory 'bloqqer35'
gcc -Wall -DNLOG -DNDEBUG -O3 
gcc -Wall -DNLOG -DNDEBUG -O3 -c bloqqer.c 
rm -f blqrcfg.h; ./mkconfig > blqrcfg.h
gcc  -c blqrcfg.c
gcc -Wall -DNLOG -DNDEBUG -O3 -o bloqqer bloqqer.o blqrcfg.o 
gcc -DLIBBLOQQER -Wall -DNLOG -DNDEBUG -O3 -o libbloqqer.o -c bloqqer.c 
ar rc libbloqqer.a libbloqqer.o
ranlib libbloqqer.a
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_main.c -o qdpll_main.o
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_app.c -o qdpll_app.o
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll.c -o qdpll.o
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_pqueue.c -o qdpll_pqueue.o
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_mem.c -o qdpll_mem.o
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_dep_man_qdag.c -o qdpll_dep_man_qdag.o
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -c qdpll_dynamic_bloqqer.c -o qdpll_dynamic_bloqqer.o
ar rc libqdpll.a qdpll.o qdpll_pqueue.o qdpll_mem.o qdpll_dep_man_qdag.o qdpll_dynamic_bloqqer.o bloqqer35/libbloqqer.o picosat-960/picosat.o
ranlib libqdpll.a
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll.c -o qdpll.fpico
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll_pqueue.c -o qdpll_pqueue.fpico
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll_mem.c -o qdpll_mem.fpico
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll_dep_man_qdag.c -o qdpll_dep_man_qdag.fpico
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -fPIC -c qdpll_dynamic_bloqqer.c -o qdpll_dynamic_bloqqer.fpico
clang -L./picosat-960 -lpicosat -L./bloqqer35 -lbloqqer -shared -Wl,-install_name,libqdpll.1.0.dylib qdpll.fpico qdpll_pqueue.fpico qdpll_mem.fpico qdpll_dep_man_qdag.fpico qdpll_dynamic_bloqqer.fpico -o libqdpll.so.1.0
cp libqdpll.so.1.0 libqdpll.1.0.dylib
clang -Wextra -Wall -Wno-unused-parameter -Wno-unused -pedantic -std=c99 -DNDEBUG -O3  -static qdpll_main.o qdpll_app.o -L. -lqdpll -o depqbf
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [depqbf] Error 1
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: ./compile.sh 

I can work around it by replacing "$(CC) $(CFLAGS) -static qdpll_main.o" with "$(CC) $(CFLAGS) qdpll_main.o" in the makefile.

In other words, this caused by the use of the -static flag.

segfault when using push/pop

Hello, maybe I missed something in the documentation, but I get:

qdpll.c:4270: init_literal_watchers: Assertion `!qdpll->result_constraint' failed.

with the following file (and depqbf 3.04):

#include <assert.h>
#include "qdpll.h"

int main()
{
  QDPLL* s = qdpll_create();

  qdpll_configure(s, "--incremental-use");

  Nesting l1 = qdpll_new_scope(s, QDPLL_QTYPE_FORALL);
  qdpll_add(s, 1);
  qdpll_add(s, 2);
  qdpll_add(s, 0);

  Nesting l2 = qdpll_new_scope(s, QDPLL_QTYPE_EXISTS);
  qdpll_add(s, 4);
  qdpll_add(s, 5);
  qdpll_add(s, 0);

  qdpll_add_var_to_scope(s, 3, l1);

  /* clause */
  qdpll_add(s, 1);
  qdpll_add(s, 2);
  qdpll_add(s, 3);
  qdpll_add(s, 0);

  qdpll_add(s, 3);
  qdpll_add(s, 5);
  qdpll_add(s, 0);

  /* push and add other clauses */
  qdpll_push(s);
  qdpll_add(s, 1);
  qdpll_add(s, -2);
  qdpll_add(s, 3);
  qdpll_add(s, 0);

  qdpll_add(s, -3);
  qdpll_add(s, 0);

  QDPLLResult res = qdpll_sat(s);
  assert(res = QDPLL_RESULT_UNSAT);

  /* pop, keeping only the 2 first clauses */
  qdpll_pop(s);
  qdpll_gc(s);


  res = qdpll_sat(s);  /* error here */
  assert(res = QDPLL_RESULT_SAT);

  return 0;
}

macOS library install_name doesn't match file name

Suggested solution is here:
Homebrew/homebrew-core#4655 (comment)

clang -shared -Wl,-install_name,libqdpll.so.1 qdpll.fpico qdpll_pqueue.fpico qdpll_mem.fpico qdpll_dep_man_qdag.fpico -o libqdpll.so.1.0
ar rc libqdpll.a qdpll.o qdpll_pqueue.o qdpll_mem.o qdpll_dep_man_qdag.o
ranlib libqdpll.a
cp libqdpll.so.1.0 libqdpll.1.0.dylib
clang -Wextra -Wall -Wno-unused -pedantic -std=c99 -DNDEBUG -O3 qdpll_main.o qdpll_app.o -L. -lqdpll -o depqbf
==> Cleaning
Fixing /usr/local/Cellar/depqbf/5.01/bin/depqbf permissions from 755 to 555
Fixing /usr/local/Cellar/depqbf/5.01/lib/libqdpll.1.0.dylib permissions from 755 to 444
Fixing /usr/local/Cellar/depqbf/5.01/lib/libqdpll.a permissions from 644 to 444
==> Finishing up
ln -s ../Cellar/depqbf/5.01/bin/depqbf depqbf
ln -s ../Cellar/depqbf/5.01/lib/libqdpll.1.0.dylib libqdpll.1.0.dylib
ln -s ../Cellar/depqbf/5.01/lib/libqdpll.a libqdpll.a
Changing dylib ID of /usr/local/Cellar/depqbf/5.01/lib/libqdpll.1.0.dylib
  from libqdpll.so.1
    to /usr/local/opt/depqbf/lib/libqdpll.so.1

Memory corruption with v6.0

With depbf 6.0 I get a corrupted double-linked list with problem.qdimacs. It worked on version 5.01.

➤ depqbf --version
DepQBF 5.01
Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016 Florian Lonsing,
  Johannes Kepler University, Linz, Austria and
  Vienna University of Technology, Vienna, Austria.
Copyright 2012 Aina Niemetz, Johannes Kepler University, Linz, Austria.
This is free software; see COPYING for copying conditions.
There is NO WARRANTY, to the extent permitted by law.
➤ depqbf problem.dimacs
SAT
➤ depqbf --version
DepQBF 6.0
Copyright 2013, 2014, 2015, 2016, 2017 Florian Lonsing,
  Vienna University of Technology, Vienna, Austria.
Copyright 2010, 2011, 2012 Florian Lonsing,
  Johannes Kepler University, Linz, Austria.
Copyright 2012 Aina Niemetz,
  Johannes Kepler University, Linz, Austria.
This is free software; see COPYING for copying conditions.
There is NO WARRANTY, to the extent permitted by law.
➤ depqbf problem.dimacs
*** Error in `depqbf': corrupted double-linked list: 0x000000000143ecd0 ***
======= Backtrace: =========
[0x44a588]
[0x44fb69]
[0x45214d]
[0x4539d4]
[0x426cc2]
[0x42a5f1]
[0x42dffc]
[0x424e55]
[0x41a5a0]
[0x40166c]
[0x43bd82]
[0x43bffe]
[0x400c5a]
======= Memory map: ========
00400000-004fb000 r-xp 00000000 fe:00 2650631                            /nix/store/2z54agdlr579q12f7mvab8yq96biazdw-depqbf-6.0/bin/depqbf
006fb000-00701000 rw-p 000fb000 fe:00 2650631                            /nix/store/2z54agdlr579q12f7mvab8yq96biazdw-depqbf-6.0/bin/depqbf
00701000-00703000 rw-p 00000000 00:00 0 
011fe000-016c3000 rw-p 00000000 00:00 0                                  [heap]
7f56c4000000-7f56c4024000 rw-p 00000000 00:00 0 
7f56c4024000-7f56c8000000 ---p 00000000 00:00 0 
7f56cb940000-7f56cb9c2000 rw-p 00000000 00:00 0 
7ffdc3474000-7ffdc3497000 rw-p 00000000 00:00 0                          [stack]
7ffdc356a000-7ffdc356c000 r--p 00000000 00:00 0                          [vvar]
7ffdc356c000-7ffdc356e000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
[1]    16739 abort      depqbf problem.dimacs

The gdb backtrace shows an error in bloqqer, but that may be due to invalid use? Unfortunately I've got no time at my hands to dig deeper.

#0  0x00000000004416b4 in raise ()
#1  0x0000000000441b5a in abort ()
#2  0x000000000044a58d in __libc_message ()
#3  0x000000000044fb69 in malloc_printerr ()
#4  0x000000000045214d in _int_malloc ()
#5  0x00000000004539d4 in malloc ()
#6  0x0000000000426cc2 in clause_stack_push ()
#7  0x000000000042a5f1 in eqres.part ()
#8  0x000000000042dffc in bloqqer_preprocess ()
#9  0x0000000000424e55 in dynamic_bloqqer_test ()
#10 0x000000000041a5a0 in qdpll_sat ()
#11 0x000000000040166c in qdpll_main ()
#12 0x000000000043bd82 in generic_start_main ()
#13 0x000000000043bffe in __libc_start_main ()
#14 0x0000000000400c5a in _start ()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.