Causality and Decision-making: A Logical Framework for Systems and Security Modelling