Operational Semantics

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/20

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:16 PM on 4/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Operational Semantics Definition

  • Approach to semantics

  • Inductive binary relation between terms

  • Specifies program behaviour through evaluation rules

  • Includes big step and small step

2
New cards

Big Step Semantics

  • Binary relation between terms and values

  • Represents evaluation as E ⇓ V

  • Meaning is based on possible evaluated values

3
New cards

Big Step Advantages

  • Straightforward modeling of runtime environment
  • Defines relations between runtime states and values
  • Describes operators by their actions, not meanings
4
New cards

Big Step Disadvantage

  • Does not account for non-terminating programs
  • Only relates terminating programs to final values
5
New cards

Big Step Toy - Constants

  • n ⇓ n (literal evaluates to itself)
  • true ⇓ true
  • false ⇓ false
6
New cards

Big Step Toy - Less Than

  • E1 ⇓ n, E2 ⇓ m:
    • n < m implies E1 < E2 ⇓ true
    • n ≮ m implies E1 < E2 ⇓ false
7
New cards

Big Step Toy - Addition

  • E1 ⇓ n, E2 ⇓ m:
    • n + m = n₀ implies E1 + E2 ⇓ n₀
8
New cards

Big Step Toy - Conditional

  • E1 ⇓ true, E2 ⇓ V:
    • if E1 then E2 else E3 ⇓ V
  • E1 ⇓ false, E3 ⇓ V:
    • if E1 then E2 else E3 ⇓ V
9
New cards

Big Step Toy - Let

  • E1 ⇓ V, E2[V/x] ⇓ V':
    • let (x:T) = E1 in E2 ⇓ V'
  • Substitution replaces variable with value
10
New cards

Big Step Toy - Application

  • E1 ⇓ (x:T)E₁', E2 ⇓ V₂:
    • E₁'[V₂/x] ⇓ V' implies E1 E2 ⇓ V'
  • Represents function application
11
New cards

Big Step Derivation Tree

  • Proof tree for big step evaluation
  • Justifies conclusions using evaluation rules
  • Leaves are axioms for constants and values
12
New cards

Small Step Semantics

  • Inductive relation between program states
  • Represents runtime configurations as E → E'
  • Changes program counter through term modifications
13
New cards

Small Step Advantages

  • Models step-by-step execution
  • Shows program behavior during evaluation
  • Handles non-termination with infinite sequences
14
New cards

Small Step Toy - Less Than Reduction

  • n < m → true
  • n ≮ m → false
  • E → E' implies n < E → n < E'
15
New cards

Small Step Toy - Addition Reduction

  • n + m → n₀ where n + m = n₀
  • E → E' implies n + E → n + E'
16
New cards

Small Step Toy - Conditional Reduction

  • if true then E₂ else E₃ → E₂
  • if false then E₂ else E₃ → E₃
  • E₁ → E₀ implies if E₁ then E₂ else E₃ → if E₀ then E₂ else E₃
17
New cards

Small Step Toy - Let Reduction

  • let (x:T) = V in E₂ → E₂[V/x]
  • E₁ → E₀ implies let (x:T) = E₁ in E₂ → let (x:T) = E₀ in E₂
18
New cards

Small Step Toy - Application Reduction

  • (x:T)E₁ V → E₁[V/x]
  • E₂ → E₀ implies (x:T)E₁ E₂ → (x:T)E₁ E₀
  • E₁ → E₀ implies E₁ E₂ → E₀ E₂
19
New cards

Small Step Derivation Trees

  • Validating each single step through proof trees
  • Leaves are axioms for primitive reductions
  • Context rules propagate steps
20
New cards

Small Step Sequence

  • Chain of reductions: E₁ → E₂ → E₃ → … → Eₙ
  • Represents the complete evaluation path from initial to final value
21
New cards

Relating Big Step and Small Step

  • E →\* E' as reflexive transitive closure of →
  • Theorem: E ⇓ V iff E →\* V
  • Proof by induction over derivation trees

Explore top flashcards

flashcards
Stimmt 3 Vokabelliste 14
25
Updated 1178d ago
0.0(0)
flashcards
apush unit 2 terms !!!!!!!
30
Updated 929d ago
0.0(0)
flashcards
family law
93
Updated 1078d ago
0.0(0)
flashcards
UNIT 3: Periodicity
35
Updated 782d ago
0.0(0)
flashcards
chemistry 1
36
Updated 1120d ago
0.0(0)
flashcards
Moeilijke woorden opdracht 6
41
Updated 1151d ago
0.0(0)
flashcards
Ch. 7 Quiz
30
Updated 548d ago
0.0(0)
flashcards
Stimmt 3 Vokabelliste 14
25
Updated 1178d ago
0.0(0)
flashcards
apush unit 2 terms !!!!!!!
30
Updated 929d ago
0.0(0)
flashcards
family law
93
Updated 1078d ago
0.0(0)
flashcards
UNIT 3: Periodicity
35
Updated 782d ago
0.0(0)
flashcards
chemistry 1
36
Updated 1120d ago
0.0(0)
flashcards
Moeilijke woorden opdracht 6
41
Updated 1151d ago
0.0(0)
flashcards
Ch. 7 Quiz
30
Updated 548d ago
0.0(0)