momo5502
Joined 4 years ago
Joined 4 years ago
Also, it feels like just fuzzing the function is slow, compared to simply checking bytes. Fast feedback allows agents to iterate much faster. At some point I wrote a tool that simply proves semantic equivalence, while ignoring irrelevant changes, e.g. register selection or stack slot changes. Turns out it was way too slow as a harness. I still used it to verify some of the remaining functions.
It turns out that getting functions byte-matching is actually not that complicated. Most functions are small and can be one shotted, and over time, agents figured out rules how to control code generation for more complex functions. They wrote down techniques and tricks on how to control register selection for example, or how certain control flow operations may impact basic block ordering, etc. Super insteresting what they figured out. So the further we got into the project, the easier it was to get functions exact.
Due to this strict harness, we were able to use extremely dumb models efficiently. I think at least 200-300B of tokens (maybe even more) were processed by Luna.
Given that Astra for example is 100x more expensive per token than Luna, a high token consumption doesn't necessarily mean high cost. So these 300B Luna tokens would equate to 3B Astra tokens and roughly 15B Sol tokens.
Unfortunately a huge part of the logs is lost, so I can't do a detailed analysis on which models were used, how much they cost, etc.
To answer your actual question, it does both. It emulates both windows and linux (although linux implementation was done by a contributor and it's probably not as evolved as the windows part). It also does so on every platform, so you can emulate windows on your android/ios phone, even on the web. It cross compiles to pretty much every platform.
It supports various emulation backends, e.g. Unicorn (which uses QEMU under the hood), but also Hyper-V on windows. That's where the sandboxing part comes in to play: As Hyper-V is pretty fast, the emulator starts turning into a sandbox.
Maybe some day I can add KVM support so you can run sandboxed Windows apps on Linux, but I haven't had the time yet. So at the moment, only the slow emulation backends work on Linux.
Obviously matching functions byte-byte is not it, but I think with enough creativity, you can have guardrails and oracles almost everywhere.
E.g. before diving into feature development, you can have agents generate a test suite based on your implementation first. Then, when developing features, this test suite shows what broke and agents can double check if that was intended.
How that test suite looks like obviously highly depends on the environment.