Authors
Martin Erwig & Margaret Burnett
Abstract
We define a unit system for end-user spreadsheets that is based on the concrete notion of units instead of the abstract concept of types.
Units are derived from header information given by spreadsheets. The unit system contains concepts, such as dependent units, multiple units, and unit generalization, that allow the classification of spreadsheet contents on a more fine-grained level than types do.
Also, because communication with the end user happens only in terms of objects that are contained in the spreadsheet, our system does not require end users to learn new abstract concepts of type systems.
Sample
We demonstrate the unit inference rules and the unit simplifications with an example spreadsheet and corresponding header information.
For cell D3 we obtain the unit Month[May]&Fruit.
On the other hand, a cell with an expression +(B3; C4) would lead to a unit error because we get two different months and two different fruits, which prevents the application of the distributivity rule and thus prevents the unit expression from being reduced to a well-formed unit.
Publication
2002, 4th International Symposium on Practical Aspects of Declarative Languages, January, pages 173-191