A Differentiable Approach to Dominant Strategy Mechanisms