Foundations of Dharmakirti's Philosophy