Re: Unit validation in spreadsheets



On Tue, Mar 09, 2004 at 11:17:13AM -0800, Paul A. Steckler wrote:
We do handle circularity.  However, it's important to keep clear on
the distinction between user visible expressions and calculation
inside functions.  We'd need to handle those on a one off basis
somewhat.  So if someone wanted to add a metre to a litre via '+' we
could catch it, but SUM would take more work.

Right -- our design addresses exactly that issue.  For each 
function F, such as SUM, we generate a "unit transformer" F^ 
that does the right thing.  When there's circularity, this 
setup breaks down because the recursion doesn't terminate.
For that case, we use constraints that can be solved 
straightforwardly.  

That is going to be a huge amount of work in some cases.  There are
on the order of FIVE HUNDRED functions.
 
Great.  The key will be in getting a coherent design.

From a mathematical viewpoint, I think we have one.  But 
of course there's lots to do, implementation-wise.

Ok.  Thats a starting point.  The first step will be to consider a
data model.  It's clear that the best bet is to hook into the value
format at some level.

    entering '10mL'
would recognize mL as unit and store that as part of the format

I'd have to see what you mean by unit transformer.  It's unclear to
me whether that could generate code at compile time, or whether it
would need to be interpretted later.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]