- Isabelle 53.2%
- Python 24%
- Standard ML 9.8%
- HolyC 9.5%
- C 2.9%
- Other 0.6%
| cli | ||
| examples | ||
| guest | ||
| media | ||
| src | ||
| tests | ||
| .gitignore | ||
| Makefile | ||
| README.md | ||
| ROOT | ||
Pixel expressions compile to native x86_64 for TempleOS through an Isabelle/HOL compiler, with proofs of constant folding, register allocation, bounded branching and instruction level execution of the emitted bytes
Build
It uses Isabelle2026 and Python, plus NumPy and FFmpeg for video:
make check
make payload
Copy .build/payload/* onto C:/ in TempleOS and run:
#include "C:/Remy.HC";
Verify;
Show(0);
Usage
Compile, simulate and evaluate a shader, with both results returning 3:
.build/remy examples/Rings.remy /tmp/rings.bin
.build/remy simulate /tmp/rings.bin 17 23 41
.build/remy eval examples/Rings.remy 17 23 41
Compare against the original stack backend:
make measure
Live
Build a guest image, boot it and reload the shader on every edit:
make guest TEMPLE_ISO=/path/to/TempleOS.ISO
qemu-system-x86_64 -m 512 -smp 2 -cdrom .build/guest.iso \
-chardev socket,id=live,path=/tmp/remy.sock,server=on,wait=off \
-serial chardev:live &
python3 cli/watch.py examples/Rings.remy --socket /tmp/remy.sock
Movie
Build and boot a disc from any video with sound:
make movie VIDEO=clip.mp4 TEMPLE_ISO=/path/to/TempleOS.ISO
qemu-system-x86_64 -m 1024 -smp 2 -cdrom .build/movie.iso -boot d \
-audiodev pa,id=sound -device AC97,audiodev=sound
Play it in TempleOS, using the up and down arrows for volume and Escape to stop:
#include "Movie.HC";
Play;
Its arithmetic is proved and generated into HolyC, while the device code, copy loop and converter are not verified
Silicon
The interpreter is proved sound against the x86 semantics and replayed against the host CPU on random programs:
python3 tests/silicon.py
HolyC
The whole verified compiler also runs inside TempleOS as generated HolyC:
#include "C:/Shade.HC";
Shade("(xor x y)");
Check it against the Poly/ML build:
make holy TEMPLE_ISO=/path/to/TempleOS.ISO
