3 ms·
> Trealla is not WAM-based. It uses tree-walking, structure-sharing and deep-binding. Source is compiled to an AST that is interpreted at runtime Can somebody
by moonchild 4y ago
> Trealla is not WAM-based. It uses tree-walking, structure-sharing and deep-binding. Source is compiled to an AST that is interpreted at runtime
Can somebody familiar with prolog implementation techniques motivate this choice? It seems to me--given knowledge implementing very different sorts of languages--that tree-walk interpretation is generally slow compared with other methods, which seems strange given this implementation touts its efficiency, but perhaps there are reasons why that doesn't matter here?
- infradig 4y agoTree-walking is a bit of a misnomer here, it actually uses a compiled-to-bytecode representation of the AST. Part of the motivation is to avoid copying and structure building, which WAM's do, a lot.
- dkjaudyeqooe 4y agoI was actually trying to find where the bytecode is evaluated, but it doesn't leap out at you, can you provide any pointers?