Semantics formally describe the meaning of some syntax.
Questions tagged [semantics]
185 questions
43
votes
2 answers
Difference Between Small and Big-step Operational Semantics
What's the fundamental difference(s) between small and big-step operational semantics?
I'm having a hard time grasping what it is and the motivation for having the two.
Simon Morgan
- 533
- 1
- 4
- 7
25
votes
5 answers
$\lambda$-calculus with reflection
I'm looking for a simple calculus that supports reasoning about reflection, namely, the introspection and manipulation of running programs.
Is there an untyped $\lambda$-calculus extension that enables one to convert $\lambda$-terms into a form…
Dave Clarke
- 20,345
- 4
- 70
- 114
21
votes
3 answers
When are two simulations not a bisimulation?
Given a labelled transition system $(S,\Lambda,\to)$, where $S$ is a set of states, $\Lambda$ is a set of labels, and $\to\subseteq S\times\Lambda\times S$ is a ternary relation. As usual, write $p \stackrel\alpha\rightarrow q$ for…
Dave Clarke
- 20,345
- 4
- 70
- 114
19
votes
2 answers
What is this fraction-like "discrete mathematics"–style notation used for formal rules?
In the paper "A Conflict-Free Replicated JSON Datatype", I encountered this notation for formally defining "rules":
What is this notation called? How do I read it?
For example:
the DOC rule doesn't have anything in its "numerator" — why not?
the…
natevw
- 293
- 2
- 8
19
votes
3 answers
Problems Implementing Closures in Non-functional Settings
In programming languages, closures are a popular and often desired feature. Wikipedia says (emphasis mine):
In computer science, a closure (...) is a function together with a referencing environment for the non-local variables of that function. A…
Raphael
- 73,212
- 30
- 182
- 400
18
votes
2 answers
Scott-continuous functions: an alternative definition
I'm really struggling with this property:
Let $X,Y$ be coherence spaces and $f: Cl(X) \rightarrow Cl(Y)$ be a monotone function. $f$ is continuous if and only if $f(\bigcup_{x\in D} x)=\bigcup_{x \in D}f(x)$, for all $D \subseteq Cl(X)$ such that…
Ofey
- 181
- 3
17
votes
2 answers
What questions can denotational semantics answer that operational semantics can't?
I am familiar with operational semantics (both small-step and big-step) for defining programming languages. I'm interested in learning denotational semantics as well, but I'm not sure if it will be worth the effort. Will I just be learning the same…
gardenhead
- 2,240
- 14
- 19
16
votes
4 answers
Can a program language be malleable enough to allow programs to extend language semantics
With reference to features in languages like ruby (and javascript), which allow a programmer to extend/override classes any time after defining it (including classes like String), is it theoretically feasible to design a language which can allow…
sandeepkunkunuru
- 273
- 2
- 8
15
votes
1 answer
what is semantics?
There are many popular languages. But, computer scientists tell us that in order to understand the behaviour of programs in those languages definitely and unambiguously argue upon program behavior (e.g. prove their identity), we need to translate…
Val
- 857
- 6
- 16
14
votes
3 answers
What's the difference between a calculus and a programming language?
I think I'm pretty confused about what's called a calculus and what's called a programming language.
I tend to think, and might have been told, that a calculus is a formal system for reasoning about the equivalence of programs. Programs have an…
Guido
- 398
- 1
- 11
14
votes
2 answers
Confluence proof for a simple rewriting system
Assume we have a simple language that consists of the terms:
$\mathtt{true}$
$\mathtt{false}$
if $t_1,t_2,t_3$ are terms then so is $\mathtt{if}\: t_1 \:\mathtt{then}\: t_2 \:\mathtt{else}\: t_3$
Now assume the following logical evaluation…
codd
- 701
- 3
- 14
13
votes
4 answers
Getting started with Program Analysis
I'm looking for resources on getting started with program analysis.
The only book I've found on the topic is the Nielson & Nielson book.
Other than that, it seems like there are only "compiler" books where "program analysis" would be a chapter, or…
abeln
- 263
- 1
- 7
12
votes
2 answers
How to deal with arrays during Hoare-style correctness proofs
In the discussion around this question, Gilles mentions correctly that any correctness proof of an algorithm that uses arrays has to prove that there are no out-of-bounds array accesses; depending on the runtime model, this would cause a runtime…
Raphael
- 73,212
- 30
- 182
- 400
11
votes
1 answer
Programming language semantics prototyping tool
Is there any tool for prototyping a programming language semantics and type system and that also allows for some sort of model checking of standard properties, like type soundness?
I'm asking this, because I'm reading a book on Alloy and it…
Rodrigo Ribeiro
- 283
- 1
- 10
11
votes
1 answer
What's the difference between: operational, denotational and axiomatic semantics?
Recap of the terms from the dictionary:
semantics: the study of meaning in a language (words, phrases, etc) and of language constructs in programming languages (basically any syntactically valid part of a program that generates an instruction or a…
George
- 213
- 1
- 2
- 5