* An Ada Typing problem
@ 1987-09-06 14:44 Marc.Graham
0 siblings, 0 replies; 2+ messages in thread
From: Marc.Graham @ 1987-09-06 14:44 UTC (permalink / raw)
Date: 2 Sep 1987 12:38:45-EDT
I would like to determine if Ada can be made to handle NULL values in an
elegant, efficient way. The problem arises in interfacing a database
language (namely SQL) and Ada.
In brief, I would like to define a type which properly includes all values
and operations of the predefined (package STANDARD, appendix F) type
INTEGER and also includes one new value: NULL. The rules of arithmetic
remain unchanged for values in INTEGER. The rule extending to NULL is: any
operation involving the NULL value returns the NULL value.
I want the solution to have the following properties: any expression valid
for objects of type INTEGER is valid for objects of the new type. The
solution must be ***very efficient at run time*** and reasonable at compile
time. Run time efficiency includes: evaluation of arithmetic operations;
conversion costs.
For the conversion problem: Assume the DBMS delivers (and expects) values in
the form of pairs <x,y> where y is an indicator and takes on some special
value when the value represented is null; otherwise, the value represented
is the value of x. ***Make no assumptions about x and y (e.g. length in
bits, encoding scheme, etc)***** Can a solution requiring ****zero****
runtime conversion costs be produced?
Mail your solutions to me (marc@sei.cmu.edu) or, more interestingly, post
them here for comments.
^ permalink raw reply [flat|nested] 2+ messages in thread
* An Ada Typing problem
@ 1987-09-02 16:38 Marc.Graham
0 siblings, 0 replies; 2+ messages in thread
From: Marc.Graham @ 1987-09-02 16:38 UTC (permalink / raw)
I would like to determine if Ada can be made to handle NULL values in an
elegant, efficient way. The problem arises in interfacing a database
language (namely SQL) and Ada.
In brief, I would like to define a type which properly includes all values
and operations of the predefined (package STANDARD, appendix F) type
INTEGER and also includes one new value: NULL. The rules of arithmetic
remain unchanged for values in INTEGER. The rule extending to NULL is: any
operation involving the NULL value returns the NULL value.
I want the solution to have the following properties: any expression valid
for objects of type INTEGER is valid for objects of the new type. The
solution must be ***very efficient at run time*** and reasonable at compile
time. Run time efficiency includes: evaluation of arithmetic operations;
conversion costs.
For the conversion problem: Assume the DBMS delivers (and expects) values in
the form of pairs <x,y> where y is an indicator and takes on some special
value when the value represented is null; otherwise, the value represented
is the value of x. ***Make no assumptions about x and y (e.g. length in
bits, encoding scheme, etc)***** Can a solution requiring ****zero****
runtime conversion costs be produced?
Mail your solutions to me (marc@sei.cmu.edu) or, more interestingly, post
them here for comments.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1987-09-06 14:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-09-06 14:44 An Ada Typing problem Marc.Graham
-- strict thread matches above, loose matches on Subject: below --
1987-09-02 16:38 Marc.Graham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox