目录

  • 1 Chapter 1 Introduction
    • 1.1 1.0 Course Contents
    • 1.2 1.1 Basic Conception
      • 1.2.1 Lecture 1
      • 1.2.2 Lecture 2
    • 1.3 1.2 Compiler Structure
      • 1.3.1 Lecture 1
      • 1.3.2 Lecture 2
      • 1.3.3 Lecture 3
    • 1.4 1.3 The Technique of Compiler Developing
  • 2 Chapter 2 Conspectus of Formal Language
    • 2.1 2.1 Alphabets and Strings
      • 2.1.1 Lecture 1
      • 2.1.2 Lecture 2
    • 2.2 2.2 Grammars and its Categories
      • 2.2.1 Lecture 1
      • 2.2.2 Lecture 2
    • 2.3 2.3 Languages and Parse Tree
      • 2.3.1 Lecture 1
      • 2.3.2 Lecture 2
    • 2.4 2.4 Notes of Formal Language
    • 2.5 2.5 Basic Parsing Techniques
      • 2.5.1 Lecture 1
      • 2.5.2 Lecture 2
  • 3 Chapter 3 Finite Automata
    • 3.1 3.1 Formal Definition of FA
      • 3.1.1 Lecture 1
      • 3.1.2 Lecture 2
    • 3.2 3.2 Transition from NDFA to DFA
      • 3.2.1 Lecture 1
      • 3.2.2 Lecture 2
      • 3.2.3 Lecture 3
    • 3.3 3.3 RG and FA
    • 3.4 3.4 Regular Expression & Regular Set
      • 3.4.1 Lecture 1
      • 3.4.2 Lecture 2
  • 4 Chapter 4 Scanner(Lexical Analyzer)
    • 4.1 4.1 Lexical Analyzer and Tokens
      • 4.1.1 Lecture 1
      • 4.1.2 Lecture 2
    • 4.2 4.2 Step for developing a lexical analyzer
    • 4.3 4.3  Dealing with Identifier
    • 4.4 4.4  Using Regular Expressions
    • 4.5 4.5 Using Flex
      • 4.5.1 Lecture 1
      • 4.5.2 Lecture 2
  • 5 Chapter 5 Top-Down Parsing
    • 5.1 5.0 Push Down Automata (PDA, Added)
      • 5.1.1 Lecture 1
      • 5.1.2 Lecture 2
      • 5.1.3 Lecture 3
    • 5.2 5.1 Elimination Left-Recursion
    • 5.3 5.2 LL(k) Grammar
      • 5.3.1 Lecture 1
      • 5.3.2 Lecture 2
    • 5.4 5.3 Deterministic LL(1) Analyzer Construction
    • 5.5 5.4 Recursive-descent (Non-backtracking) parsing
    • 5.6 5.5 复习与结课
      • 5.6.1 Lecture1 结课感言
      • 5.6.2 Lecture 2 关于复习
      • 5.6.3 Lecture 3 习题讲解
  • 6 Chapter 6 bottom-up Parsing and precedence analyzer
    • 6.1 6.1 Bottom-Up Parsing
    • 6.2 6.2 Phrase, Simple Phrase and Handle
    • 6.3 6.3 A Shift-Reduce Parser
    • 6.4 6.4 Some Relations on Grammar
    • 6.5 6.5 Simple Precedence Parsing
    • 6.6 6.6 Operator-Precedence Parsing
      • 6.6.1 Lecture 1
      • 6.6.2 Lecture 2
      • 6.6.3 Lecture 3
    • 6.7 6.7 Precedence Functions and Construction
  • 7 Chapter 7  LR Parsing
    • 7.1 7.1 LR Parsers
      • 7.1.1 Lecture 1
      • 7.1.2 Lecture 2
    • 7.2 7.2 Building a LR(0) parse table
      • 7.2.1 Lecture 1
      • 7.2.2 Lecture 2
    • 7.3 7.3 SLR Parse Table Construction
    • 7.4 7.4 Constructing Canonical LR(1) Parsing Tables
    • 7.5 7.5 LALR Parsing Tables Construction
    • 7.6 7.6 Using Ambiguous Grammars
    • 7.7 7.7 Yacc/Bison Overview
  • 8 Chapter 8 Syntax-Directed Translation
    • 8.1 8.1 Syntax-Directed Translation
      • 8.1.1 Lecture1
      • 8.1.2 Lecture 2
      • 8.1.3 Lecture 3
    • 8.2 8.2 Abstract Syntax Tree
    • 8.3 8.3 Intermediate Representation
      • 8.3.1 Lecture 1
      • 8.3.2 Lecture 2
  • 9 Chapter 9 Run-Time Environment
    • 9.1 9.1 Data Area & Attribute
    • 9.2 Section 9.2~9.4 & Section 9.8~9.9
    • 9.3 9.5 Parameter Passing
    • 9.4 9.6 Stack Allocation
    • 9.5 9.7 Heap allocation
  • 10 Chapter 10 Symbol Tables
    • 10.1 10.1 A symbol Table Class
    • 10.2 10.2 Basic Implementation Techniques
    • 10.3 10.3 Block-structured Symbol Table
    • 10.4 10.4 Implicit Declaration
    • 10.5 10.5 Overloading
  • 11 Chapter 11 Code Optimization
    • 11.1 11.1 Control Flow Graph
    • 11.2 11.2 Redundancies
    • 11.3 11.3 Loop Optimizations
    • 11.4 11.4 Instruction Dispatch
      • 11.4.1 Lecture 1
      • 11.4.2 Lecture 2
  • 12 Chapter 12 Code Generation
    • 12.1 12.1 Code generation issues
    • 12.2 12.2 Simple Stack Machine
    • 12.3 12.3 Register Machine
    • 12.4 12.4 A Simple Code Generator
  • 13 13 Extended Reading扩展阅读1 斯坦福大学公开课
    • 13.1 Lecture 1
    • 13.2 Lecture 2
    • 13.3 Lecture 3
    • 13.4 Lecture 4
    • 13.5 Lecture 5
    • 13.6 Lecture 6
    • 13.7 Lecture 7
    • 13.8 Lecture 8
    • 13.9 Lecture 9
    • 13.10 Lecture 10
    • 13.11 Lecture 11
    • 13.12 More sources
  • 14 14 Extended Reading 2 扩展阅读2 illinois.edu lectures
    • 14.1 Lecture 1 Overview
    • 14.2 Lecture 2 Strings, Languages, DFAs
    • 14.3 Lecture 3 More on DFAs
    • 14.4 Lecture 4 Regular Expressions and Product Construction
    • 14.5 Lecture 5 Nondeterministic Automata
    • 14.6 Lecture 6 Closure properties
    • 14.7 Lecture 7 NFAs are equivalent to DFAs
    • 14.8 Lecture 8 From DFAs/NFAs to Regular Expressions
    • 14.9 Lecture 9 Proving non-regularity
    • 14.10 Lecture 10 DFA minimization
    • 14.11 Lecture 11 Context-free grammars
    • 14.12 Lecture 12 Cleaning up CFGs and Chomsky Normal form
    • 14.13 Lecture 13 Even More on Context-Free Grammars
    • 14.14 Lecture 14 Repetition in context free languages
    • 14.15 Lecture 15 CYK Parsing Algorithm
    • 14.16 Lecture 16 Recursive automatas
    • 14.17 Lecture 17 Computability and Turing Machines
    • 14.18 Lecture 18 More on Turing Machines
    • 14.19 Lecture 19 Encoding problems and decidability
    • 14.20 Lecture 20 More decidable problems, and simulating TM and “real” computers
    • 14.21 Lecture 21 Undecidability, halting and diagonalization
    • 14.22 Lecture 22 Reductions
    • 14.23 Lecture 23 Rice Theorem and Turing machine behavior properties
    • 14.24 Lecture 24 Dovetailing and non-deterministic Turing machines
    • 14.25 Lecture 25 Linear Bounded Automata and Undecidability for CFGs
  • 15 15 Extended Reading3 扩展阅读3 Extended  Reference Books
    • 15.1 15.1 English Text Book
    • 15.2 15.2 编译原理(何炎祥,伍春香,王汉飞 2010.04)
    • 15.3 15.3 编译原理(陈光建主编;贾金玲,黎远松,罗玉梅,万新副主编 2013.10)
    • 15.4 15.4 编译原理((美)Alfred V. Aho等著;李建中,姜守旭译 2003.08)
    • 15.5 15.5 编译原理学习与实践指导(金登男主编 2013.11)
    • 15.6 15.6 编译原理及编译程序构造 第2版(薛联凤,秦振松编著 2013.02)
    • 15.7 15.7 编译原理学习指导(莫礼平编 2012.01)
    • 15.8 15.8 JavaScript动态网页开发案例教程
  • 16 16 中文版课件(pdf)辅助学习
    • 16.1 第1章 引论
    • 16.2 第2章 形式语言概论
    • 16.3 第3章 有穷自动机
    • 16.4 第4章 词法分析
    • 16.5 第5章 自上而下分析
    • 16.6 第6章 优先分析方法
    • 16.7 第7章 自下而上的LR(k)分析方法
    • 16.8 第8章 语法制导翻译法
    • 16.9 第9章 运行时的存储组织与管理
    • 16.10 第10章 符号表的组织与查找
    • 16.11 第11章 优化
    • 16.12 第12章 代码生成
  • 17 17 Extended Reading4 扩展阅读4 Static Single Assignment
    • 17.1 17.1 SSA-based Compiler Design
    • 17.2 17.2 A Simple, Fast Dominance Algorithm (Rice Computer Science TR-06-33870)
    • 17.3 17.3 The Development of Static Single Assignment Form(KennethZadeck-Presentation on the History of SSA at the SSA'09 Seminar, Autrans, France, April 2009)
    • 17.4 17.4 SPIR-V Specification(John Kessenich, Google and Boaz Ouriel, Intel Version 1.00, Revision 12 January 16, 2018)
    • 17.5 17.5 Efficiently Computing Static Single Assignment Form and the Control Dependence Graph
    • 17.6 17.6 Global Value Numbers and Redundant Computations
  • 18 18 Extended Reading4 扩展阅读5 Computer Science
    • 18.1 1 实地址模式和保护模式的理解
    • 18.2 2 实模式和保护模式
    • 18.3 3 实模式和保护模式区别及寻址方式
    • 18.4 计算机专业术语
    • 18.5 Bit Math in c Language
    • 18.6 Auto-generating subtitles for any video file
    • 18.7 Autosub
    • 18.8 C语言中的内联函数(inline)与宏定义(#define)
  • 19 19 相关学习
    • 19.1 龙书、鲸书和虎书
    • 19.2 Complexity
    • 19.3 MPC Complexity
    • 19.4 NP-completeness
    • 19.5 Computational complexity theory
  • 20 20 全球战疫-武汉战疫延伸与扩展
    • 20.1 Extraordinary G20 Leaders’ Summit Statement on COVID-19
    • 20.2 Experts urge proactive measures to fight virus
    • 20.3 covid-19病毒下贫穷国家
    • 20.4 正确理解病亡率、压平曲线、疫情高峰术语
    • 20.5 为什么全球经济可能陷入长期衰退
    • 20.6 为何新冠病毒检测会出现“假阴性”
    • 20.7 在纽约,几乎每个人身边都有人感染病毒
    • 20.8 An Address by Her Majesty The Queen
    • 20.9 Boris Johnson admitted to hospital over virus sympto
    • 20.10 Edinburgh festivals cancelled due to coronavirus
    • 20.11 US set to recommend wearing of masks
    • 20.12 Boris Johnson in self-isolation after catching coronavirus
    • 20.13 Covid-19:The porous borders where the virus cannot be controlled
    • 20.14 当欧洲人开始戴上口罩
    • 20.15 Lockdown and ‘Intimate Terrorism’
    • 20.16 Us Election 2020: Bernie Sanders Suspends Presidential Campaign
    • 20.17 The aircraft carrier being infected with the coronavirus
    • 20.18 Spent to the W.H.O.
    • 20.19 Unemployment
    • 20.20 The beat of a heart the glimmer of a soul
    • 20.21 Coronavirus pandemic: EU agrees €500bn rescue package
    • 20.22 the world after coronavirus冠状病毒之后的世界
  • 21 21 课程思政方案
    • 21.1 21.1 课程思政
    • 21.2 21.2 实施方案
为何新冠病毒检测会出现“假阴性”

为何新冠病毒检测会出现“假阴性”?                

来源:  NYT双语阅读


You had some exposures that may put you at risk for coronavirus. A few days later you come down with a bad cough yourself and feel a little short of breath and really tired. You take your temperature: 101 degrees. A fever.

某些场合可能使你有感染冠状病毒的风险。几天后,你咳嗽得厉害,感觉有点喘不上气,十分疲倦。你量了一下体温:38度3。发烧了。

You suspect you might have Covid-19, the disease caused by the novel coronavirus. The days roll into each other, and your doctor urges you to stay home unless your condition worsens. You feel pretty bad, though, and finally get an appointment.

你怀疑你可能得了Covid-19——由新型冠状病毒引起的疾病。日子一天天过去,你的医生建议你待在家里,除非病情恶化。但你感觉很难受,最终还是预约去看医生。

They test you for influenza by sticking a swab far up your nose, and you are told the test came back negative, you don’t have flu. They tell you they are saving the Covid-19 tests for those who are even worse off than you are. You go home with a prescription for antibiotics, possibly because they don’t know what else to do, and read about celebrities who are testing positive but don’t seem so sick.

医生把拭子探进你鼻子深处,检测你是否患了流感,你被告知结果是阴性,并没有得流感。他们告诉你,Covid-19的检测得留给那些情况比你更糟的人。你拿着抗生素处方回了家,可能是因为医生也不知道还能给你开什么药,你又看到一些名人检测结果是阳性,但似乎病得没那么严重。

A couple of days later, still with fevers, you go back, and the doctors relent and test you for SARS-CoV-2, the virus that causes Covid-19. They again stick something up your nose to what feels like the bottom of your eyeball.

几天后,你还在发烧,又回到医院,医生们让了步,给你做了SARS-CoV-2检测,也就是引发Covid-19的病毒。他们又把什么东西塞进你的鼻子里,仿佛捅到了眼球底部。

They tell you that the results will be available in a couple of days and you go home and wait. Finally, the results come back and you are told you do not have Covid-19. Now what?

他们告诉你检测结果要几天后才出,你可以回家等待。最终,结果出来了,你被告知你并没患上Covid-19。接下来该怎么办呢?

This is a real patient’s story. In fact, it is a lot of people’s story — at least some version of it. Across the world, people with signs and symptoms of Covid-19 are testing negative and wondering what it means. They are not showing up in the statistics, and they are left in limbo about what to do next.

这是一则真实的病人故事。事实上,也是很多人的经历——至少某些部分是一样的。在世界各地,很多出现了Covid-19体征和症状的人检测结果呈阴性,他们想知道这意味着什么。这些人没有出现在确诊数据中,对下一步该做什么也束手无策。

The problem may be with the test. Current coronavirus tests may have a particularly high rate of missing infections. The good news is that the tests appear to be highly specific: If your test comes back positive, it is almost certain you have the infection.

问题或许出现在检测上。目前的冠状病毒检测可能有特别高的漏检率。好消息是,这种检测似乎是高度明确的:如果你的检测结果呈阳性,几乎可以肯定你感染了病毒。

The most common test to detect the coronavirus involves a process known as reverse transcription polymerase chain reaction, or RT-PCR, a jumble of words that describes a method capable of detecting virus particles that are generally present in respiratory secretions during the beginning of an infection. From a technical standpoint, under ideal conditions, these tests can detect small amounts of viral RNA.

检测冠状病毒最常见的方法涉及一个称为“逆转录聚合酶链式反应”(RT-PCR)的过程,这一长串字是一种检测病毒颗粒的方法,这些颗粒通常出现在受感染初期的呼吸道分泌物中。从技术角度看,在理想条件下,这些检测可以检测出少量的病毒核糖核酸(RNA)。

In the real world, though, the experience can be quite different, and the virus can be missed. The best the Centers for Disease Control and Prevention can say is that if you test negative, “you probably were not infected at the time your specimen was collected.” The key word there is “probably.”

但在现实世界中,这一过程可能会大不相同,病毒可能会被漏掉。疾病控制和预防中心(Centers for Disease Control and Prevention)也只能说,如果你的检测结果为阴性,“你可能在进行样本采集的时候并没被感染。”这里的关键字是“可能”。

False-negative test results — tests that indicate you are not infected, when you are — seem to be uncomfortably common. Increasingly, and disturbingly, I hear a growing number of anecdotal stories from my fellow doctors of patients testing negative for coronavirus and then testing positive — or people who are almost certainly infected who are testing negative.

假阴性的检测结果——即你已经被感染,但检测表明你没有——似乎是十分常见的现象。令人不安的是,我逐渐从我的同行医生那里听到越来越多的轶事,比如病人的冠状病毒检测呈阴性,然后又呈阳性;或是有些几乎肯定被感染的人检测结果呈阴性。

Unfortunately, we have very little public data on the false-negative rate for these tests in clinical practice. Research coming out of China indicates that the false-negative rate may be around 30 percent. Some of my colleagues, experts in laboratory medicine, express concerns the false-negative rate in this country could be even higher.

不幸的是,在临床实践中关于这些检测假阴性率的公开数据非常少。来自中国的研究表明假阴性率可能在30%左右。我的一些检验医学专家同事担心,美国的假阴性率可能更高。

There are many reasons a test would be falsely negative under real-life conditions. Perhaps the sampling is inadequate. A common technique requires the collection of nasal secretions far back in the nose — and then rotating the swab several times. That is not an easy procedure to perform or for patients to tolerate. Other possible causes of false negative results are related to laboratory techniques and the substances used in the tests.

在现实情况中,有很多原因会导致检测呈假阴性。也许是取样不充分。一种常见的方法是深入鼻子后部收集鼻分泌物,然后将拭子旋转几次。这不是个容易完成的步骤,病人也难以忍受。其他可能导致假阴性结果的原因,则与实验技术和检测使用的物质有关。

So, where does that leave us? Even with more testing, we are likely to be underestimating the spread of the virus. For now, we should assume that anyone could be carrying the virus. If you have had likely exposures and symptoms suggest Covid-19 infection, you probably have it — even if your test is negative. We should all continue to practice the behaviors — rigorous hand washing, not touching the face, social distancing — that impede its spread. And we need better information about the performance of these tests — including any new tests that are introduced — in the real world.

那么,我们还能怎么办呢?即使进行更多检测,我们也可能会低估病毒的传播。眼下,我们应该假设任何人都可能携带病毒。如果你可能接触过病毒,并显出Coivd-19的症状,那么你可能已经被感染——哪怕你的检测结果是阴性。我们都应该坚持严格洗手、不摸脸、保持社交距离这些行为来阻止病毒的蔓延。我们还需要更好地了解这些检测——包括所有新引入的检测——在现实世界的表现。

Even as better tests emerge, we should always put the test result in the context of the other information we have. It’s a lesson that endures throughout medicine: Look at the big picture, not a single piece of data. Triangulate on the truth, using all the sources of information you have, no matter how good a single test. And don’t be shy about questioning a conclusion that doesn’t fully fit the facts.

即便出现了更好的检测办法,我们也要始终将检测结果与掌握的其他信息联系到一起。这是贯穿医学始终的一课:从大局出发,而不只看单一的数据。不管某一次检测结果有多好,也要利用你掌握的所有信息来源,对真相进行三角测算。面对与事实不完全相符的结论,要敢于去质疑。


本文作者Harlan Krumholz博士是耶鲁大学的医学教授,也是耶鲁纽黑文医院结果研究与评估中心的主任。
翻译:Nic Wong