Skip to content
scrambled
Programming Language Theory Flashcard

Using robert (bob) harper

Question

Using robert (bob) harper's notation, what is the definition of variable substitution?

Answer

Given:

  • A set of variables 𝒳.

  • A set of sorts 𝒮.

  • A sort-indexed family of ABTs ℬ={ℬs}.

  • An arity-indexed family of operators 𝒪.

For a term b and variable x, a variable substitution is a partial function [b/x] such that:

  • If x∈𝒳 then [b/x]x=b.

  • If y∈𝒳 and x≠y then [b/x]y=y.

  • If o∈𝒪, if x→i∉b then [b/x]o(x→1.a1;…;x→n.an)=o(x→1.a1′;…;x→n.an′) such that ai′=[b/x]ai when x∉x→i, else ai′=ai.