Programs and theories