loda-lang / loda-rust

Web editor for the LODA language. Also includes my experiments with Abstraction and Reasoning Corpus ARC.
https://loda-lang.org/
Apache License 2.0
24 stars 2 forks source link

Indirect memory access #9

Closed neoneye closed 1 year ago

neoneye commented 2 years ago

I have not yet implemented the dollar dollar syntax. Example mov $0, $$0.

As of 7 sep 2021, there are around 50 loda programs that use indirect memory access.

ckrause commented 1 year ago

This would be very valuable. Example here: https://loda-lang.org/edit/?oeis=A41

neoneye commented 1 year ago

Yes, I'm working on it in this branch.

Status as of 20-sep-2022.

LODA programs that use indirect can be evaluated and works in most cases.

Indirect also works in the LODA-RUST miner.

I have not tried it in the webclient, but I think it works.

TODO: With huge numbers, then the mechanism for checking numbers, isn't working. The Semantics class has to be a template, either with limits-enabled, or unlimited. This is tricky.

TODO: Migrate semantics tests, to exercise the Semantics class. I don't think there is any problems in it.

TODO: The lpb instruction prepare for using indirect. I don't think there is any problems in it.

neoneye commented 1 year ago

Now indirect memory access is working in the web editor, and the miner.