Still wasting my time experimenting with arity checking in uxntal. I feel like there's something there to explore, but I can't say I really found what it is yet.
https://git.sr.ht/~rabbits/uxnbal/tree/master/item/src/uxnbal.tal
Still wasting my time experimenting with arity checking in uxntal. I feel like there's something there to explore, but I can't say I really found what it is yet. 5 comments
[DATA EXPUNGED]
@neauoire I suspect it's impossible to guarantee. You'll either disallow legal programs or let illegal ones through. @akkartik I'm doing it per-routine at the moment, I'm not looking to doing it at the program scale since there's lots of I/O and optimisations going on. It finds some routines as linear, others as safe, and most as crazy unsafe. But I would at least be able to rate the different levels of safety in terms of routines. Most routines do away with load/save operations altogether by using only stack opcodes, making it easy to "rasterize". @akkartik One low-hanging fruits that I've noticed when trying to validate the program's own source file, is that I often make typos in my routine definitions, or just forget to add definitions altogether to places where the PC could jump to. That might be the tool that kicks my butt and get me to write proper routine defs. _Naming variables, |