<discocaml>
<contextfreebeer> companion_cube: nope, nothing like that. I am pretty sure sorted vs unsorted just has a massive effect on the algorithmic behavior in some cases which is why I noticed a discrepancy between the two versions. It's a SAT solver so sorting the clauses vs not sorting them changes which literals are chosen to be watched (I just choose the first nonfalse ones I find) and it might also change how long it takes to find new watched literals etc
<companion_cube>
Oh I see
<discocaml>
<contextfreebeer> The performance seems completely identical between sorted array and set
<companion_cube>
Yeah but arrays ought to be way faster in that context
<companion_cube>
Cache effects and all that
<discocaml>
<contextfreebeer> For sure, that's why I want to switch. I'm not sure if sorting the clauses even makes sense, there's no reason why that should be better
<discocaml>
<contextfreebeer> Using sets made sense at the start because I implemented assignments in the worst possible way by removing literals from the clause, which completely tanks the performance, the clauses have been static for a long time now but I haven't gotten around to changing the representation
prgbln has joined #ocaml
<companion_cube>
You can sort clauses, I do it
<companion_cube>
It's also part or simplifying
<discocaml>
<contextfreebeer> by "the performance is identical" I meant the performance is on the same level, not wildly different, the performance is of course strictly better
<discocaml>
<contextfreebeer> companion_cube: oh, really? I see
<discocaml>
<contextfreebeer> Guess I can just sort them then. Just out of curiosity I'm running the solver on all the formulas that I have locally with both versions. probably it will just end up evening out.
<discocaml>
<contextfreebeer> not going to dwell on that too much since I have yet to implement garbage collection of learned clauses, I think I will get more mileage out of that, hope so anyway
<companion_cube>
Is it for learning? Are you following a paper?
<discocaml>
<contextfreebeer> companion_cube: yeah, for learning, I find SAT solvers absolutely fascinating. I'm not exactly following a paper per se but I have probably read most of the classic papers by now during the course of implementing this solver
<companion_cube>
I guess you read the minisat paper? :)
<discocaml>
<contextfreebeer> Ofc
Tuplanolla has quit [Quit: Leaving.]
<companion_cube>
very cool
<companion_cube>
btw implementing proof production can be a useful tool when debugging
ursa-major has quit [Ping timeout: 260 seconds]
lane_ has quit [Ping timeout: 255 seconds]
jmcantrell has quit [Ping timeout: 255 seconds]
pluviaq has quit [Ping timeout: 240 seconds]
lane has joined #ocaml
jmcantrell has joined #ocaml
pluviaq has joined #ocaml
ursa-major has joined #ocaml
waleee has quit [Ping timeout: 256 seconds]
brettgilio has quit [Ping timeout: 260 seconds]
pluviaq has quit [Ping timeout: 240 seconds]
brettgilio has joined #ocaml
pluviaq has joined #ocaml
jabuxas has joined #ocaml
jabuxas has quit [Ping timeout: 268 seconds]
pi3ce has joined #ocaml
<discocaml>
<darrenldl> is there a file globbing library around that does the traversal smartly for me instead of just providing a test predicate?
mbuf has joined #ocaml
<discocaml>
<darrenldl> can't seem to spot any, will just have to write one myself ig
yoyofreeman has quit [Quit: Leaving]
zanetti has joined #ocaml
zanetti has quit [Quit: zanetti]
<discocaml>
<barconstruction> Has OCaml ever been spelled O'Caml in any official OCaml documentation, ever?
<discocaml>
<barconstruction> Even like 20 years ago
<adrien>
ocaml, O'Caml, OCAML, and probably every other formatting you can come up with
<discocaml>
<peuk> Occam's Hell
pi3ce has joined #ocaml
waleee has joined #ocaml
<masterbuilder>
companion_cube: Yeah, already doing that, you mean emitting the satisfying assignment or an UNSAT proof, right? I have my test suite hooked up to GRAT for verification. my test suite has 50 thousand formulas and only 3000 of those time out after 10 seconds, so that makes me fairly confident the solver is correct by now :) integrating an external verifier into the project did indeed really help with debugging the watched literals implementation
<masterbuilder>
which had a subtle bug in the first attempt
<masterbuilder>
only 100 time outs after switching to an array representation for the clauses
bartholin has joined #ocaml
kurfen has joined #ocaml
kurfen_ has quit [Ping timeout: 268 seconds]
amk has quit [Ping timeout: 272 seconds]
amk has joined #ocaml
duncan has left #ocaml [#ocaml]
<companion_cube>
Very cool
trillion_exabyte has quit [Ping timeout: 240 seconds]