Verifying Concurrent Programs Using Contracts