A categorical semantics for causal structure (Logical Methods in Computer Science, 2019)