全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Compiler correctness?

Definition 7.12 University Computer Science — Year 3 · 第 7 章 — Intermediate Code and Code Generation

A compiler CC from a source language with semantics S\mathcal{S} to a target language with semantics T\mathcal{T} is correct if for every source program PP it accepts and every input xx such that S(P,x)\mathcal{S}(P, x) is a normal termination with output oo and exit code kk, T(C(P),x)\mathcal{T}(C(P), x) is a normal termination with the same oo and kk. The square below then commutes: both paths from (P,x)(P, x) end at the same behaviour.

在原文中阅读 →