> For the complete documentation index, see [llms.txt](https://mandober.gitbook.io/math-debrief/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandober.gitbook.io/math-debrief/600-toc/624-semantics/semantics-in-cs.md).

# Semantics in CS

<https://en.wikipedia.org/wiki/Semantics\\_(computer\\_science)>

In programming language theory, *semantics* is the field concerned with the rigorous mathematical study of the meaning of programming languages.

It does so by evaluating the meaning of syntactically valid strings defined by a specific programming language, showing the computation involved.

In such a case that the evaluation would be of syntactically invalid strings, the result would be non-computation.

> Semantics describes the processes a computer follows when executing a program in that specific language.

This can be shown by describing the *relationship between the input and output* of a program, or an explanation of how the program will be executed on a certain platform, hence creating a *model of computation*.

Not to be confused with *Computational Semantics*, which is the study of how to automate the process of constructing and reasoning with *meaning representations* of natural language expressions. It plays an important role in natural language processing and computational linguistics.
