+
+ CamFort is multi-feature tool for improving the quality of Fortran + code. Its features are primarily aimed at programming patterns found + in numerical modelling code e.g., in computational science.
++ CamFort is free and open-source. It currently supports FORTRAN 66, + FORTRAN 77, and Fortran 90 language standards. Support for Fotran + 96, 2003, and 2008 is in progress. +
++
+ CamFort provides lightweight verification features. + Source-code annotations (comments) provide specifications of certain + aspects of a program's meaning or behaviour. CamFort can then check + that code conforms to these specifications. CamFort can also suggest + places to insert specifications, and in some cases case infer the + specifications of existing code.
++ Our current specification and verification features provide: +
-
+
- Units-of-measure typing + Example: +
- Array access shape +
+ != unit(m) :: d1, d2 + != unit(s) :: t + real :: d1, d2, t, v + v = (d1 + d2)/t ++
+ do i = 1, n + do j = 1, m + != stencil forward(dim=1,depth=1)*centered(dim=2,depth=1) :: a + x = a(i, j-1) + a(i, j+1) + a(i, j) + y = a(i+1, j-1) + a(i+1, j+1) + a(i+1, j) + b(i, j) = x + y + end do + end do ++
+
+ Many language features of older Fortran standards (pre Fortran 90) are + known to be a ready source of programming error. CamFort provides + some facilities for automatically refactoring deprecated or + dangerous programming patterns, with the goal of helping to meet + core quality requirements, such as maintainability. For example, our + tool eliminates EQUIVALENCE and COMMON blocks. These refactorings + also helps to expose any programming bugs arising from bad + programming practices. +
+ +