“Semantics” is a word often used by people that I work with and call friends (should I be worried?). The word has always struck me as vague. I have usually conveniently ignored that and happily joined any interesting discussion or debate.
I’m currently involved in the design of a couple of domain specific languages (DSL). One of them is the language that I’m trying to “implement” using GMF and that is described elsewhere on this blog. The other is a language used for describing electronic systems in the automotive industry. It seems that the S-word pops up so often now that it is perhaps time to reflect upon and understand what it – yes – means.
“Semantics” is usually translated to “meaning”. But what is the meaning of “meaning”? To describe “meaning” one obviously has to use other, more “meaningful” words, words that convey some meaning to the listener or reader. A DSL typically uses as its elements concepts from the domain that it is used to represent some aspect of. In my case I use modeling elements such as Role and Workflow. In the automotive example we have elements such as (software) Task and Sensor. These have some meaning in the real world so we intuitively associate them with their real-world counterparts. Modeling the real world in this way is interesting – but is it useful? (I owe that very good question to professor Isaacs at Berkeley.)
I of course have a use in mind when I create my models of reality. So while the Role element of my modeling language has a counterpart in reality, its semantics are more usefully described by the use of what is created from my description of a Role. A Role in my models of reality is eventually translated into a web page which is linked to other web pages and has on it text that is used by its readers for various purposes such as understanding their job or writing job ads. That little explanation is at least a start of a useful description of the semantics of Role in my case. Correspondingly the semantics of a model of software Task is often best described by the actual software (source code or executable) that is created (manually or automatically) based on that model.
It is somewhat ironic that while you wish to create an abstract model of reality, the only way to truly understand that abstract model is to understand the concrete details of what the model is used for. This concrete use is by real nerds called the operational semantics of the modeling language.