Spar: A Programming Language for Semi-Automatic Compilation of Parallel Programs