zipperposition icon indicating copy to clipboard operation
zipperposition copied to clipboard

Caching of ordering status

Open petarvukmirovic opened this issue 5 years ago • 4 comments

Like in E

petarvukmirovic avatar Jul 25 '19 14:07 petarvukmirovic

should have a lazy bitvector in Clause.t (depends on ordering, so can't be in Lit.t)

c-cube avatar Jul 25 '19 20:07 c-cube

@c-cube : in the branch cached_maxlits I implemented this.

However, there is a strange behaviour with lazy BV.t. Namely, it gets reset after being cached and being used for the second time. For that reason, I cached it to list and then when I want to use it I convert it to BV.t.

Is there something I should know about BV.t?

petarvukmirovic avatar Jul 29 '19 20:07 petarvukmirovic

Be careful that bit vectors are mutable, like arrays. You could use an option instead to implement the lazy semantics yourself (and never mutate it afterwards). Also be sure to copy if needed.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

c-cube avatar Jul 30 '19 07:07 c-cube

side note: orderings typically have their own cache, so if you compute s <? t repeatedly it's very likely that only the first time will be expensive.

c-cube avatar Jul 30 '19 14:07 c-cube