Operational semantics is a category of formal programming language semantics in which certain desired properties of a program, such as correctness, safety or security, are verified by constructing proofs from logical statements about its execution and procedures, rather than by attaching mathematical meanings to its terms.
Questions tagged [operational-semantics]
52 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
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
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
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
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
9
votes
3 answers
Why does the state remain unchanged in the small-step operational semantics of a while loop?
Usually I see that in the structural operational semantics representation for the while loop, the program state don't change:
$(while \> B \> do \>S, \sigma) \rightarrow (if \>B \> then \>S; (while \> B \> do \>S) \> else \> SKIP, \sigma)$
For me,…
El Marce
- 333
- 2
- 9
8
votes
2 answers
TAPL: Explanation and example(s) for satisfied
This question arises from my reading of "Types and Programming Languages" (WorldCat) by Benjamin C. Pierce.
On page 36 is the definition for satisfied
A rule is satisfied by a relation if, for each instance of the rule,
either the conclusion is…
Guy Coder
- 5,181
- 2
- 30
- 65
7
votes
2 answers
Formal model of execution for Java (or general imperative language)
I'm trying to prove some statements about execution in Java programs under some heavy restrictions (basically I have a conjecture that if two methods satisfy a set of constraints for a given input then the are they equivalent - i.e., that return…
Ben Kushigian
- 387
- 2
- 7
7
votes
1 answer
Reduction rule for IF?
I'm working through Simon Peyton Jones' "The Implementation of Functional Programming Languages" and on page 20 I see:
IF TRUE ((λp.p) 3) ↔ IF TRUE 3 (per β red) (1)
↔ (λx.IF TRUE 3 x) (per η red) (2)
…
galaxybeing
- 71
- 1
6
votes
0 answers
How are observational equivalence, contextual equivalence, and extensional equality related?
First, some context: I'm reading this blog post by Andrej Bauer.
So, I stumbled in these terms: "observational equivalence" and "contextual equivalence".
I know almost nothing about operational semantics ... I know it gives meaning for terms by it's…
Rafael Castro
- 509
- 4
- 15
6
votes
1 answer
When would one use equational dynamics?
I'm trying to sort out in my mind the different ways of assigning semantics to a programming language. There are two main methodologies: operational semantics and denotational semantics (I asked a previous question on the relationship between the…
gardenhead
- 2,240
- 14
- 19
6
votes
0 answers
Is there relation between K-Framework and structural operational semantics?
K-framework strives to give one (instead of two - operational and denotational) semantics for industrial programming languages. The same unification is done by structural operational semantic as well. Are those two frameworks related somehow? Such…
TomR
- 1,411
- 8
- 17
5
votes
1 answer
What does ⊢ mean in operational semantics?
I have been reading a couple of texts on operational semantics.
In [1], the evaluation of expressions is done as in this rule:
$\frac{\;\Rightarrow \;n_1\;\;\;\;\Rightarrow \;n_2}
{ \;\Rightarrow \; n_3}$,
where $n_3 =…
josh
- 341
- 1
- 5
5
votes
1 answer
Notation for operational semantics that can be used in code comments
I'm defining an intermediate language for a multi-backend code generator that I'm writing. I want to document the operational semantics for this intermediate language in a way that is readable both from within the source code and generated…
Mike Samuel
- 1,204
- 10
- 16
4
votes
0 answers
How to decide between operational, denotational, and axiomatic semantics?
Context
I'm designing a language which implements lambda calculus and (first-order) predicate calculus, where lambdas behave as the abstraction encapsulating logic, compositionally forming a computational model for higher-order logic.
Question
How…
Phizo
- 61
- 3