An Abstract Contract Theory for Programs with Procedures