What is the relationship between the `rlimit` and` timeout` options?

In this comment about the Z3 issue , that option is rlimitpreferable timeout:

Combining timeouts with a search algorithm makes everything non-deterministic, so now you don’t even need to change random seed so that it fails! Use rlimits ( (set-option :rlimit <n>)and similarly) for a deterministic way to limit resources.

I tried to find additional information about rlimitin the Z3 ( z3 -pd) help , but the description provided here is very short.

In particular, I have the following questions:

  • Q1 : What "solver resources" rlimitlimit - just time or memory?
  • Q2 : Is it :rlimit 1000equivalent :timeout 1000that the solver should end after 1000milliseconds?
  • Q3 : Can it rlimitbe installed several times (as it timeoutcan) or only once?
+4
source share
1 answer

A1: Whatever we think makes sense. The idea is to read something like “basic operations”, but this definition changes when we go ahead and add new “operations”. There is no guarantee that it will remain unchanged for different versions of Z3. However, while you continue to use the same binary file, it is deterministic.

A2: , , rlimit, Z3 . , , , , , .

A3: ,

... (set-option :rlimit 12345) (check-sat) ...

+4

Source: https://habr.com/ru/post/1682830/


All Articles