Semantics of proofs and programs