Deciding Differential Privacy for Programs with Finite Inputs and Outputs