Can the foundation of computer science be implemented to include new rules of inference so that computer can do causal reasoning? The idea I'm thinking of is about a top-down approach for AI. I would like to know if there can be a model for computers so that they can perform causal reasoning. It seems that causal relation can be simplified to be a  mathematical structure, as an acyclic directed graph. If using type theory, one builds some "time types" $\{\sigma_i,i\in\mathbb{N}\}$ ($\mathbb{N}$ as an index set denoting time points). The variable inhabit different time types means they are at different time points. The signature can be constructed according to the existing causal relation. The formation rule is such constructed that the rules for formulas with variables from the same time types are the same as usual logic, and the rules for different time types are based on the causal relation. 

Can someone comment about this idea and give some general review about the development of top-down approach, also about causal reasoning?
This is a hot topic at the moment. Read this recent paper by Judea Pearl for example. In general, ML and AI are not very good at causal inference at the moment, because it requires a symbolic representation to build causal graphs. Attempts are being made, however, see e.g. https://arxiv.org/abs/1711.08936 or https://arxiv.org/abs/1709.05321.