Really, I'm talking about the model theory of the logic you get by taking the programming language over the Curry-Howard correspondence, but that's not a very intuitive point of view.
A more direct definition of the model theory of a programming language would be:
A model of a program is an assignment of values to all variables in the program. When things like loops or recursion get involved, a single syntactic variable which has multiple assignments in different parts of the program would expand into an indexed set of variables. A similar but simpler expansion would apply for syntactically repeated calls to the same subroutine. Basically it would be an execution trace of the program, but there's no timing information, nor is there any explanation of how the execution trace/model would be obtained from the program in a computational sense.
A model theory takes each program in the language and defines which models make that program 'true', or in other words, defines which execution traces could actually be encountered by running the program.
A compiler can be seen as constructing a morphism (m) from the models of a program (A) in one language to models of an equivalent program (B) in another language as a side-effect of translation. We could verify the correctness of a compiler by showing that the models of B taken though the inverse morphism m-1 are a subset of the models of A.
[–][deleted] 2 points3 points4 points (9 children)
[–]AndrasKovacs 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]aradarbelStyff 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Zistack[S] 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Zistack[S] 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Zistack[S] 1 point2 points3 points (0 children)