[RPL/2] self compiling ?

BERTRAND Joël joel.bertrand at systella.fr
Lun 19 Nov 09:21:40 CET 2007


DEMAINE Benoit-Pierre wrote:
> BERTRAND Joël wrote:
>> 	Nope. An RPL/2 is a compound type that contains a void pointer and a 
>> type (3 characters). The only difference between a list and an 
>> expression (algebraic or RPN expression) is this type : "RPN" for RPN 
>> expression, "ALG" for algebraic and "LST" for list. But there is a 
>> fondamental difference between an expression and a list. You cannot use 
>> all intrinsic functions in an expression. Thus, RPL/2 has to analyze 
>> expression syntax _before_ conversion to avoid all syntax errors. It has 
>> to analyze semantic of expression too (you can use loops, conditional 
>> statement and these code structures have to be well written. For 
>> example, you cannot start your expression with THEN or END...). I think 
>> it is better to modify by approprate functions a preexistant expression 
>> than trying to transform a list in expression (that requires a lot of 
>> cpu time in validation process).
> 
> The Metakernel did not take time to perform all these checks. Checks
> were performed when exiting the editor; not when using commands like
> lst->prg. When the resulting object was not consistent, in the worst
> case, machine rebooted (cause in the worst case, the return stack get's
> empty too early).

	It's the main problem. In RPL/2, all objects are _always_ consistent. 
Objects are verified when they are pushed in stack, and not when they 
are used. Thus, you don't forget time to verify these objects and all 
stacks are consistents. Indeed, you _know_ by advance if system stack 
shall be corrupt due to a mistake in an expression.

	JKB


Plus d'informations sur la liste de diffusion RPL2