Vulnerability modelling with functional programming and dependent types. (15th December 2014)