patternMinor
Are syntax and semantic just 2 structures such that one is a model of the other?
Viewed 0 times
suchthearejustothersyntaxmodelonethatand
Problem
- The syntax of a language is a structure.
- The semantic of a language is a structure.
- The semantic of a language is a model of its syntax.
And that's all ? The duality syntax/semantic is just model theory applied to languages ?
(A short answer could be ok; I have already read the wikipedia pages !)
Solution
I am afraid the phrasing of the question misled me (though I did know
better) in first seeing model theory as applying to any two arbitrary
mathematical structures, and being the study of homomorphisms of
mathematical structures.
Actually this is wrong. Model Theory already contains the idea of
syntax and semantics, more or less as I define it below. It studies
theories, which are sets of sentences in a formal language, and
models which are interpretation of these sentences in abstract
mathematical structures. This is close to what I call language
below, and I guess this is also close to what the author of the question calls
language.
So the proper answer to the question is that even model theory has a
concept of syntax and semantics, where syntax is a theory, i.e. a
formal representation structure such as a universal algebra, and
semantics is an interpretation (i.e. a morphism) in some abstract
mathematical domain.
Hence the "duality syntax/semantic" is already present in model
theory. There is nothing new on that side.
However, what may make a difference is the understanding of the word
language, as it could be interpreted as going beyond what is usually
concerned by the syntactic algebras usually addressed by model theory.
Actually, the question does not define the word language, and it could
be formal languages, programming languages, natural languages, with
some unsaid understanding of what is intended.
So two possible answers could be:
-
model theory is the study of languages with their syntax and
semantics, and there is nothing to add, or
-
a language can be defined by an arbitrary syntactic definition
(meaning a computable structure) and a homomorphic(?) mapping in
some abstract mathematical structure. The question mark is because
I fear that the definition of the mapping may raise some issues.
The second view is possibly less formal, or less constrained. Whatever
the case, I am leaving below my initial answer (which corresponds to
the second view), since several of the issues it is addressing may
still be relevant and of interest to computer scientist, even though
the presentation may be debatable from the point of view of model
theory.
It does not bring anything new from a formal point of view, since the study of formal system that are considered in syntax already had to go all the way to Turing computability, in order to address the Entscheidungsproblem, and that is as far as we may hope to go in terms of syntax.
I may however help understanding some more practical issues.
Your comments are welcome, including suggestions to erase my former, more naive, though possibly more intuitive, answer.
The first section is the direct answer to the question. The other two
sections may be skipped. They are attempts to explore some examples or consequences, or some practical
aspects encountered by computer scientists, in particular in the
design of programming languages.
Syntax, semantics and languages
The view of the issue as expressed in the question is mainly "OK". My
main criticism though is that the reference to the concept of
language is critical, because directly related to the concept of
syntax, not separable from the concept of syntax.
As a consequence, there is something circular, kind of tautological,
about your statement. The question is why do we use this specific
terminology of "syntax and semantics" for some models, for some
homomorphically related pairs of structures, and not for others. Where
is the difference? And a correlated question is: what is a language?
Clearly there is no restriction on semantics: any topic/structure can
be the object/content of a discourse. Hence, the fundamental
distinction is to be looked for on the syntax side. My own
understanding is that what distinguishes such a homomorphic pair is
the domain of the homomorphism: the syntax structure has to be concrete and
concretely manipulatable. Basically a syntactic structure is a
finite collection of concrete objects, usually idealized as symbols,
and a finitely defined collection of rules to compose in diverse ways any unboundedly
finite number of copies of these symbols, and to transform such
compositions into others compositions. The word syntax comes from
'Ancient Greek: σύνταξις "coordination" from σύν syn, "together,"
and τάξις táxis, "an ordering"'.
Fundamentally, syntax is physical. The concept of symbol is only a
mean to abstract away the choice of physical instanciation of the
symbols as objects such as sounds, gestures, glyphs, objects, stones
(which gave us the word calculus), electric or magnetic state,
presence and absence of a signal, etc., or composition of other
symbols.
Hence, the theory of syntax is essentially what is better known as the
theory of computation, which is the study of rule based manipulation
of symbols. Whatever we express, transmit, receive, compute, memorize,
analyze, is processed through some syntactic symbolic representation.
But what we are interested in is not the
better) in first seeing model theory as applying to any two arbitrary
mathematical structures, and being the study of homomorphisms of
mathematical structures.
Actually this is wrong. Model Theory already contains the idea of
syntax and semantics, more or less as I define it below. It studies
theories, which are sets of sentences in a formal language, and
models which are interpretation of these sentences in abstract
mathematical structures. This is close to what I call language
below, and I guess this is also close to what the author of the question calls
language.
So the proper answer to the question is that even model theory has a
concept of syntax and semantics, where syntax is a theory, i.e. a
formal representation structure such as a universal algebra, and
semantics is an interpretation (i.e. a morphism) in some abstract
mathematical domain.
Hence the "duality syntax/semantic" is already present in model
theory. There is nothing new on that side.
However, what may make a difference is the understanding of the word
language, as it could be interpreted as going beyond what is usually
concerned by the syntactic algebras usually addressed by model theory.
Actually, the question does not define the word language, and it could
be formal languages, programming languages, natural languages, with
some unsaid understanding of what is intended.
So two possible answers could be:
-
model theory is the study of languages with their syntax and
semantics, and there is nothing to add, or
-
a language can be defined by an arbitrary syntactic definition
(meaning a computable structure) and a homomorphic(?) mapping in
some abstract mathematical structure. The question mark is because
I fear that the definition of the mapping may raise some issues.
The second view is possibly less formal, or less constrained. Whatever
the case, I am leaving below my initial answer (which corresponds to
the second view), since several of the issues it is addressing may
still be relevant and of interest to computer scientist, even though
the presentation may be debatable from the point of view of model
theory.
It does not bring anything new from a formal point of view, since the study of formal system that are considered in syntax already had to go all the way to Turing computability, in order to address the Entscheidungsproblem, and that is as far as we may hope to go in terms of syntax.
I may however help understanding some more practical issues.
Your comments are welcome, including suggestions to erase my former, more naive, though possibly more intuitive, answer.
The first section is the direct answer to the question. The other two
sections may be skipped. They are attempts to explore some examples or consequences, or some practical
aspects encountered by computer scientists, in particular in the
design of programming languages.
Syntax, semantics and languages
The view of the issue as expressed in the question is mainly "OK". My
main criticism though is that the reference to the concept of
language is critical, because directly related to the concept of
syntax, not separable from the concept of syntax.
As a consequence, there is something circular, kind of tautological,
about your statement. The question is why do we use this specific
terminology of "syntax and semantics" for some models, for some
homomorphically related pairs of structures, and not for others. Where
is the difference? And a correlated question is: what is a language?
Clearly there is no restriction on semantics: any topic/structure can
be the object/content of a discourse. Hence, the fundamental
distinction is to be looked for on the syntax side. My own
understanding is that what distinguishes such a homomorphic pair is
the domain of the homomorphism: the syntax structure has to be concrete and
concretely manipulatable. Basically a syntactic structure is a
finite collection of concrete objects, usually idealized as symbols,
and a finitely defined collection of rules to compose in diverse ways any unboundedly
finite number of copies of these symbols, and to transform such
compositions into others compositions. The word syntax comes from
'Ancient Greek: σύνταξις "coordination" from σύν syn, "together,"
and τάξις táxis, "an ordering"'.
Fundamentally, syntax is physical. The concept of symbol is only a
mean to abstract away the choice of physical instanciation of the
symbols as objects such as sounds, gestures, glyphs, objects, stones
(which gave us the word calculus), electric or magnetic state,
presence and absence of a signal, etc., or composition of other
symbols.
Hence, the theory of syntax is essentially what is better known as the
theory of computation, which is the study of rule based manipulation
of symbols. Whatever we express, transmit, receive, compute, memorize,
analyze, is processed through some syntactic symbolic representation.
But what we are interested in is not the
Context
StackExchange Computer Science Q#45291, answer score: 7
Revisions (0)
No revisions yet.