<p>This question is very open-ended and therefore difficult to answer, but I think the short answer is &quot;yes&quot;, there is much common ground, the two areas have in fact benefited from interaction in the past, and they have much to gain from further interaction.</p>
<p>Two classical examples of this (respectively from the 1950s and '70s) are <a href="https://www.cs.cmu.edu/%7Efp/courses/15816-f16/misc/Lambek58.pdf" rel="noreferrer">Lambek grammar</a> and <a href="https://en.wikipedia.org/wiki/Montague_grammar" rel="noreferrer">Montague grammar</a>, which model different aspects of natural language using sequent calculus and lambda calculus (which have become cornerstones of programming language theory, with connections to category theory and type theory).</p>
<p>In relatively more recent history, personally I found Ken Shan's dissertation <em><a href="http://homes.sice.indiana.edu/ccshan/dissertation/book.pdf" rel="noreferrer">Linguistic side effects</a></em> (2005) an inspiring exploration of the thesis that natural languages and programming languages have more common ground than differences.  To quote a bit from the introduction:</p>
<blockquote>
<p>This dissertation is about computational linguistics, in two senses. First,we apply insights from computer science, especially programming-language semantics, to the science of natural languages. Second, we apply insights from linguistics, especially natural-language semantics, to the engineering of programming languages. The phrase “computational linguistics” has a popular third sense, which is natural-language processing: teaching computers to listen to, speak, read, and write natural language. That is not our aim, even though the research described here indirectly helps it—by enhancing our understanding of natural and programming languages.</p>
</blockquote>
<p>Chris Barker has also written extensively about the concept of <em>continuation</em> from programming languages semantics and how it may be used to illuminate the <a href="https://semanticsarchive.net/Archive/902ad5f7/barker.continuations.pdf" rel="noreferrer">nature of quantification</a> in natural language, and the two have recently collaborated on a <a href="https://www.nyu.edu/projects/barker/barker-shan-continuations-book-intro.pdf" rel="noreferrer">book</a> which explores this topic further.</p>

CC BY-SA 4.0
2020-08-19T16:39:34.127Z
2020-08-19T16:39:34.127Z
Noam Zeilberger
<p>I browsed the table of content of <a href="https://www.cambridge.org/core/books/formal-semantics/D1BE99DD41C138A32971719EE0A57D6D" rel="nofollow noreferrer">Cann's Formal Semantics</a>, which   reminds me  of the things that I saw in programming language books.</p>
<p>Cann's book is for linguistics, and am I right that it is helpful for computational linguistics and natural language processing, another active research area of computer science? (Side note: it also seems to me that the approaches to NLP have been predominantly based on statistics and machine learning in applications (and maybe also research), which I think is completely unrelated to formal semantics?)</p>
<p>Do formal semantics of linguistics and semantics of programming languages (and the ways of study each of the two) have more common ground than differences?  What are their common ground and what are their differences?  Are books on one helpful to study in the other?</p>
<p>Thanks.</p>

<pl.programming-languages><semantics>
What relations and differences are between formal semantics for linguistics and for programming languages?
Tim
# What relations and differences are between formal semantics for linguistics and for programming languages?

(Asked by: username_0 on 2020-08-18)

I browsed the table of content of [Cann's Formal Semantics](https://www.cambridge.org/core/books/formal-semantics/D1BE99DD41C138A32971719EE0A57D6D), which reminds me of the things that I saw in programming language books.

Cann's book is for linguistics, and am I right that it is helpful for computational linguistics and natural language processing, another active research area of computer science? (Side note: it also seems to me that the approaches to NLP have been predominantly based on statistics and machine learning in applications (and maybe also research), which I think is completely unrelated to formal semantics?)

Do formal semantics of linguistics and semantics of programming languages (and the ways of study each of the two) have more common ground than differences? What are their common ground and what are their differences? Are books on one helpful to study in the other?

Thanks.

**Tags:** pl.programming-languages, semantics

---

## 1 answers

### Answer by username_1 on 2020-08-19. Score: 6

This question is very open-ended and therefore difficult to answer, but I think the short answer is "yes", there is much common ground, the two areas have in fact benefited from interaction in the past, and they have much to gain from further interaction.

Two classical examples of this (respectively from the 1950s and '70s) are [Lambek grammar](https://www.cs.cmu.edu/%7Efp/courses/15816-f16/misc/Lambek58.pdf) and [Montague grammar](https://en.wikipedia.org/wiki/Montague_grammar), which model different aspects of natural language using sequent calculus and lambda calculus (which have become cornerstones of programming language theory, with connections to category theory and type theory).

In relatively more recent history, personally I found Ken Shan's dissertation *[Linguistic side effects](http://homes.sice.indiana.edu/ccshan/dissertation/book.pdf)* (2005) an inspiring exploration of the thesis that natural languages and programming languages have more common ground than differences. To quote a bit from the introduction:

> This dissertation is about computational linguistics, in two senses. First,we apply insights from computer science, especially programming-language semantics, to the science of natural languages. Second, we apply insights from linguistics, especially natural-language semantics, to the engineering of programming languages. The phrase “computational linguistics” has a popular third sense, which is natural-language processing: teaching computers to listen to, speak, read, and write natural language. That is not our aim, even though the research described here indirectly helps it—by enhancing our understanding of natural and programming languages.

Chris Barker has also written extensively about the concept of *continuation* from programming languages semantics and how it may be used to illuminate the [nature of quantification](https://semanticsarchive.net/Archive/902ad5f7/barker.continuations.pdf) in natural language, and the two have recently collaborated on a [book](https://www.nyu.edu/projects/barker/barker-shan-continuations-book-intro.pdf) which explores this topic further.


---

