Contracts as Plans