9996Re: "ocaml_beginners":: Function executed more than once in recursion?
- Aug 1, 2008Martin,
Martin Jambon wrote:
> On Fri, 1 Aug 2008, hmf@... wrote:..
>Which I did in fact.
> Without looking deeply at your code, I suspect that your problem is in:
> expr1 :: expr2
> You can't assume that expr1 will be evaluated before expr2.
> Always do:That's it! I was already thinking of race-conditions and what not.
> let x = expr1 in
> x :: expr2
> And sorry if it's not the cause of your problem...
I was not understanding why the similar functions:
Bdd.ithvar man i in
Bdd.newvar_at_level man i in
Bdd.newvar man in
which create variables did not generate the same results.
The problem is "Bdd.newvar_at_level man i" shifts the variables
for a given level "i" to make room for new ones. I had assumed
I was going through the levels in order, hence expected no
A quick test shows that a call "Bdd.newvar_at_level man i"
with "i" in inverse order generates those extra variables.
> Archives up to December 31, 2007 are also downloadable at
> The archives of the very official ocaml list (the seniors' one) can be foundat http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo!Groups Links
- << Previous post in topic