Re: how to approach Const?

Sandro Hawke wrote:
> 1.  One parse-graph node for each Const?   (suggested: yes)
>
>     If the same constant occurs several times in a ruleset, are the
>     occurances collected in the abstract parse graph?  Does the "Const"
>     element represent a constant or an occurance-in-the-parse-stream of
>     a constant?  I had some discussion with Gary and Hassan about this,
>     in Innsbruck, and I think our conclusion was the former, they should
>     be collected, as in your version (i) above.
>
>
>   
No, my preference is simply <Const value="someValue" type="optionalType"/>
I also like <Var name="someName" type="optionalType"/> although we 
hastily sort of "decided" against types for variables in Innsbruck.

If you want "named constants", aka "manifest constants", "static final 
variables", then I suggest
<equals>
    <side>
       <Var name="pi"/>
    </side>
    <side>
       <Const value="3.1416" type="xsd:double"/>
    </side>
</equals>

Received on Monday, 16 July 2007 05:53:08 UTC