Theory of programming and types