Dear Stephen,

could you say a few words to the topic why Aldor only allows

   <domain> has <category>

instead of

   <domain or category> has <category>

?

Ralf

>> See AUG page 96:
>>
>> Has expressions
>> A "has" expression has the following form:
>>    dom has cat
>> where dom is a domain-valued expression, and cat is a category-valued
>> expression.
>>
>> So at least "has" is different in the Axiom interpreter or in SPAD.
>>
> 
> You are right, there is a difference between Aldor and OpenAxiom. In
> Aldor Type is not a category - it is a domain!
> 
> [EMAIL PROTECTED]:~# cat mylibs.as
> #include "aldor"
> #include "aldorinterp"
> #include "algebra"
> 
> [EMAIL PROTECTED]:~# aldor -gloop
> Aldor
> 
> Copyright (c) 1990-2007 Aldor Software Organization Ltd (Aldor.org).
> 
> Release: Aldor(C) version 1.1.0 for LINUX(glibc2.3)
> Type "#int help" for more details.
> %1 >> #include "mylibs"
>                                            Comp: 260 msec, Interp: 0 msec
> %2 >> Type
>   () @
>  with
>     ==  add ()
> 
> And subtypes of Type are categories, so like in OpenAxiom Category is
> also a domain - the domain of subtypes of Type.
> 
> %3 >> Category
>   () @
>  with
>     ==  add ()
> 
> Domains are the members of Type and therefore also are members of one
> or more Category.
> 
> For example, in
> 
>   http://www.csd.uwo.ca/~watt/pub/reprints/2003-cahand-aldor.pdf
> 
> Stephen Watt wrote:
> 
> "Each value belongs to some unique type, known as its domain, and the
> domains of expressions can be inferred statically. Each domain is
> itself a value belonging to the domain Type. Domains may additionally
> belong to some number of subtypes (of Type), known as categories."
> 
>> %8 >> Cat:Category == with;
>>
>> %11 >> Integer
>>  () @ Join(
>> PrimitiveType with
>>        coerce: BInt -> %
>>        coerce: % -> BInt
>>    ==  add ()
>> ,
>> IntegerType with export to IntegerSegment(%)
>>    ==  add ()
>> )
> 
> http://www.aldor.org/docs/HTML/chap7.html#7
> 
> Aldor does not use the name 'Domain' to refer to any type. So far I
> have not found any explicit name for the category
> 
>     with {}
> 
> so I guess it is a cruel little comedy that 'Domain' seems like a good
> name for the top of the *category* hierachy in Aldor though it is
> called 'Type' in Axiom. Meanwhile 'Domain' in Axiom corresponds to
> 'Type', and 'Type' in Aldor is a domain... ;-(
> 
>> ...
> 
> Ralf, you are also right that 'has' has a more restricted meaning in
> Aldor than in Axiom. In Axiom we can write:
> 
>    <domain> or <category> has <category> or <attribute>
> 
> an <attribute> is just a named category with no exports.
> 
> In the Axiom interpreter
> 
>     <category 1> has <category 2>
> 
> is true if <category 1> is a subtype of <category 2>
> 
>   <domain> has <category>
> 
> is true if <category> appears in the a 'Join' expression or to the
> left of the keyword 'with'. This is described in


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to