Secret inference and attacktability analysis of discrete event systems