1

I am trying to devise ways to improve performance of z3 on my problems. I am aware of the the CAV'06 paper and the tech report . Do relevant parts of z3 v4.3.1 differ from what is described in these documents, and if so in what ways? Also, what is the strategy followed by default in z3 for deciding when to check for consistency in Linear Real Arithmetic, of the theory atoms corresponding to the decided (and propagated) propositional literals?

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
user1779685
  • 283
  • 2
  • 8
  • The underlying methods are the same. The implementation in Z3 contains many extensions that were added during experimentation and benchmarking. For example, it integrates with non-linear constraints, it has a mode for unit propagation, and in some cases it uses local optimization as part of solving integer problems and generating models where interface variables have different values if possible. This last feature is described in the SMT 2007 workshop paper on model based theory combinations. Other features are not described elsewhere, but the source code is available on z3.codeplex.com – Nikolaj Bjorner Jan 17 '14 at 23:23

1 Answers1

2

Linear arithmetic is implemented in the files at src/smt/theory_arith*. See http://z3.codeplex.com/SourceControl/latest#src/smt/theory_arith_core.h

Regarding the paper you pointed out, the ideas are used in the implementation. However, the actual code contains many extensions for linear integer, nonlinear arithmetic and proof generation. If you only care about linear real arithmetic, you should focus only on theory_arith.h, theory_arith_core.h. The file theory_arith_aux.h also contains useful functionality.

Leonardo de Moura
  • 21,065
  • 2
  • 47
  • 53
  • Thanks. My SMT LRA problems have an arbitrary propositional structure (including '=>', 'or', etc. in the .smt2 input files). So, I am interested in LRA as well as the interaction between the LRA theory functions you pointed out and the SAT solver. In particular, I'm trying to find out if having numerous calls from the SAT layer to functions in theory_arith* is the bottleneck (I'd like to modify this strategy in that case) OR is it the case that individual calls to theory_arith* consume a lot of time relatively (I believe update_and_pivot()-like functions are good candidates to profile). – user1779685 Jan 18 '14 at 00:06
  • Any insights into how to go about this would be very helpful. Thanks! – user1779685 Jan 18 '14 at 00:07