HP Forums

Full Version: An HPPL compiler question...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Various documents say that programs are compiled when created. My question is whether the HPPL compiler compiles to some kind of p-code like java bytecodes (the CPU is Jazelle compatible and handles Java bytecodes in hardware/firmware).....or does it compile to ARM assembler with library calls? Then if it compiles to machine language, does it get optimized or is it very basic assembly language constructs with library calls?
Thanks
-Donald
Hello,

Nope, not that complex.
PPL programs are transformed into a tree representation of the program/expressions, with a program being a list of user functions, user functions being themselves lists of expressions or objects (like lists numbers, matrices...), expression having a standard tree structure.

The execution of a program is the sequential execution of these lists and expression trees.

The code is non-recursive (even if the program is), to allow deep recursive program execution (like a factorial).

It is not very memory efficient, but it is quite fast and relatively simple to implement.

Cyrille
So, to clarify, sounds like a parser. So, the original code is parsed and stored in a parsed tree. Then this tree is traversed and interpreted during execution. Right?
Thx
-D
Hello,

yep, that is about correct.

Cyrille
Reference URL's