On Thu, Jun 05, 2025 at 09:29:43AM +0800, Qian Yun wrote: > On 6/5/25 3:22 AM, Waldek Hebisch wrote: > > Today we have 59872 lines of Lisp and Boot code in src/interp > > (4100 lines of Lisp and 55772 lines of Boot). That is decrease > > by 1522 compared to FriCAS 1.3.11. As I wrote eventually > > I would like to limit Lisp to lowest level support code and > > move other functionality to Spad code. > > So the goal is to have the Spad compiler/interpreter written > in Spad, compiling Spad files to Lisp, and the bootstrap method > will be similar to "src/boot/compiled/"?
Yes. This requires some changes. Minimally we need "persistent" domains and packages: currently Spad compilation erases all data stored in Spad domains and packages. Clearly, interpreter data structures need to be preserved. To write Spad runtime in Spad we need ability to generate code which does not depend on runtime. Also, there are details to be decided. One approach is "big language" bootstrap, that is having a lot of Lisp which when compiled by Lisp compiler gives fully functional Spad compiler. That may be the easiest way, but would lead to large amount of bootstrap Lisp. Alternatively, we can try to write Spad compiler in relatively small subset of Spad. In that way we could have small bootstrap compiler ( build by compilation from Lisp files) which compiles full Spad compiler, which compiles the rest. The second approach is more complicated, but could lead to rather small amount of bootstrap Lisp. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/aED6BoM9WaXIZKaM%40fricas.org.