Theoretical Framework for Software Engineering