i am disappointed that it took these many years to understand this! programs we write are nothing but a set of horn clauses with implicit conjunctions between them.
each instruction pneumonic from an instruction set architecture is a literal of the first-order-logic and more specifically a literal of the horn clause. it can be shown that the instructions in a program can be converted into a first-order-logic formulae and vice-versa.
we do not need anything other than "negation", "and" and "or" between the objects and the reason why we do not see them explicitly in the programs is that "and" and "or" in the logic are implicit. only construct that shows up is negation (in declarative languages). in C we can see occasional "and" and "or" however there are many more implicit ones hidden making it harder to get the whole picture.
each instruction pneumonic from an instruction set architecture is a literal of the first-order-logic and more specifically a literal of the horn clause. it can be shown that the instructions in a program can be converted into a first-order-logic formulae and vice-versa.
we do not need anything other than "negation", "and" and "or" between the objects and the reason why we do not see them explicitly in the programs is that "and" and "or" in the logic are implicit. only construct that shows up is negation (in declarative languages). in C we can see occasional "and" and "or" however there are many more implicit ones hidden making it harder to get the whole picture.
No comments:
Post a Comment
Please leave a note about what you think about this write up. Thanks.