<div dir="ltr">Hi dev,<div><br></div><div>This is more of a random question than anything. I was wondering if it is possible to get a theorem about k-fold bootstrap of the compiler, i.e. using the compiler to iterate compilation on itself once in the logic and k-1 times (outside the logic).</div><div><br></div><div>Concretely, 1-fold bootstrap would be what we have right now, so the code being compiled in the logic looks like:</div><div><br></div><div>...</div><div>val main str = print (compile conf str);</div><div><br></div><div>A 2-fold bootstrap could look like:<br></div><div><br></div><div>...</div><div>val cml_ast = ... //from an iterated translation of the compiler AST in HOL into a translated AST</div><div>val main = print(compile conf (cml_ast));</div><div><br></div><div>i.e. the output is a program, that when run, compiles the compiler AST.</div><div><br></div><div>My sense is that such a k-fold bootstrap theorem could probably be done with what we have now (replace cml_ast with the appropriate n-1 th translation). The corresponding top-level correctness theorem would have some weird nested assumptions about each time the bootstrap is ran.</div><div><br></div><div>One possible use of 2-fold bootstrap: one could evaluate in HOL using a fast (but less optimizing) version of the compiler, then turn on all the optimizations inside cml_ast. It probably doesn't matter for our bootstrap speed though.</div><div><br></div></div>