unknown
1970-01-01 00:00:00 UTC
Yes, that is the point. Apparently Stephen Watt's answer in Aldor is
that allow the domain of 'Domain' to be 'Domain' is ok provided we are
careful exactly what operations we expect to provide in 'Domain'. I
kind of like this approach since I think in general we do want a
semantics in which we have "vary large" classes like 'Domain'.
a fairly well-defined concept, no?
the domain 'Segment PositiveInteger' provided that there is also a
coercion of such objects to an equivalent Finite domain so then at
least in the interpreter I could write for example like:
for i in DirectProduct(3,1..9)
and
map(x->x+1,expand()$DirectProduct(3,1..9))
where in 'DirectProduct' we have the operations like:
expand: () -> List %
+: (%,%) -> %
1: () -> %
Iteration over the members of such a domain seems like the most common
requirement but not the only one.
Regards,
Bill Page.
that allow the domain of 'Domain' to be 'Domain' is ok provided we are
careful exactly what operations we expect to provide in 'Domain'. I
kind of like this approach since I think in general we do want a
semantics in which we have "vary large" classes like 'Domain'.
| > |
| > | DirectProduct(4,1..9)
| > |
| > | but this does not work because '1..9' is not a type - it is an object
| > | of 'Segment PositiveInteger'.
| >
| > If it worked, what would you have liked the mathematical meaning to
| > be, and why?
| >
|
| I would like the result to be a finite domain.
that says what property the result would have, but it does not tell me
what the meaning of the result is. I would like to underdstand
the mathematical meaning.
I think the concept of an interval (segment) on the domain Integer is| > | DirectProduct(4,1..9)
| > |
| > | but this does not work because '1..9' is not a type - it is an object
| > | of 'Segment PositiveInteger'.
| >
| > If it worked, what would you have liked the mathematical meaning to
| > be, and why?
| >
|
| I would like the result to be a finite domain.
that says what property the result would have, but it does not tell me
what the meaning of the result is. I would like to underdstand
the mathematical meaning.
a fairly well-defined concept, no?
[...]
|
|
| x:IntegerSegment 1..9
| y:=x + 1
|
| where the type of 'y' might be Union(IntegerSegment 1..9,"failed").
So, you are actually after a domain that constrains all operations on
the values of its objects to deliver a value in a specified bound. I
can be persuaded that IntegerSegment convays such meaning, but I'm not
sure the notation `1..9' is intuitive to me, given its other existing
meaning.
Do you have another suggestion?|
|
| x:IntegerSegment 1..9
| y:=x + 1
|
| where the type of 'y' might be Union(IntegerSegment 1..9,"failed").
So, you are actually after a domain that constrains all operations on
the values of its objects to deliver a value in a specified bound. I
can be persuaded that IntegerSegment convays such meaning, but I'm not
sure the notation `1..9' is intuitive to me, given its other existing
meaning.
...
I'm specifically after `1..9' that you would want to be a domain
and the various constructs you based on it.
Ok. Well as I said, I am willing to live with '1..9' being a member ofI'm specifically after `1..9' that you would want to be a domain
and the various constructs you based on it.
the domain 'Segment PositiveInteger' provided that there is also a
coercion of such objects to an equivalent Finite domain so then at
least in the interpreter I could write for example like:
for i in DirectProduct(3,1..9)
and
map(x->x+1,expand()$DirectProduct(3,1..9))
where in 'DirectProduct' we have the operations like:
expand: () -> List %
+: (%,%) -> %
1: () -> %
Iteration over the members of such a domain seems like the most common
requirement but not the only one.
Regards,
Bill Page.