lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jun 30, 2010 at 11:07 PM, Ben R. <benr.mail@gmail.com> wrote:
> Hello all,
> Given any Lua program, I would like to build something that provides the
> next features:
> - "execute X steps" - runs the program for exactly X bytecode instructions,
> stops the execution and writes some output file.
> - "continue Y steps" - given some output file of the above feature,
> continues execution from step X till step Y (and outputs a new file if the
> program didn't end).
> Obviously, I'm ready to play with the VM code if needed..
> Currently I'm still thinking whether Lua is indeed suitable for that (it
> seems so), and I would be happy to hear any opinions or suggestions.
> Thanks!
> Ben

My initial thoughts would be:
1) debug.sethook to execute for X steps
2) Pluto (http://lua-users.org/wiki/PlutoLibrary) for writing Lua
state to file and then loading it back