Natural Deduction for S4 Modal Logic -- Software Security and Verification --