[bitc-dev] Simplified defrepr

Jonathan S. Shapiro shap at eros-os.com
Wed Mar 21 19:52:10 CDT 2007


I would like to request a small change to your syntax in the WHERE
clause. I would prefer that your example:

> (defrepr repr
>     (C1  i: (bitfield uint32 2)
>          j: (bitfield uint32 30) (where (i 0))
>     (C1  i: (bitfield uint32 2)
>          l: (bitfield uint32 20)
>          m: (bitfield uint32 20) (where (i 1))
> )

should instead be written

(defrepr repr
    (C1  i: (bitfield uint32 2)
         j: (bitfield uint32 30) (where (= i 0))
    (C1  i: (bitfield uint32 2)
         l: (bitfield uint32 20)
         m: (bitfield uint32 20) (where (= i 1))
)

This will allow us to introduce general comparison predicates later if
we ever want to handle (for example) Iavor's instruction set encoding
example.


shap



More information about the bitc-dev mailing list