[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Aldor %% bindings
From: |
Page, Bill |
Subject: |
[Axiom-developer] Aldor %% bindings |
Date: |
Tue, 14 Mar 2006 03:56:20 -0500 |
Ralf, and other Aldor experts;
Section "7.5 Subtypes" of the Aldor Users Guide says:
Note that Aldor is constructed so that a domain is only a
member of a named category if it explicitly inherits from
the category -- not if it merely exports the same collection
of (explicit) declarations\1.
Footnote \1 says:
In the current implementation, each named category C
implicitly exports a symbol named \%%" with type C (see
Section 8.12), whose presence is tested for in checking
category membership.
Note: 8.12 is a typo. It should say 8.11.
Section "8.11 With" says::
A 'with' expression also defines a constant named "%%" for
each category from which the 'with' expression inherits.
The type of %% is the inherited category, and the value
is the domain viewed as a member of that category...
The %% bindings are generally most useful for checking
conditions.
-------
Can anyone explain the usage of %% and give some examples
where it is used to "check conditions"?
What does it mean to be a "domain viewed as a member of
a specific category"?
Apparently %% can have multiple bindings. About the
example in section 8.11 we read that:
In the example, %% bindings are in scope for the
following categories:
BinaryAggregate, BooleanArithmeticType,
BoundedFiniteLinearStructureType Boolean,
BoundedFiniteDataStructureType Boolean,
FiniteLinearStructureType Boolean, PrimitiveType,
and so on.
How can I access the value (associated domain?) of a
particular binding?
Any hints about how to understand this would be greatly
appreciated.
Regards,
Bill Page.
- [Axiom-developer] Aldor %% bindings,
Page, Bill <=