On static analysis
Monday, August 31, 2009
Abstract of my study for the AGU
Here's the current draft of the abstract. I've found it a little tricky to write an abstract for work that I haven't yet completed but I've given it a go. I've gotten some excellent feedback from some of my colleagues (big up to: Steve, Neil, Jono, and Jorge) as to how to frame the problem and my "results" (in quotations because I don't yet have concrete results).
Feedback on clarity, wording, grammar, framing of the problem and results, etc... are very much welcome.On the software quality of climate models
A climate model is an executable theory of the climate; the model encapsulates climatological theories in software so that they can be simulated and their implications investigated directly. Thus, in order to trust a climate model one must trust that the software it is built from is robust. Our study explores the nature of software quality in the context of climate modelling: How do we characterise and assess the quality of climate modelling software? We use two major research strategies: (1) analysis of defect densities -- an established software engineering technique for studying software quality -- of leading global climate models and (2) semi-structured interviews with researchers from several climate modelling centres. We collected our defect data from bug tracking systems, version control repository comments, and from static analysis of the source code. As a result of our analysis, we characterise common defect types found in climate model software and we identify the software quality factors that are relevant for climate scientists. We also provide a roadmap to achieve proper benchmarks for climate model software quality, and we discuss the implications of our findings for the assessment of climate model software trustworthiness.
Workshops at PowerShift Canada
Monday, August 17, 2009
- A climate science backgrounder
- Climate modelling 101
- An insider's perspective on the IPCC
- Communicating the science of climate change
- Developing Canada's GHG inventory
Counting lines of code
| Lines | Type | Physical Line? | Logical Line? |
| !! this is a comment | comm | no | no |
| blank | no | no | |
| #if defined foo | exec | yes | yes |
| #ifdef key_squares | exec | yes | yes |
| #include "SetNumberofcells.h" | comp | yes | yes |
| #else | exec | yes | no |
| #endif | exec | yes | yes |
| SUBROUTINE A(Sqr_Grid) | decl | yes | yes |
| USE Sqr_Type | exec | yes | no |
| IMPLICIT NONE | decl | yes | yes |
| IF (assoc(cur_grid)) THEN | exec | yes | yes |
| Type(grid), Pointer :: Sqr_Grid | decl | yes | yes |
| WRITE(*,*) & | exec | yes | no |
| 'Hello' | exec | yes | yes |
| ENDIF | exec | yes | yes |
| END SUBROUTINE A | data | yes | no |
The physical line count is just a count of non-blank, non-comment lines. The logical line count tries to be a bit smart by counting lines in more abstract terms (I imagine a philosopher-computer scientist in some windowed office somewhere chin-stroking and asking, "What is a line of code?"). Anyhow, CodeCount computes logical line count by ignoring lines with continuation characters (e.g. "&") and certain other statements (e.g. "USE", "CASE", "END IF", "ELSE") and by counting each statement in a multi-statement line as a separate line. The full specification is in the CodeCount source if you're interested.
