Deadlock Analysis of Concurrent Objects: Theory and Practice