Foundations of a Weak Measurement-Theoretic Approach to Software Measurement