Foundations for Programming Languages