Search found 76 matches
- Sat Oct 05, 2013 6:42 pm
- Forum: Language Issues
- Topic: Expression evaluation
- Replies: 4
- Views: 10464
Re: Expression evaluation
Prior to your response, I was rechecking "Inheritance Model". My issue arises from section 10 of that document. For the first time using Rel/Tutorial D, I feel I disagree with a design point of the language, rather than merely failing to understand the syntax. As a consequence I will raise...
- Sat Oct 05, 2013 3:07 pm
- Forum: Language Issues
- Topic: Expression evaluation
- Replies: 4
- Views: 10464
Re: Expression evaluation
So what if there are more than one subtype; with overlapping constraints such as (an addition to my previous example): TYPE positive_ub_integer IS { unbounded_integer CONSTRAINT ( CAST_AS_INTEGER ( THE_VALUE ( unbounded_integer ) ) > 0 ) OR THE_VALUE( unbounded_integer ) = "unbounded" POSS...
- Fri Oct 04, 2013 6:16 pm
- Forum: Language Issues
- Topic: Expression evaluation
- Replies: 4
- Views: 10464
Expression evaluation
I am puzzled by the action of the type system in some respects and am seeking clarification. If you think this query would be better directed to Hugh Darwen, I will submit it on the TTM list. I have defined two types, one inheriting from the other, and one operator on the parent type as follows: TYP...
- Tue Oct 01, 2013 12:10 pm
- Forum: Language Issues
- Topic: Relation valued parameters
- Replies: 5
- Views: 12207
Re: Relation valued parameters
Thanks for the pointer to an example - I'll pursue that.
- Mon Sep 30, 2013 4:03 pm
- Forum: Language Issues
- Topic: Relation valued parameters
- Replies: 5
- Views: 12207
Re: Relation valued parameters
Could you possibly expand on your suggestion a little - would the syntax simply be execute.......(the listing of my statement)? I am finding that I am writing quite a lot of boilerplate code such as: VAR Dir VIEW WITH ( A := ( sys.Catalog WHERE Owner <> "Rel" ) { Name, Definition }, B := (...
- Fri Sep 27, 2013 3:15 pm
- Forum: Language Issues
- Topic: Relation valued parameters
- Replies: 5
- Views: 12207
Relation valued parameters
Is it possible to define operators which have, as their parameters, relations of any type? Below is my naive attempt to define such an operator.
OPERATOR test ( P RELATION, Q RELATION ) RETURNS RELATION;
return P JOIN Q;
END OPERATOR ;
OPERATOR test ( P RELATION, Q RELATION ) RETURNS RELATION;
return P JOIN Q;
END OPERATOR ;
- Tue Sep 03, 2013 3:53 pm
- Forum: Rel Examples
- Topic: Rationale for developing another type system.
- Replies: 3
- Views: 11304
Re: Rationale for developing another type system.
I have not read Databases, Types and the Relational Model. It is apparently out of print, and not likely to be reprinted. At least this is the information I received when I oredered it. I have read several of Date's and Darwen's books, and some notes and other papers that have been published. These ...
- Tue Sep 03, 2013 3:40 pm
- Forum: Language Issues
- Topic: Expectations of a type system
- Replies: 2
- Views: 8747
Re: Expectations of a type system
I note what you say about composition - I have not yet explored that.I would certainly agree with you about the lack of distinction between UDTs and BDTs, except for one thing. In approaching the built in types in Rel in the way I did - unsure of the capabilities of Rel, and the implications in term...
- Wed Aug 28, 2013 5:31 pm
- Forum: Language Issues
- Topic: Expectations of a type system
- Replies: 2
- Views: 8747
Expectations of a type system
The following is the note I put together when compiling Ex10 in the example forum. As I am having some difficulty in getting to grips with the type model in TTM/Tutorial D/Rel, I have listed some of the behaviour I expect from a type system. Some of this behaviour is present in Rel and some not. Thi...
- Wed Aug 28, 2013 5:26 pm
- Forum: Rel Examples
- Topic: Rationale for developing another type system.
- Replies: 3
- Views: 11304
Rationale for developing another type system.
***NOTE*** This posting has been superseded by that dated 2013-11-13 below. This version has been retained, to keep the thread coherent. The new version replaces this one completely. ***NOTE*** This is the note I included in Ex 10, with my rationale for using a type system as the example, when Rel ...
- Wed Aug 28, 2013 5:24 pm
- Forum: Rel Examples
- Topic: Ex 10 A type system
- Replies: 3
- Views: 14356
Ex10 Type definition system
EDITED 2013-11-17 incorporating substantial refinements of the system. // // Bootstrap // OPERATOR LENGTH(s CHAR) RETURNS INTEGER Java FOREIGN return ValueInteger.select(context.getGenerator(), s.stringValue().length()); END OPERATOR; TYPE ID POSSREP { VALUE CHARACTER CONSTRAINT LENGTH ( VALUE ) <= ...
- Wed Aug 28, 2013 5:21 pm
- Forum: Rel Examples
- Topic: Ex 10 A type system
- Replies: 3
- Views: 14356
Re: Ex 10 A type system
OK - I'll put the script in this thread; the expectations in language discussions; and the rationale as a separate thread.
- Tue Aug 27, 2013 2:34 pm
- Forum: Language Issues
- Topic: Simple supertype, complex subtype
- Replies: 4
- Views: 11112
Re: Simple supertype, complex subtype
Thanks - that does exactly what I am trying to do. It is amazing how obscure the simple solution can be.
- Tue Aug 27, 2013 2:11 pm
- Forum: Rel Examples
- Topic: Ex 10 A type system
- Replies: 3
- Views: 14356
Ex 10 A type system
Ex 10 A type system This example is a reasonable sized system to illustrate many aspects of the syntax, particularly as it relates to data types and operators. The attached archive contains the following three files: script.txt - to generate the complete type system Why.txt - a full description of w...
- Mon Aug 26, 2013 9:55 am
- Forum: Language Issues
- Topic: Simple supertype, complex subtype
- Replies: 4
- Views: 11112
Re: Simple supertype, complex subtype
I am trying to define data types within a type system. The data type supertype is called base_data_type. This has a number of subtypes, such as arbitrary, symbolic, etc. One of these subtypes is time related - test_date below. This subtype can be represented as YYMM. So the components of test_date a...