gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] ISO SYSTEM clarification


From: Iztok
Subject: Re: [Gm2] ISO SYSTEM clarification
Date: Tue, 29 Apr 2003 09:20:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903

Gaius Mulley wrote:

Hi,

I'm currently implementing the ISO SYSTEM module and was wondering
whether other compilers support SHIFT and ROTATE on non SYSTEM
types. Ie is it permissible to:

Gardens Point M2: SHIFT,ROTATE (VAR b : BITSET; n : INTEGER);

StonyBrook: SHIFT, ROTATE (set : PackedSetType; shift : INTEGER) : PackedSetType;

StonyBrook M2 considers sets as having a boolean membership flag for each value in the base type. The difference between the SET and the PACKEDSET (which is SBM2 extension) is that the PACKEDSET has booleans represented as bits while the SET elements can be realized at compiletime (by compiler itself) as any possible representation of the boolean. PACKEDSET has also determined positions of the bits inside the processor word regarding their basetype value.

So, the answer for your question would be - SBM2 would compile your example while the GPM would not. I would say that the operations would work for long sets also for SBM2 while I am not so sure for GPM. I would have to test it which I (currently) do not have time for.

Sorry for late answer - I was changing my appartement and was very very busy last days.

Iztok Kobal

FROM SYSTEM IMPORT SHIFT ;

VAR
  foo: SET OF CHAR ;

BEGIN
  foo := {'a', 'b'} ;
  foo := SHIFT(foo, 1)
END

Thanks Gaius

The 4th Interim version working draft seems to restrict the type to a
system type, whereas the iso definition modules have a more relaxed view..

Gaius

_______________________________________________
gm2 mailing list
address@hidden
http://floppsie.comp.glam.ac.uk/mailman/listinfo/gm2

.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]