[Aldor-l] exports and constants

Bill Page bill.page1 at synthesis.anikast.ca
Tue Jul 25 11:09:45 EDT 2006


On July 25, 2006 10:11 AM Ralf Hemmecke wrote:
> 
> Not in Axiom, but have you looked into the files by Peter 
> Broadbery for the creation of libaxiom?
> 
> There is a file as/attrib.as.pamphlet which starts like this...
> 
> ---BEGIN
> import from AxiomLib;
> inline from AxiomLib;
> 
> macro {
> 	Attribute X == X: Category == with;
> }
> 
> Attribute nil;
> Attribute infinite;
> Attribute arbitraryExponent;
> ...
> Attribute commutative(T: Type);
> ---END
>

Yes, exactly. This is how Axiom's "attributes" are implemented
in Aldor.
 
> 
> The attributes are an ad hoc way to state properties in a bit
> more formal way.

>From an ad hoc practical point of view I think that is correct,
although I would prefer the term "axiom" rather than "property".
Usually these attributes represent mathematical axioms and the
library code tests these axioms as a means to implement various
simplifications and to choose representations, etc.

> But we certainly all agree that there should be a better 
> language construct that enables the programmer to state
> properties by arbitrary logical formulas.

There is a close connection between types, inheritance and
logic. I think it is reasonable that Aldor's type system is
where at least some of this logic is implemented. I think is
why we see "has" expressions so often in conditions in various
boolean combinations in the library code - that is where such
logic is implemented in Axiom.

> 
> > Polynomial Integer has commutative("*")
> 
> We had that before... for libaxiom 'commutative("*")' is
> a category constructor. So don't be surprised if
> 
> Polynomial Integer has commutative("HappyBirthday")
> 
> also gives true.
> 

I am not surprised - just disappointed. ;)

Regards,
Bill Page.





More information about the Aldor-l mailing list