eusprig 2004computational models of spreadsheet development1/23 computational models of spreadsheet...
TRANSCRIPT
EuSpRIG 2004 Computational Models of Spreadsheet Development 1/23
Computational Models of Spreadsheet Development
Basis for Educational Approaches
Karin Hodnigg, Markus Clermont, Roland T. MittermeirUniversity of Limerick, University of Klagenfurt
EuSpRIG 2004 Computational Models of Spreadsheet Development 2/23
Motivation
To raise spreadsheet quality, spreadsheet education
has to start from the right paradigms.
EuSpRIG 2004 Computational Models of Spreadsheet Development 3/23
Outline
Conventional Programming Paradigm and Spreadsheet Programming Characteristics
Implementing the Spreadsheet Paradigm
Spreadsheet Semantics(Project-Screen-Paradigm)
EuSpRIG 2004 Computational Models of Spreadsheet Development 4/23
Conventional Programming Paradigm and Spreadsheet Programming Characteristics
EuSpRIG 2004 Computational Models of Spreadsheet Development 5/23
The Spreadsheet Paradigm
• Spreadsheets ≠ conventional program
• Data dependencies – Data Flow Program (?)
– Graph Reduction Problem (?)
A1
A2 B2
B4
A3
EuSpRIG 2004 Computational Models of Spreadsheet Development 6/23
Data Flow Semantics
A1
A2
B4
A3
Data Flow Semantics Spreadsheet Semantics
100
100A2 B2
B4
A3100
1
1
10
10
B2
0.2
100 100
c
A1A1
c
cA2 B2
B4
1
10 100
EuSpRIG 2004 Computational Models of Spreadsheet Development 7/23
Graph Reduction Semantics
A1
A2 B2
B4
A3A2 B2
B4
A3
A1
Graph Reduction Semantics Spreadsheet Semantics
1
10 100 100
0.2
10010010
1
0.2
EuSpRIG 2004 Computational Models of Spreadsheet Development 8/23
The Whole Picture
• Local Evaluation (of a cell‘s value)– graph reduction (DDG), possibly lazy
• Global Evaluation (changes in a cell)– change tokens (reverse DDG), eager
• Scope– Conventional scope hierarchy
• local and global (classes/blocks)
– Spreadsheet’s scope• complete sheet• portion of sheet (possibly) affected by change
EuSpRIG 2004 Computational Models of Spreadsheet Development 9/23
Implementing the Spreadsheet Paradigm
EuSpRIG 2004 Computational Models of Spreadsheet Development 10/23
Evaluation Strategies
- Excel© value recalculation and change- Propagation (Formula Evaluator): list
- Gnumeric – Distinct data structures for
• single dependencies (=A1) • range dependencies (=SUM(A1:A5))
– Every (transitively) dependent cell in a list (“evaluation queue”)– Recursive traversing of the given expression tree
EuSpRIG 2004 Computational Models of Spreadsheet Development 11/23
Circular References
• No explicit control flow no loop concept
• Microsoft Excel©– Ignorable warning, cell provides 0-value– “Iteration incorporation”: control panel
• cell re-evaluation after any change
• Gnumeric– Calculated without any warning– Re-evaluation on change in the transitive closure – Some functions support circular references
EuSpRIG 2004 Computational Models of Spreadsheet Development 12/23
Development Process Specialties
• Automated fill of cells (click and drag)– Automated generation of formulas / constants
• Drag-and-Drop• Copy-and-Paste
Adaptation of parameters – of formulas– of references
EuSpRIG 2004 Computational Models of Spreadsheet Development 13/23
Copy/Paste and movement heuristics
• Copy-and-Paste of cells ≠ Moving cells
range references > distinct cell references > geometrical pattern
EuSpRIG 2004 Computational Models of Spreadsheet Development 14/23
Spreadsheet Semantics and the Projection-Screen-Model
EuSpRIG 2004 Computational Models of Spreadsheet Development 15/23
Relationships and Visibility
• Cell level functional paradigm– Computations in cells are mainly covered.
• Global “picture” ?– proposed model has to meet the basis.
• Visibility and Scope– (Transitively) dependant cells– Implicit visibility of cells
• Source cell does not “see” the target cell.• Cell “sees” all referenced cells.
EuSpRIG 2004 Computational Models of Spreadsheet Development 16/23
The Projection Screen Model
value
valuevalue value
value
literalliteral
formula
formula
formula
literal
value
value
value
value value
value
literalliteral
formula
literal
formula
formula
value
valueaggregation
formula
aggregation range
EuSpRIG 2004 Computational Models of Spreadsheet Development 17/23
The Projection Screen Model with Aggregation
value
valuevalue value
value
literalliteral
formula
formula
formula
literal
value
value
value
value value
value
literalliteral
formula
literal
formula
formula
value
valueaggregation
formula
aggregation range
EuSpRIG 2004 Computational Models of Spreadsheet Development 18/23
Patterns resulting from development process
• Many-handed figures• Queue on a Staircase• Flying Carpets• Recursive Images
EuSpRIG 2004 Computational Models of Spreadsheet Development 23/23
Summary
• Spreadsheet System Implementations are in conflict
– with established paradigms– with each other
• No established conceptual model – global vs. local viewpoint
Proper training to raise spreadsheet quality needed!
- “Project-Screen”-Model
EuSpRIG 2004 Computational Models of Spreadsheet Development 24/23
“The limits of my languagemeans the limits of my world.”
– Ludwig Wittgenstein –