Closed jonahbeckford closed 4 months ago
Indeed, calling main
redoes the whole computation and reads.
Unfortunately, there are no good entry points to restart a computation from a solver state yet, but this is rather easy to fix. I will try to have a look next week.
I'm trying to use codept at a lower level by reimplementing the let rec solve_harder ancestors state = ...
function.
If successful I may not need this issue so please don't take any time on this yet.
It is much better to use codept as a library in my use case. So this issue is unnecessary ... and I suspect others who needed to re-use the solver state should just be implementing their own solve_harder
loop.
Closing. Thx.
Category: non-urgent optimization question
I am using
codept
as the dependency analyzer for an upcoming OCaml-based scripting framework called "DkCoder" [1]. Very excellent; thanks forcodept
!DkCoder distinguishing features are:
dune
based project if you want to create native OCaml executables.That first feature ("simple package manager") is where
codept
plays a part. Today I am usingcodept
to analyze script code like:to see that
UnknownPackage_Std
andXyz
are unknown module references.DkCoder uses naming conventions to know that
UnknownPackage_Std
is an external package. Now that I know thatUnknownPackage_Std
is an external package, I can download that package (or perhaps add it to the includes if it is available locally) and continue the analysis until no more external packages need to be downloaded.Since I'm just getting used to working with
codept
, I am using thecodept_core
library and am just restarting theAnalysis.main
function whenever I resolve (ie. download/include) an external package.I think that throws away all of the solver state, right? What is the cleanest way to not throw away prior state?
(I'm also familiar with the
codept
signature files; I prepare them offline so the analysis resolves bundled DkCoder packages likecmdliner
andlwt
)[1] It is free but some of it uses non-OSI binary downloads. But full source is available to anyone doing PL research (if you want it).