14 May 23
Denotational semantics is a methodology for giving precise meaning to a programming language. While the syntax of a language is always formally specified in a variant of BNF, the more important part of definining its semantics is mostly left to natural language. which is ambiguous and leaves many questions open. Especially to construct a compiler for this language, we need a much deeper understanding than can be provided by informal descriptions.
Broadly speaking, denotational semantics is concerned with finding mathematical objects called domains that represent what programs do.
When a condition is found to be TRUE, the engine executes the THEN clause, which results in new information being added to its dataset. In other words, the engine starts with a number of facts and applies rules to derive all possible conclusions from those facts. This is where the name “forward chaining” comes from – the fact that the inference engine starts with the data and reasons its way forward to the answer, as opposed to backward chaining, which works the other way around.How about backward chaining?In backward chaining, the system works from conclusions backwards towards the facts, an approach called goal driven. Compared to forward chaining, few data are asked, but many rules are searched. Backward-chaining rules engines are not suited for dynamic situations and are mostly only used as expert systems in decision making