diff --git a/404.html b/404.html index a207aabd..99f4e920 100644 --- a/404.html +++ b/404.html @@ -1034,8 +1034,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1048,8 +1048,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CA/chap2/index.html b/CS/CA/chap2/index.html index db029d4c..cca0792c 100644 --- a/CS/CA/chap2/index.html +++ b/CS/CA/chap2/index.html @@ -1161,8 +1161,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1175,8 +1175,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CA/chap3/index.html b/CS/CA/chap3/index.html index 03b5a81f..d2ea2b7b 100644 --- a/CS/CA/chap3/index.html +++ b/CS/CA/chap3/index.html @@ -1107,8 +1107,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1121,8 +1121,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CA/chap5/index.html b/CS/CA/chap5/index.html index 6f736d11..f5b14189 100644 --- a/CS/CA/chap5/index.html +++ b/CS/CA/chap5/index.html @@ -1100,8 +1100,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1114,8 +1114,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CA/index.html b/CS/CA/index.html index 1c048a5f..4b261d27 100644 --- a/CS/CA/index.html +++ b/CS/CA/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CPP/course/index.html b/CS/CPP/course/index.html index 280b0f6c..2ad6ddc7 100644 --- a/CS/CPP/course/index.html +++ b/CS/CPP/course/index.html @@ -1262,8 +1262,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1276,8 +1276,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CPP/final_review/index.html b/CS/CPP/final_review/index.html index 5984d16a..bc30a428 100644 --- a/CS/CPP/final_review/index.html +++ b/CS/CPP/final_review/index.html @@ -1149,8 +1149,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1163,8 +1163,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/CPP/templates/index.html b/CS/CPP/templates/index.html index ea2ced96..3fb8572e 100644 --- a/CS/CPP/templates/index.html +++ b/CS/CPP/templates/index.html @@ -1041,8 +1041,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1055,8 +1055,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/OS/index.html b/CS/OS/index.html index 15d71b81..7fbc748f 100644 --- a/CS/OS/index.html +++ b/CS/OS/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/OS/lab/index.html b/CS/OS/lab/index.html index 23ac065d..2c27bec7 100644 --- a/CS/OS/lab/index.html +++ b/CS/OS/lab/index.html @@ -1359,8 +1359,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1373,8 +1373,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/index.html b/CS/index.html index 2af02891..96e8966d 100644 --- a/CS/index.html +++ b/CS/index.html @@ -1048,8 +1048,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1062,8 +1062,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/libgraphics/index.html b/CS/libgraphics/index.html index 41c91a21..0388a0fa 100644 --- a/CS/libgraphics/index.html +++ b/CS/libgraphics/index.html @@ -1290,8 +1290,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1304,8 +1304,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/CS/x86assm/index.html b/CS/x86assm/index.html index 617c87d4..62e35006 100644 --- a/CS/x86assm/index.html +++ b/CS/x86assm/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/DL/NLPTheory/explainable_nlp/index.html b/DL/NLPTheory/explainable_nlp/index.html index 5f97460c..1ce8e424 100644 --- a/DL/NLPTheory/explainable_nlp/index.html +++ b/DL/NLPTheory/explainable_nlp/index.html @@ -1140,8 +1140,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1154,8 +1154,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/DL/NLPTheory/mwp/index.html b/DL/NLPTheory/mwp/index.html index 4b0fd38f..ba271bb3 100644 --- a/DL/NLPTheory/mwp/index.html +++ b/DL/NLPTheory/mwp/index.html @@ -1298,8 +1298,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1312,8 +1312,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • @@ -1654,7 +1654,7 @@

    Towards Tractable Mathematical Reasoning: Challenges, Strategies, and Opportunities for Solving Math Word Problems (2021)

    This survey introduces the contemporary MWP datasets til 2021, and methods including rule-based, and neural network encoder-decoder structures. Specifically, this paper concludes three strategies for math word solving, (i) direct answer generation, (ii) expression tree generation for inferring answers, and (iii) template retrieval for answer computation. Considering the type of problem solving method, this paper concludes two classes. The first class is non-neural approaches (rule-base or pattern matching approaches, semantic parsing, and statistical machine learning approaches), within which a particular strategy of applying domain knowledge in classifying the problems (e.g. into change, part-whole and compare classes). The second class is neural approaches, including intuitions of (i) predicting the answer directly (ii) generating a set of equations or mathematical expressions and inferring answers from the by executing them (iii) retrieving the templates from a pool of templates derived from training data and augmenting numerical quantities to compute the answer. These neural approaches generally follow encoder-decoder architectures, which fall in four types (i) seq-to-seq (ii) Transformer-to-tree (iii) seq-to-tree (iv) graph-to-tree. - + Among the four methods, the tree-structured decoder attend both parents and siblings to generate the next token, while the bottom-up representation of sub-tree of a sibling could further help to derive better outcomes. The graph-based encoder aims to learn different types of relationships among the constituents of MWPs. This section also mentions that "Data augmentation is a popular preprocessing technique to increase the size of training data" (reverse operation-based augmentation techniques, different traversal orders of expression trees, and weak supervision). In section Math Reasoning in Neural Approaches, this paper mentions several further topics under math reasoning, interpretability and explainability, infusing explicit and definitive knowledge, and reinforcement learning.

    Datasets

    @@ -1681,19 +1681,19 @@

    MathQA (2019)

    MathQA-Dataset (math-qa.github.io) This paper proposes a math dataset which enhances the AQuA dataset by providing fully-specified operational programs. This dataset has a diverse range of operators. -

    +

    MATH (2021)

    arxiv.org/pdf/2103.03874.pdf MATH is a LaTeX format dataset, with its answer highlighted in a square block. -

    +

    SVMAP

    arkilpatel/SVAMP: NAACL 2021: Are NLP Models really able to Solve Simple Math Word Problems? (github.com) This dataset does not distinguish the data with the texts. An example data is as follows. -

    +

    GSM8k: grade school math (2021)

    Collected by OpenAI, this dataset consists of math problems in natural language descriptions, with the math formulas highlighted with special notes.The numbers are not explicitly highlighted with special symbols. Several examples of the data format are as follows. -

    +

    DRAW

    Providing 1000 grounded word problems.

    Algebra

    @@ -1706,25 +1706,25 @@

    Models

    Graph-to-Tree Learning for Solving Math Word Problems (2020)

    This paper proposes a attention-based model Graph2Tree, consisting of graph-based encoder and a tree-based decoder. The math word problems are constructed into Quantity Comparison Graph. -

    +

    Math Word Problem Solving with Explicit Numerical Values (2021)

    A novel approach called NumS2T is proposed to solve MWP. NumS2T is constructed with (a) an attention-based seq2seq model to generate its math expressions, (b) a numerical value encoder to obtain the number-aware problem state which are then concatenated with the problem hidden state in (a) to obtain number-aware problem representation, and (c) a numerical properties prediction mechanism for comparing the paired numerical values, determining the category of each numeral and measuring whether they should appear in the target expression.! -

    +

    Learning to Reason Deductively: Math Word Problem Solving as Complex Relation Extraction (2022)

    This paper proposes a novel approach

    Workflows

    Most of the recent works follow the method of knowledge distilling, which means to generate high quality data with LLMs and then train a small model with the generated (and sometimes then augmented) data. The workflow of such tasks mainly assembles that of the following paper.

    Large Language Models Are Reasoning Teachers

    This paper proposes a knowledge distilling method in solving math reasoning problems. -

    +

    Solving Math Word Problems via Cooperative Reasoning induced Language Models (ACL 2023)

    This paper develops a cooperative reasoning-induced PLM for solving MWPs called Cooperative Reasoning (CoRe), with a generator to generate reasoning paths and a verifier to supervise the evaluation.

    Scaling Relationship on Learning Mathematical Reasoning with Large Language Models (2023)

    This paper mainly focus on the following two questions: (i) Which is a better performance indicator of LLMs? (pre-training loss amount/model size) (ii) How to improve small model's performance by data augmentation? To answer the second question, this paper proposes a novel methods in data augmentation in the LLM data generation step which is called Rejection Finetuning (RFT). The algorithm of sampling data in RFT mainly adopts the thought of rejection sampling, which is expressed in the following pseudo-code. This paper assumes such an algorithm will yield as many as possible diverse reasoning paths. - + The workflow of the RFT method is illustrated as follows, where the SFT stands for supervised finetuning. - + With the novel method RFT, small models such as Llama-7b yields an accuracy of at most 49.7% on GSM8k, 14% higher than the previous SOTA method SFT.

    PAL

    This work is a prompt engineering work. diff --git a/DL/asset/Pasted image 20230831195146.png b/DL/asset/Pasted image 20230831195146.png deleted file mode 100644 index 7a89f826..00000000 Binary files a/DL/asset/Pasted image 20230831195146.png and /dev/null differ diff --git a/DL/asset/1__92bnsMJy8Bl539G4v93yg.gif b/DL/asset/attention_mechenism.gif similarity index 100% rename from DL/asset/1__92bnsMJy8Bl539G4v93yg.gif rename to DL/asset/attention_mechenism.gif diff --git "a/DL/asset/\346\210\252\345\261\2172023-08-14 23.12.24.png" b/DL/asset/graph2tree.png similarity index 100% rename from "DL/asset/\346\210\252\345\261\2172023-08-14 23.12.24.png" rename to DL/asset/graph2tree.png diff --git a/DL/asset/Pasted image 20230814170723.png b/DL/asset/gsm8k.png similarity index 100% rename from DL/asset/Pasted image 20230814170723.png rename to DL/asset/gsm8k.png diff --git a/DL/asset/v2-7761582f4974e76aa0df2a424b52ef99_720w.webp.png b/DL/asset/index.png similarity index 100% rename from DL/asset/v2-7761582f4974e76aa0df2a424b52ef99_720w.webp.png rename to DL/asset/index.png diff --git a/DL/asset/Pasted image 20230814171003.png b/DL/asset/math.png similarity index 100% rename from DL/asset/Pasted image 20230814171003.png rename to DL/asset/math.png diff --git "a/DL/asset/\346\210\252\345\261\2172023-08-14 22.14.36.png" b/DL/asset/mathqa.png similarity index 100% rename from "DL/asset/\346\210\252\345\261\2172023-08-14 22.14.36.png" rename to DL/asset/mathqa.png diff --git "a/DL/asset/\346\210\252\345\261\2172023-08-14 22.46.32.png" b/DL/asset/numerical_values.png similarity index 100% rename from "DL/asset/\346\210\252\345\261\2172023-08-14 22.46.32.png" rename to DL/asset/numerical_values.png diff --git a/DL/asset/Pasted image 20230814211856.png b/DL/asset/reasoning_teachers.png similarity index 100% rename from DL/asset/Pasted image 20230814211856.png rename to DL/asset/reasoning_teachers.png diff --git a/DL/asset/Pasted image 20230814215707.png b/DL/asset/scaling_relationship.png similarity index 100% rename from DL/asset/Pasted image 20230814215707.png rename to DL/asset/scaling_relationship.png diff --git "a/DL/asset/\346\210\252\345\261\2172023-08-14 21.59.33.png" b/DL/asset/scaling_relationship2.png similarity index 100% rename from "DL/asset/\346\210\252\345\261\2172023-08-14 21.59.33.png" rename to DL/asset/scaling_relationship2.png diff --git a/DL/asset/Pasted image 20230814173843.png b/DL/asset/svmap.png similarity index 100% rename from DL/asset/Pasted image 20230814173843.png rename to DL/asset/svmap.png diff --git "a/DL/asset/\346\210\252\345\261\2172023-08-16 00.48.41.png" b/DL/asset/towards_tractable.png similarity index 100% rename from "DL/asset/\346\210\252\345\261\2172023-08-16 00.48.41.png" rename to DL/asset/towards_tractable.png diff --git a/DL/index.html b/DL/index.html index fa473a04..50da2609 100644 --- a/DL/index.html +++ b/DL/index.html @@ -1055,8 +1055,8 @@

  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • @@ -1180,7 +1180,7 @@

    索引

    - NLP学习和工程笔记

    这个索引没写完

    而且我也不记得为什么下面放了这张图了

    -

    +

    diff --git a/Ling/Morphology/index.html b/Ling/Morphology/index.html new file mode 100644 index 00000000..7284e904 --- /dev/null +++ b/Ling/Morphology/index.html @@ -0,0 +1,1242 @@ + + + + + + + + + + + + + + + + + + + + Morphology - Mini Babel Library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + 跳转至 + + +
    +
    + +
    + + + + + + +
    + + +
    + +
    + + + + + + +
    +
    + + + +
    +
    +
    + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    Morphology

    +

    outline

    + + + + + + +
    +
    + + +
    + + + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ling/Pragmatics/ca_da/index.html b/Ling/Pragmatics/ca_da/index.html index 97edd43d..b955e8c6 100644 --- a/Ling/Pragmatics/ca_da/index.html +++ b/Ling/Pragmatics/ca_da/index.html @@ -1093,8 +1093,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1107,8 +1107,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Pragmatics/intro/index.html b/Ling/Pragmatics/intro/index.html index c251eb3c..1fad15ac 100644 --- a/Ling/Pragmatics/intro/index.html +++ b/Ling/Pragmatics/intro/index.html @@ -1154,8 +1154,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1168,8 +1168,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Pragmatics/socio/index.html b/Ling/Pragmatics/socio/index.html index 9343351d..01354a0f 100644 --- a/Ling/Pragmatics/socio/index.html +++ b/Ling/Pragmatics/socio/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Pragmatics/theories/index.html b/Ling/Pragmatics/theories/index.html index 7f084ba8..94922db7 100644 --- a/Ling/Pragmatics/theories/index.html +++ b/Ling/Pragmatics/theories/index.html @@ -1100,8 +1100,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1114,8 +1114,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Semantics/ambiguity/index.html b/Ling/Semantics/ambiguity/index.html index 2b73dcf5..fdd05ab7 100644 --- a/Ling/Semantics/ambiguity/index.html +++ b/Ling/Semantics/ambiguity/index.html @@ -1163,8 +1163,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1177,8 +1177,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Semantics/definitions/index.html b/Ling/Semantics/definitions/index.html index ba62f4f3..c47f671a 100644 --- a/Ling/Semantics/definitions/index.html +++ b/Ling/Semantics/definitions/index.html @@ -1387,8 +1387,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1401,8 +1401,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Semantics/formal_semantics/index.html b/Ling/Semantics/formal_semantics/index.html index f075533c..787c1a12 100644 --- a/Ling/Semantics/formal_semantics/index.html +++ b/Ling/Semantics/formal_semantics/index.html @@ -1258,8 +1258,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1272,8 +1272,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Semantics/index.html b/Ling/Semantics/index.html index b7a6c7d7..5abf1dbd 100644 --- a/Ling/Semantics/index.html +++ b/Ling/Semantics/index.html @@ -1123,8 +1123,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1137,8 +1137,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Syntax/conv_gen/index.html b/Ling/Syntax/conv_gen/index.html index 5d8fb8af..32423af6 100644 --- a/Ling/Syntax/conv_gen/index.html +++ b/Ling/Syntax/conv_gen/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Syntax/index.html b/Ling/Syntax/index.html index c31a8cf2..723d85b3 100644 --- a/Ling/Syntax/index.html +++ b/Ling/Syntax/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Syntax/ud_sud/index.html b/Ling/Syntax/ud_sud/index.html index 2526bc2b..07e6af42 100644 --- a/Ling/Syntax/ud_sud/index.html +++ b/Ling/Syntax/ud_sud/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/Syntax/uni_gram/index.html b/Ling/Syntax/uni_gram/index.html index 505e54f1..b2af0dc0 100644 --- a/Ling/Syntax/uni_gram/index.html +++ b/Ling/Syntax/uni_gram/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/index.html b/Ling/index.html index 96264302..2cb70137 100644 --- a/Ling/index.html +++ b/Ling/index.html @@ -70,6 +70,11 @@
    + + + 跳转至 + +
    @@ -677,6 +682,8 @@ + + 索引 @@ -1048,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1062,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • @@ -1149,6 +1156,8 @@ + +
    @@ -1166,15 +1175,31 @@ -

    索引

    +

    Linguistic Notes

    +

    It is commonly considered that the subject linguistics consists of 6 main branches.

    +
    Liguistics
    +    |     -------------
    +    | -   | Phonetics |
    +    |     -------------       -> Interface: TODO
    +    | -   | Phonology |
    +    |     -------------       -> Interface: 
    +    | -   | Morphology |
    +    |     -------------       -> Interface: 
    +    | -   |   Syntax   |
    +    |     -------------       -> Interface: 
    +    | -   | Semantics |
    +    |     -------------       -> Interface: 
    +    | -   | Pragmatics |
    +    |     -------------
    +
    + + + -

    本专栏包含语言学笔记,目前已完成以下内容

    - +

    Besides, border topics of linguistics include +- Psycholinguistics +- Phylosophy of linguistics +- Computational linguistics

    diff --git a/Ling/pol_en_todo/index.html b/Ling/pol_en_todo/index.html index 171ccf75..bf8d8a32 100644 --- a/Ling/pol_en_todo/index.html +++ b/Ling/pol_en_todo/index.html @@ -1041,8 +1041,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1055,8 +1055,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Ling/pol_zh/index.html b/Ling/pol_zh/index.html index f24b2253..446f4cdc 100644 --- a/Ling/pol_zh/index.html +++ b/Ling/pol_zh/index.html @@ -1135,8 +1135,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1149,8 +1149,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Other/24fall/index.html b/Other/24fall/index.html index a2cdfcb3..ab90128d 100644 --- a/Other/24fall/index.html +++ b/Other/24fall/index.html @@ -1045,8 +1045,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1059,8 +1059,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • @@ -1442,6 +1442,7 @@

    文书

    第四段:CCC 同上上

    第五段:Moving forward

    第六段:why [program name] and why [school name]

    +

    现在一个心得是 sop 是为该项目重新写过的那些能录,用别的项目的 sop 简单拼拼改改交上去的都给拒了。。

    References

    我的过去研究经历与我未来的目标方向特别不相似,但是感觉你必须去寻找一个平衡点,寻找两三个小标题能把他们都概括住。这两三个小标题首先要服务于未来方向,然后因为你过去的每个项目不可能只有一个属性/领域,可以选择能够服务于未来方向的方面,用“我受到了xx方面的启发”之类的话连接起来。

    UCSD 给的参考指导 diff --git a/Other/howtocite/index.html b/Other/howtocite/index.html new file mode 100644 index 00000000..2067fc18 --- /dev/null +++ b/Other/howtocite/index.html @@ -0,0 +1,1267 @@ + + + + + + + + + + + + + + + + + + + + How to cite elegantly? - Mini Babel Library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + 跳转至 + + +
    +
    + +
    + + + + + + +
    + + +
    + +
    + + + + + + +
    +
    + + + +
    +
    +
    + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    How to cite elegantly?

    +

    Which format?

    +

    In-text citation

    +

    References

    +

    Tools

    +

    ... But the best tool is by hand

    + + + + + + +
    +
    + + +
    + + + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Other/index.html b/Other/index.html index fb86184d..0d2b9ac4 100644 --- a/Other/index.html +++ b/Other/index.html @@ -1055,8 +1055,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1069,8 +1069,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Other/nlp_phd/index.html b/Other/nlp_phd/index.html index 905e40b1..81bff727 100644 --- a/Other/nlp_phd/index.html +++ b/Other/nlp_phd/index.html @@ -1043,8 +1043,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1057,8 +1057,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Other/nlp_resources/index.html b/Other/nlp_resources/index.html index 6bfa60d8..ccf37bda 100644 --- a/Other/nlp_resources/index.html +++ b/Other/nlp_resources/index.html @@ -11,10 +11,10 @@ - + - + @@ -1043,20 +1043,6 @@ - -
  • - - APA Format - -
  • - - - - - - - - @@ -1162,6 +1148,20 @@ +
  • + + WhyNote + +
  • + + + + + + + + +
  • Portfolio @@ -1320,6 +1320,7 @@

    DL & NLP Resources

    +

    这个页面用来收集 nlp 入门资料的 minimal closure(指足够学会的最小资源集合)

    Machine Learning Theory

    Google的一个教程,里面的playground做得比较直观,无需代码

    Machine Learning  |  Google for Developers

    diff --git a/Other/portfolio/index.html b/Other/portfolio/index.html index c30c2a0b..41a83d4b 100644 --- a/Other/portfolio/index.html +++ b/Other/portfolio/index.html @@ -11,7 +11,7 @@ - + @@ -1045,8 +1045,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1059,8 +1059,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Other/tools/index.html b/Other/tools/index.html index 8e03e7dd..c25b85e4 100644 --- a/Other/tools/index.html +++ b/Other/tools/index.html @@ -14,7 +14,7 @@ - + @@ -1140,8 +1140,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1154,8 +1154,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/Other/apa/index.html b/Other/whynote/index.html similarity index 75% rename from Other/apa/index.html rename to Other/whynote/index.html index ca452eb0..b5449cd9 100644 --- a/Other/apa/index.html +++ b/Other/whynote/index.html @@ -8,20 +8,20 @@ - + - + - + - APA Format - Mini Babel Library + WhyNote - Mini Babel Library @@ -71,7 +71,7 @@
    - + 跳转至 @@ -106,7 +106,7 @@
    - APA Format + WhyNote
    @@ -1043,6 +1043,20 @@ + +
  • + + DL & NLP 资源整理 + +
  • + + + + + + + + @@ -1055,7 +1069,7 @@ - APA Format + WhyNote @@ -1068,20 +1082,6 @@ -
  • - - DL & NLP 资源整理 - -
  • - - - - - - - - -
  • Portfolio @@ -1175,77 +1175,14 @@ -

    APA Format

    -

    我喜欢用引文自动生成器,推荐几个

    +

    为什么要写这些笔记

    -

    外语论文文献引用格式——APA Style

    -

    APA格式指的是美国心理学会(American Psychological Association,简称APA)出版的《美国心理协会出版手册》(Publication Manual of the American Psychological Association)。它起源于1929年,到目前为止已经更新至第七版,总页数也已经超过400页,里面详细规范了文章的页面格式(行间距、字体、字号、页边距等等)、图表表格\参考文献等等,极为全面。APA主要用于心理、教育及社会科学等学科。其规范格式主要包括文内文献引用(Reference Citations in Text)和文末参考文献列表(Reference List)两大部分。

    -

    APA格式强调出版物的年代(Time of the Publication Year)而不大注重原文作者的姓名。引文时常将出版年代置于作者缩写的名(the Initial of Author’s First Name)之前。

    -

    一、文内文献引用(ReferenceCitations in Text

    -

    1.单一作者

    -

    格式应为“(作者姓氏(非首字母),发表年份)”。若作者姓名在文章中已被提及,只需标出年份就好(若需要可加上页数),仍需使用括号。多位作者以上同理。例如:

    -

    A recent study found a possible genetic cause of alcoholism (Pauling, 2005). Pauling (2005) discovered a possible genetic cause of alcoholism.

    -

    2.两位作者

    -

    作者姓氏必须以他们的名字在其发表文章内的顺序来排序。若两个作者都在括号内引用,名字中间需加上“&”符号;若不在括号内则使用“and”。例如:

    -

    A recent study found a possible genetic cause of alcoholism (Pauling & Liu, 2005). Pauling and Liu (2005) discovered a possible genetic cause of alcoholism.

    -

    3.三至五位作者

    -

    第一次引用时需列举全部的作者,往后若引用相同的文献,只需举出最主要的作者,再加上“et al.”。但是,在参考文献部分,全部作者的姓名皆须列举出来。例如:

    -

    A recent study found a possible genetic cause of alcoholism (Pauling, Liu, & Guo, 2005). Pauling, Liu, and Guo (2005) conducted a study that discovered a possible genetic cause of alcoholism. Pauling et al. (2005) discovered a possible genetic cause of alcoholism. A recent study found a possible genetic cause of alcoholism (Pauling et al., 2005).

    -

    4.六位作者以上

    -

    举出第一位作者即可,格式应为“(作者 et al.,年份)”。在参考文献部分,全部作者的姓名皆须列举出来。例如:

    -

    Pauling et al. (2005) discovered a possible genetic cause of alcoholism.

    -

    5.多篇文献,同一作者

    -

    若一作者有多篇你想引用的文献,只需用逗号来区隔作品的发表年份(最早到最晚依序排列)。若多篇文献在同一年内发表,请在年份后面加上a、b、c……等标注。(按:abc的使用需与参考文献部分有所对应,而这些文献的编排以标题名称的字母来决定。)例如:

    -

    A recent study found a possible genetic cause of alcoholism (Pauling, 2004, 2005a, 2005b). Pauling (2004, 2005a, 2005b) conducted a study that discovered a possible genetic cause of alcoholism

    -

    6.多篇文献,多位作者

    -

    根据上一个的规则,并且使用分号隔开。排序先依照作者姓氏的字母,接着是发表年份。例如:

    -

    A recent study found a possible genetic cause of alcoholism (Alford, 1995; Pauling, 2004, 2005; Sirkis, 2003)

    -

    7.直接引述

    -

    格式与前述无不同,一样为“(作者,年份,页数)”。例如:

    -

    When asked why his behavior had changed so dramatically, Max simply said “I think it’s the reinforcement” (Pauling, 2004, p. 69).

    -

    二、文末参考文献列表(Reference List

    -

    在参考文献部分,APA格式规定部分的人名必须以姓(Family name)的字母顺序来排列,包括名(first name)的前缀。

    -

    1.单一作者著作的书籍。例如:

    -

    Sheril, R. D. (1956). The terrifying future: Contemplating color television. San Diego: Halstead.

    -

    2.两位作者以上合著的书籍。例如:

    -

    Smith, J., & Peter, Q. (1992). Hairball: An intensive peek behind the surface of an enigma. Hamilton, ON: McMaster University Press.

    -

    3.文集中的文章。例如:

    -

    Mcdonalds, A. (1993). Practical methods for the apprehension and sustained containment of supernatural entities. In G. L. Yeager (Ed.), Paranormal and occult studies: Case studies in application (pp. 42–64). London: OtherWorld Books.

    -

    4.期刊中的文章。例如:

    -

    Crackton, P. (1987). The Loonie: God’s long-awaited gift to colourful pocket change? Canadian Change, 64(7), 34–37.

    -

    5.月刊杂志中的文章。例如:

    -

    Henry, W. A., III. (1990, April 9). Making the grade in today’s schools. Time, 135, 28-31.

    -

    6.报纸中的文章。例如:

    -

    Wrong, M. (2005, August 17). Misquotes are “Problematastic” says Mayor. Toronto Sol., 4.

    -

    7.政府官方文献

    -

    Revenue Canada. (2001). Advanced gouging: Manual for employees (MP 65–347/1124). Ottawa: Minister of Immigration and Revenue.

    -

    8.针对电子文献、网站和线上文章,APA格式的网站上有订定一些基本的规则,第一就是提供读者详细的文献内容来源,第二为提供其有效的参考来源。

    -

    ⑴ 网络文章的打印版本

    -

    Marlowe, P., Spade, S., & Chan, C. (2001). Detective work and the benefits of colour versus black and white [Electronic version].Journal of Pointless Research, 11,123–124.

    -

    ⑵ 电子期刊的文章(只有网络版的期刊)

    -

    Blofeld, E. S. (1994, March 1). Expressing oneself through Persian cats and modern architecture.Felines & Felons, 4,Article 0046g. Retrieved October 3, 1999, from 网页地址.

    -

    ⑶ 电子短信(newsletter)的文章

    -

    Paradise, S., Moriarty, D., Marx, C., Lee, O. B., Hassel, E., et al. (1957, July). Portrayals of fictional characters in reality-based popular writing: Project update.Off the beaten path, 7(3). Retrieved October 3, 1999, from 网页地址.

    -

    ⑷ 单篇线上文献(无作者及著作日期)

    -

    What I did today.(n.d.). Retrieved August 21, 2002, from 网页地址.

    -

    ⑸ 从大学课程或系上网站取得的文献

    -

    Rogers, B. (2078).Faster-than-light travel: What we’ve learned in the first twenty years.Retrieved August 24, 2079, from Mars University, Institute for Martian Studies Web site: 网页地址.

    -

    ⑹ 从数据库搜寻的期刊文章的电子复制版本(3至5位作者)

    -

    Costanza, G., Seinfeld, J., Benes, E., Kramer, C., & Peterman, J. (1993). Minutiæ and insignificant observations from the nineteen-nineties.Journal about Nothing, 52,475–649. Retrieved October 31, 1999, from NoTHINGJournals database.

    -

    ⑺ 电子邮件或其他个人通讯(不出现在参考文献列表中,仅在文中标出)。例如:

    -

    (A. Monterey, personal communication, September 28, 2001).

    -

    9.储存于光碟的书籍

    -

    Nix, G. (2002). Lirael, Daughter of the Clayr [CD]. New York: Random House/Listening Library.

    -

    10.储存于录音带的书籍

    -

    Nix, G. (2002). Lirael, Daughter of the Clayr [Cassette Recording No. 1999-1999-1999]。New York: Random House/Listening Library.

    -

    APA格式范文可浏览网页:

    -

    MLA Sample Essay

    -

    其详细的介绍可参看美国佛蒙特大学图书馆大卫•W•豪纪念图书馆(David W. Howe Memorial Library of THE UNIVERSITY OF VERMONT Libraries)网站上的“APA (American Psychological Association) Style”网页(网址:

    -

    APA (American Psychological Association) Style | Howe Library

    +

    本来想写多一点的,但是太懒了

    diff --git a/Other/zju_ling_cs/index.html b/Other/zju_ling_cs/index.html index 26081f9b..77615de2 100644 --- a/Other/zju_ling_cs/index.html +++ b/Other/zju_ling_cs/index.html @@ -1045,8 +1045,8 @@
  • - - APA Format + + DL & NLP 资源整理
  • @@ -1059,8 +1059,8 @@
  • - - DL & NLP 资源整理 + + WhyNote
  • diff --git a/index.html b/index.html index e3667307..2d2dd6ea 100644 --- a/index.html +++ b/index.html @@ -251,10 +251,10 @@
  • - 页表Page Table + 页表 Page Table -
  • 这是我主要用中文写的BLOG,大部分内容是学习笔记。我的笔记不多!以后也不会多的😤(出处🔗) 欢迎来看我的笔记!

    -

    页表Page Table

    +

    页表 Page Table

    在网上找笔记/资源的时候,我的最大感受之一是虽然资源很多很多,但是常常不知道某个资源有多重要,无法评估里面涵盖了多少东西从而不知道要不要点开,或者无法估计在期末有限的时间里应该花多少时间复习某个资源。我正在努力在这里建一个尚能读的资源的pagetable,以防不幸的游客从侧边栏游走进本图书馆的垃圾堆漩涡🌀🌊。如果我目前的笔记在这个维度上做得不好,请联系我或者向我提issue催我改 谢谢!

    @@ -1356,7 +1356,7 @@

    💻 CS Notes

    - + @@ -1461,7 +1461,7 @@

    🌳 Linguistics Notes

    - + @@ -1516,7 +1516,7 @@

    💭 说瞎话了

    编程语言🟡C尖🔴C尖 🔴C++ 🔗萱宝 🔴Verilog 🔗HDLBits 🔴Python 语言学 🟡语音学 🔴音系学🔴形态学🟡形态学 🟡句法学 🔗圆猫 🟢语义学 🟢语用学
    -

    相似资源指路

    +

    资源指路

    @@ -1535,6 +1535,24 @@

    相似资源指路

    + + + + + + + + + + + + + + + + + +
    友链来自于内容推荐语
    mem 的小站memset0 小朋友!算法笔记/ZJU 课程笔记谢谢第一位找我换友链的小朋友!是 OIer,算法笔记里的一些题目是不太常见的资源

    联系作者

    📫 邮箱 | 🧑‍💻 主页

    diff --git a/search/search_index.json b/search/search_index.json index 111cd5e6..f136ed43 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["ja"],"separator":"[\\s\\-\uff0c\u3002]+","pipeline":["stemmer"]},"docs":[{"location":"","title":"\ud83c\udfdb\ufe0f\ud83d\udcda Mini Babel Library","text":"

    La biblioteca de Babel

    \u300c\u5b87\u5b99\uff08\u522b\u4eba\u7ba1\u5b83\u53eb\u56fe\u4e66\u9986\uff09\u7531\u8bb8\u591a\u516d\u89d2\u5f62\u7684\u56de\u5eca\u7ec4\u6210\uff0c\u6570\u76ee\u4e0d\u80fd\u786e\u5b9a\uff0c\u4e5f\u8bb8\u662f\u65e0\u9650\u7684\u300d \u2014\u2014 Jorge Luis Borges (1939)

    \u8fd9\u662f\u6211\u4e3b\u8981\u7528\u4e2d\u6587\u5199\u7684BLOG\uff0c\u5927\u90e8\u5206\u5185\u5bb9\u662f\u5b66\u4e60\u7b14\u8bb0\u3002\u6211\u7684\u7b14\u8bb0\u4e0d\u591a\uff01\u4ee5\u540e\u4e5f\u4e0d\u4f1a\u591a\u7684\ud83d\ude24(\u51fa\u5904\ud83d\udd17) \u6b22\u8fce\u6765\u770b\u6211\u7684\u7b14\u8bb0\uff01

    "},{"location":"#page-table","title":"\u9875\u8868Page Table","text":"

    \u5728\u7f51\u4e0a\u627e\u7b14\u8bb0/\u8d44\u6e90\u7684\u65f6\u5019\uff0c\u6211\u7684\u6700\u5927\u611f\u53d7\u4e4b\u4e00\u662f\u867d\u7136\u8d44\u6e90\u5f88\u591a\u5f88\u591a\uff0c\u4f46\u662f\u5e38\u5e38\u4e0d\u77e5\u9053\u67d0\u4e2a\u8d44\u6e90\u6709\u591a\u91cd\u8981\uff0c\u65e0\u6cd5\u8bc4\u4f30\u91cc\u9762\u6db5\u76d6\u4e86\u591a\u5c11\u4e1c\u897f\u4ece\u800c\u4e0d\u77e5\u9053\u8981\u4e0d\u8981\u70b9\u5f00\uff0c\u6216\u8005\u65e0\u6cd5\u4f30\u8ba1\u5728\u671f\u672b\u6709\u9650\u7684\u65f6\u95f4\u91cc\u5e94\u8be5\u82b1\u591a\u5c11\u65f6\u95f4\u590d\u4e60\u67d0\u4e2a\u8d44\u6e90\u3002\u6211\u6b63\u5728\u52aa\u529b\u5728\u8fd9\u91cc\u5efa\u4e00\u4e2a\u5c1a\u80fd\u8bfb\u7684\u8d44\u6e90\u7684pagetable\uff0c\u4ee5\u9632\u4e0d\u5e78\u7684\u6e38\u5ba2\u4ece\u4fa7\u8fb9\u680f\u6e38\u8d70\u8fdb\u672c\u56fe\u4e66\u9986\u7684\u5783\u573e\u5806\u6f29\u6da1\ud83c\udf00\ud83c\udf0a\u3002\u5982\u679c\u6211\u76ee\u524d\u7684\u7b14\u8bb0\u5728\u8fd9\u4e2a\u7ef4\u5ea6\u4e0a\u505a\u5f97\u4e0d\u597d\uff0c\u8bf7\u8054\u7cfb\u6211\u6216\u8005\u5411\u6211\u63d0issue\u50ac\u6211\u6539 \u8c22\u8c22\uff01

    \ud83d\udd34 \ud83d\udfe1 \ud83d\udfe2 \ud83d\udd17 \u5199\u5f97\u5f88\u70c2\u6216\u4e0d\u6253\u7b97\u5199\u4e86 \u5728\u5199\u7684\u4e14\u6709\u751f\u4e4b\u5e74\u4f1a\u5199\u5b8c\u7684\u3002 \u53ef\u4ee5\u9605\u8bfb\uff01 \u540c\u7c7b\u4e00\u6837\u597d\u6216\u66f4\u597d\u7684\u8d44\u6e90"},{"location":"#cs-notes","title":"\ud83d\udcbb CS Notes","text":"\u7c7b\u522b \u8bfe.. \u7f16\u7a0b\u8bed\u8a00 \ud83d\udfe1C\u5c16 \ud83d\udd34C++ \ud83d\udd17\u8431\u5b9d \ud83d\udd34Verilog \ud83d\udd17HDLBits \ud83d\udd34Python \ud83d\udfe2x86\u6c47\u7f16 \u8ba1\u7b97\u673a\u79d1\u5b66 \ud83d\udd34\u79bb\u6563\u6570\u5b66 \ud83d\udd17\u5706\u732b \ud83d\udfe1FDS \ud83d\udd34ADS \ud83d\udd34\u8ba1\u7b97\u7406\u8bba \ud83d\udd34\u7f16\u8bd1\u539f\u7406 \ud83d\udd17\u8431\u5b9d \u8f6f\u4ef6 \ud83d\udfe2OS \ud83d\udd17\u4fee\u52fe \ud83d\udfe1DBMS \ud83d\udd34\u8ba1\u7f51 \ud83d\udd34\u8f6f\u5de5 \u786c\u4ef6 \ud83d\udd34\u6570\u903b \ud83d\udd17\u4fee\u52fe \ud83d\udd34\u8ba1\u6982 \ud83d\udd34\u8ba1\u7ec4 \ud83d\udfe2\u4f53\u7cfb \u4e0d\u597d\u63cf\u8ff0 \ud83d\udd34\u6c9f\u901a\u6280\u5de7 \ud83d\udfe1\u5199\u4e2a\u722c\u866b"},{"location":"#dl-notes","title":"\ud83c\udf93 DL Notes","text":"\u7c7b\u522b \u8bfe.. DL \ud83d\udfe1RL CV NLP \ud83d\udd34Explainable NLP \ud83d\udd34Math Word Problem DM"},{"location":"#linguistics-notes","title":"\ud83c\udf33 Linguistics Notes","text":"\u7c7b\u522b \u8bfe.. \u8bed\u8a00\u5b66 \ud83d\udfe1\u8bed\u97f3\u5b66 \ud83d\udd34\u97f3\u7cfb\u5b66 \ud83d\udd34\u5f62\u6001\u5b66 \ud83d\udfe1\u53e5\u6cd5\u5b66 \ud83d\udd17\u5706\u732b \ud83d\udfe2\u8bed\u4e49\u5b66 \ud83d\udfe2\u8bed\u7528\u5b66 \u4e0d\u597d\u63cf\u8ff0 \ud83d\udfe2\u8bed\u8a00\u54f2\u5b66"},{"location":"#_1","title":"\ud83d\udcad \u8bf4\u778e\u8bdd\u4e86","text":"\u7c7b\u522b \u5e16\u5b50.. \u751f\u5b58\u7ecf\u9a8c.. ZJU\u751f\u5b58\u7ecf\u9a8c.. \ud83d\udfe2\u4ece\u82f1\u4e13\u8f6cCS\u548cNLP\u7684\u5efa\u8bae\u5e16 \u5347\u5b66\u7ecf\u9a8c.. \ud83d\udfe124fall\u7533\u8bf7\u8bb0\u5f55"},{"location":"#_2","title":"\u76f8\u4f3c\u8d44\u6e90\u6307\u8def","text":"\u7ad9 \u5b9a\u4f4d\u662f \u672c\u7ad9\uff1a# \u63ba\u6742\u81ea\u5df1\u89c2\u70b9\u7684\u7b14\u8bb0 + \u5fc3\u5f97 \u4ed3\u5e93\uff1a\ud83d\udd17ZJU_COURSE_MATERIALS \u5ba2\u89c2\u901a\u7528\u7684\u4e00\u4e2aZJU\u8bfe\u7a0b\u8d44\u6599\u5de5\u5177\u7bb1"},{"location":"#_3","title":"\u8054\u7cfb\u4f5c\u8005","text":"

    \ud83d\udceb \u90ae\u7bb1 | \ud83e\uddd1\u200d\ud83d\udcbb \u4e3b\u9875

    "},{"location":"CS/","title":"\u7d22\u5f15","text":"

    \u672c\u7ae0\u8282\u5305\u62ec\u8ba1\u7b97\u673a\u79d1\u5b66\u7b14\u8bb0

    "},{"location":"CS/libgraphics/","title":"C\u5927\u7a0b libgraphics \u6587\u6863 \u4f7f\u7528\u8bb0\u5f55","text":"

    \u26a0\ufe0f \u6ca1\u5199\u5b8c TODO

    "},{"location":"CS/libgraphics/#_1","title":"\u5df2\u77e5\u95ee\u9898","text":""},{"location":"CS/libgraphics/#devc","title":"DevC++\u56fe\u5f62\u7f16\u7a0b\u8fc7\u7a0b","text":""},{"location":"CS/libgraphics/#_2","title":"\u51fd\u6570\u5e93","text":"

    graphics.h \u4ec5\u63d0\u4f9b\u4ee5\u4e0b\u5c11\u91cf\u753b\u56fe\u51fd\u6570\u63a5\u53e3

    InitGraphics();\nMovePen(x, y);\nDrawLine(dx, dy);\nDrawArc(r, start, sweep);\nGetWindowWidth();\nGetWindowHeight();\nGetCurrentX();\nGetCurrentY();\n

    \u6211\u4eec\u5c06\u5728\u4e0b\u9762\u4ecb\u7ecd\u8fd9\u4e9b\u63a5\u53e3\u7684\u7528\u6cd5\u3002

    "},{"location":"CS/libgraphics/#_3","title":"\u521d\u59cb\u5316\u64cd\u4f5c","text":"

    \u5728main.c\u91cc\u9700\u8981\u8fdb\u884c\u5982\u4e0b\u521d\u59cb\u5316

    #include \"graphics.h\"\n#include \"extragraph.h\"\n#include \"imgui.h\"\nvoid Main()        // \u6ce8\u610f\u8fd9\u91cc\u9700\u8981\u4f7f\u7528\u5927\u5199Main\n{\nSet WindowTitle(\"Your Title\");\nInitGraphics();  // \u8c03\u7528\u4e86\u56fe\u5f62\u6a21\u5f0f\n}\n

    InitGraphics(); \u8fd9\u4e2a\u51fd\u6570\u4f1a\u6253\u5f00\u4e00\u4e2a\u7a7a\u7684\u56fe\u5f62\u7a97\u53e3\u3002

    "},{"location":"CS/libgraphics/#_4","title":"\u7a97\u53e3","text":"

    \u4ee5\u4e0b\u56db\u4e2a\u51fd\u6570\u90fd\u4e0d\u9700\u8981\u4f20\u5165\u53c2\u6570\uff0c\u5206\u522b\u8fd4\u56de\u7a97\u53e3\u5bbd\u3001\u9ad8\uff0c\u5f53\u524dX\u3001Y\u5750\u6807\u3002

    GetWindowWidth();\nGetWindowHeight();\nGetCurrentX();\nGetCurrentY();\n
    "},{"location":"CS/libgraphics/#_5","title":"\u597d\u7684\u7f16\u5199\u4e60\u60ef","text":"

    \u5e94\u8be5\u5148\u5b9a\u4e49\u4e00\u4e9b\u5e38\u91cf\uff0c\u7ed9\u8fd9\u4e9b\u5e38\u91cf\u53d6\u540d\u5b57

    #define HouseHeight 2.0\n#define HouseWidth 3.0\n#define AtticHeight 0.7\n#define DoorWidth 0.4\n#define DoorKnobRadius 0.03\n#define DoorKnobInset 0.07\n#define PaneHeight 0.25\n#define PaneWidth 0.2\n#define FirstFloorWindows 0.3\n#define SecondFloorWindows 1.25\n
    "},{"location":"CS/libgraphics/#_6","title":"\u753b\u56fe\u5f62\u7684","text":""},{"location":"CS/libgraphics/#movepen","title":"MovePen","text":"

    \u5c06\u7b14\u79fb\u52a8\u5230(x, y)\u8be5\u5750\u6807\u3002\u6ce8\u610f\u5f53\u753b\u56fe\u5f62\u65f6\uff0c\u540e\u9762\u51e0\u4e2a\u51fd\u6570\u7684\u76f8\u5bf9\u4f4d\u79fb\uff0c\u90fd\u662f\u76f8\u5bf9\u4e8e\u8fd9\u4e2a\u51fd\u6570\u8bbe\u7f6e\u7684\u7b14\u5750\u6807\u79fb\u52a8\u7684\u3002

    MovePen(double x, double y);\n
    "},{"location":"CS/libgraphics/#drawline","title":"DrawLine","text":"

    \u5728\u753b\u7ebf\u4e4b\u524d\u4e00\u5b9a\u8981MovePen();

    DrawLine(double dx, double dy);\n

    \u753b\u7ebf\u7684\u65b9\u5411\uff1a

    \u6a2a\u5750\u6807\u6700\u5de6\u8fb9\u662f0\uff0c\u5411\u53f3\u589e\u5927

    \u7eb5\u5750\u6807\u6700\u4e0b\u9762\u662f0\uff0c\u5411\u4e0a\u589e\u5927

    \u53ef\u4ee5\u7406\u89e3\u4e3a\u6211\u4eec\u5728\u7b2c\u4e00\u8c61\u9650

    "},{"location":"CS/libgraphics/#drawarc","title":"DrawArc","text":"

    \u5728\u753b\u5f27\u4e4b\u524d\u4e00\u5b9a\u8981MovePen();

    DrawArc(double r, double start, double sweep);\n
    "},{"location":"CS/libgraphics/#_7","title":"\u6211\u4eec\u5e94\u5f53\u628a\u753b\u77e9\u5f62\u5c01\u88c5\u6210\u4e00\u4e2a\u65b0\u7684\u51fd\u6570","text":"
    void DrawBox (double x, double y, double width, double height)\n{\nMovePen(x, y);\nDrawLine(0, height);\nDrawLine(width, 0);\nDrawLine(0, height);\nDrawLine(-width, 0);\n}\n
    void DrawCenteredBox(double x, double y, double width, double height)\n{\nDrawBox(w - width/2, y - height/2, width, height);\n}\n
    "},{"location":"CS/libgraphics/#_8","title":"\u753b\u5706\u7684\u51fd\u6570","text":"
    void DrawCenteredCircle(double x, double y, double r)\n{\nMovePen(x + r, y);\nDrawArc(r, 0, 360);\n}\n
    "},{"location":"CS/libgraphics/#_9","title":"\u6587\u5b57","text":"

    \u4ece\u5f53\u524d\u4f4d\u7f6e\u5f00\u59cb\u8f93\u51fa\u6587\u672c\u4e32

    DrawTextString(string);\n

    \u8fd9\u4e2a\u51fd\u6570\u7528\u4e8e\u83b7\u53d6\u67d0\u4e2a\u5b57\u7b26\u4e32\u957f\u5ea6

    double stringLen = TextStringWidth(string); 
    "},{"location":"CS/libgraphics/#_10","title":"\u67e5\u770b\u56de\u8c03\u51fd\u6570\u7c7b\u578b","text":"
    typedef void(* KeyboardEventCallback)(int key, int event);\n
    "},{"location":"CS/libgraphics/#_11","title":"\u5b9a\u65f6\u5668","text":""},{"location":"CS/libgraphics/#_12","title":"\u65f6\u95f4\u56de\u8c03\u51fd\u6570","text":"
    registerTimerEvent(mytimer);  //\u83b7\u53d6\u7535\u8111\u65f6\u949f\u4fe1\u606f\u8fd4\u56de\u7ed9mytimer\nstartTimer(0, (int)(1000/speed));  // \u8981\u8ba8\u8bba\u4f20\u8fdb\u6765\u7684timer\u662f\u4ec0\u4e48\n
    "},{"location":"CS/libgraphics/#_13","title":"\u5b9a\u65f6\u5668\u6d88\u606f\u56de\u8c03\u51fd\u6570","text":"
    void TimerEventProcess(int timerID);\n

    \u793a\u4f8b

    typedef enum\n{\nLabelTimer,\nBoxTimer,\n} MyTimer;\n
    void mytimer(int  timerID)\n{\nswitch (timerID)\n{\ncase LabelTimer:\nlabel_x += 0.5;\nif (label_x > 5.0) label_x = 1.0;\ndisplay();\nbreak;\ncase BoxTimer:\nbox_y += 0.5;\nif (box_y > 5.0) box_y = 1.0;\ndisplay();\nbreak;\nbreak;\n}\n}\n
    registerTimerEvent(mytimer);\nstartTimer(LabelTimer, 100);\nstartTimer(BoxTimer, 200);\n
    "},{"location":"CS/libgraphics/#_14","title":"\u9f20\u6807","text":""},{"location":"CS/libgraphics/#_15","title":"\u9f20\u6807\u6d88\u606f\u56de\u8c03\u51fd\u6570","text":"
    void MouseEventProcess(int x, int y, int button, int event);\n

    x, y - \u4f4d\u7f6e\u5750\u6807

    button - \u6309\u4e0b\u7684\u662f\u54ea\u4e2a\u952e

    event - \u6309\u4e0b\uff0c\u677e\u5f00\uff0c\u79fb\u52a8\u7b49\u4e8b\u4ef6

    void myMouseEvent (int x, int y, int button, int event)\n{\nmouse_x = ScaleXInches(x);   // \u8fd9\u4e2a\u51fd\u6570\u5728extragraph\u5e93\u91cc\nmouse_y = ScaleYInches(y);\ndisplay();\n}\n

    \u9700\u8981\u5728Main()\u91cc\u6dfb\u52a0\u8fd9\u4e00\u884c

    registerMouseEvent(myMouseEvent);\n

    \u5728display()\u91cc

    void display()\n{\ndouble w = 1.0;\ndouble h = GetFontHeight() * 2;\n// \u6e05\u9664\u5c4f\u5e55\nDisplayClear();\n// draw a square\nSetPenColor(\"Red\");\ndrawLabel(label_x, label_y, \"Lable is Here\");\n//draw a rect/box to trace the mouse\n//drawRectangle(mouse_x, mouse_y, w, h, 0);\nSetPenColor(\"Blue\");\ndrawBox(mouse_x, mouse_y, w, h, 1, \"This box follows the mouse\", 'L', \"Red\");\n}\n
    "},{"location":"CS/libgraphics/#linkedlist","title":"\u4f7f\u7528linkedlist\u5e93","text":"
    #include \"linkedlist.h\"\n

    \u521b\u5efa\u4e00\u4e2a linkedlist \u540d\u53eb g_polylines

    linkedlistADT g_polylines = NULL;\ng_polylines = NewLinkedList();\ndisplay();\n
    void display()\n{\nlinkedlistADT poly = NextNode(g_polylines, g_polylines);\nSetPenColor(\"Blue\");\nif (poly) {\nPoint * p = (Point*) NodeObj(g_polylines, poly);\ndouble lx = p->x;\ndouble ly = p->y;\nMovePen(lx, ly);\nwhile (poly = NextNode(g_polylines, poly))\n{\np = (Point*) NodeObj(g_polylines, poly);\nDrawLine(p->x - lx, p->y - ly);\nlx = p->x;\nly = p->y;\n}\n}\n}\n
    "},{"location":"CS/libgraphics/#button","title":"\u4f7f\u7528button\u548c\u952e\u76d8","text":"

    \u8fd9\u6b21\u9700\u8981\u7528\u5230\u7684\u5e93

    #include <windows.h>\n#include <winuser.h>\n#include \"graphics.h\"\n#include \"extgraph.h\"\n#include \"imgui.h\"\n#include \"linkedlist.h\"\n
    "},{"location":"CS/libgraphics/#_16","title":"\u5b57\u7b26\u8f93\u5165\u56de\u8c03\u51fd\u6570","text":"
    void charEventProcess(char c);\n

    c - \u8f93\u5165\u5b57\u7b26\u7684ASCII\u7801

    "},{"location":"CS/libgraphics/#_17","title":"\u952e\u76d8\u56de\u8c03\u51fd\u6570","text":"
    void KeyboardEventProcess(int key, int event);\n

    key - \u54ea\u4e2a\u952e

    event - \u6309\u4e0b\u8fd8\u662f\u677e\u5f00

    \u793a\u4f8b

    \u5728Main()\u4e2d

    \n
    void myKeyboardEvent(int key, int event)\n{\nuiGetKeyboard(key, event); // needed for using simpleGUI\ndisplay();\nswitch (event)\n{\ncase KEY_UP:\nif (key == VK_F1)\ng_add_point = !g_add_point;\nbreak;\ndefault:\nbreak;\n}\n}\n
    "},{"location":"CS/libgraphics/#_18","title":"\u989c\u8272\u5e93","text":"

    \u81ea\u5e26\u7684\u989c\u8272\u5217\u8868

    char colorlist[100][100] = {\u201dBlack\u201d, \u201cDark Gray\u201d, \u201cGray\u201d, \u201cLight Gary\u201d, \u201cWhite\u201d, \u201cBrown\u201d, \u201cRed\u201d, \u201cOrange\u201d, \u201cYellow\u201d, \u201cGreen\u201d, \u201cBlue\u201d, \u201cViolet\u201d, \u201cMagenta\u201d, \u201cCyan\u201d};\nconst int colorNumber = 14;\n

    \u81ea\u5b9a\u4e49\u989c\u8272

    \u989c\u8272\u4f1a\u88ab\u52a0\u5165\u989c\u8272\u5e93\uff0cRGB\u7684\u53d6\u503c\u8303\u56f4\u90fd\u662f[0, 1]\u800c\u4e0d\u662f[0, 256)

    DefineColor(\"Color Name\", R, G, B);\n
    "},{"location":"CS/libgraphics/#libgraphics","title":"libgraphics\u5176\u5b83\u5e38\u7528\u7684\u4e1c\u897f","text":""},{"location":"CS/x86assm/","title":"x86\u6c47\u7f16","text":""},{"location":"CS/x86assm/#lab","title":"Lab\u8bb0\u5f55","text":"

    Failure

    Lab\u5df2\u7ecf\u5168\u90e8\u6362\u6389\uff0c\u8fd9\u90e8\u5206\u4f5c\u4e1a\u4ecb\u7ecd\u65e0\u6cd5\u53c2\u8003\u4e86\u3002

    "},{"location":"CS/x86assm/#6","title":"6\u79cd\u5bfb\u5740\u65b9\u5f0f\u4e0e\u5176\u4f5c\u7528","text":"\u8bf4\u660e \u793a\u4f8b \u4f5c\u7528 \u7acb\u5373\u5bfb\u5740 mov eax,56H \u901a\u5e38\u7528\u4e8e\u8d4b\u503c \u76f4\u63a5\u5bfb\u5740 mov eax,[1255887H] \u901a\u5e38\u7528\u4e8e\u5904\u7406\u53d8\u91cf \u5bc4\u5b58\u5668\u5bfb\u5740 mov eax,[edi] \u5730\u5740\u5728\u5bc4\u5b58\u5668\u4e2d \u5bc4\u5b58\u5668\u76f8\u5bf9\u5bfb\u5740 mov eax,[edi+20H] \u5e38\u7528\u4e8e\u8bbf\u95ee\u6570\u7ec4\u548c\u7ed3\u6784 \u57fa\u5740\u52a0\u53d8\u5740\u5bfb\u5740 mov eax,[EBP+ESI] \u5e38\u7528\u4e8e\u8bbf\u95ee\u6570\u7ec4 \u76f8\u5bf9\u57fa\u5740\u52a0\u53d8\u5740\u5bfb\u5740 mov eax,[EBX+EDI-10H] \u5e38\u7528\u4e8e\u8bbf\u95ee\u7ed3\u6784"},{"location":"CS/x86assm/#obj-dump","title":"obj dump","text":"

    \u6e90\u4ee3\u7801\u6587\u4ef6\u540dmytest.c

    gcc -c -g -o mytest mytest.c\nobjdump -s -d main.o > main.o.txt\n

    \u76ee\u6807\u6587\u4ef6\u53cd\u6c47\u7f16\uff0c\u540c\u65f6\u663e\u793a\u6e90\u4ee3\u7801

    gcc -g -c -o main.o main.c\nobjdump -S -d main.o > main.o.txt\n

    \u663e\u793a\u6e90\u4ee3\u7801\u7684\u540c\u65f6\u663e\u793a\u884c\u53f7

    objdump -j .text -ld -C -S main.o > main.o.txt\n

    \u53ef\u6267\u884c\u6587\u4ef6\u53cd\u6c47\u7f16

    gcc -o main main.c\nobjdump -s -d main > main.txt\n

    \u540c\u65f6\u663e\u793a\u6e90\u4ee3\u7801

    gcc -g -o main main.c\nobjdump -S -d main > main.txt\n
    "},{"location":"CS/x86assm/#_1","title":"\u671f\u672b\u8003\u8bd5","text":"
    1. \u662f\u975e\u9898(10\u4e2a\uff0c\u6bcf\u98981\u5206\uff0c\u517110\u5206)
    2. \u586b\u7a7a(15\u4e2a\uff0c\u6bcf\u7a7a2\u5206\uff0c\u517130\u5206)\uff1a
    3. \u7a0b\u5e8f\u586b\u7a7a\u9898(3\u9898\uff0c\u6bcf\u989810\u5206\uff0c\u517130\u5206)

      \u4e00\u822c\u90fd\u4f1a\u7528stack\u538b\u5165\u53c2\u6570 \u4f1a\u7ed9\u51fac\u8bed\u8a00\u7684\u539f\u578b\uff08\uff1f\uff0c\u53c2\u6570\u7684\u538b\u5165\u987a\u5e8f\u4ece\u53f3\u5230\u5de6\uff0ccaller\u6e05\u7406 pascal\uff0c\u4ece\u5de6\u5230\u53f3\uff0ccallee\u6e05\u7406 stdcall\uff0c\u4ece\u53f3\u5230\u5de6\uff0ccaller\u6e05\u7406 \u90fd\u7528ax\u8fd4\u56de\u53c2\u6570 \u4e00\u822c\u4e24\u4e2a\u7a7a\u4e0d\u53ef\u4ee5\u4ea4\u6362\u3002\u3002\u3002 \u5148\u81ea\u5df1\u5199\u4e00\u904d\u518d\u586b \uff08\u4e00\u822c20\u51e0\u884c\u7684\u7a0b\u5e8f\uff09

    4. \u7a0b\u5e8f\u9605\u8bfb(2\u9898\uff0c\u6bcf\u98985\u5206\uff0c\u517110\u5206) \u4f1a\u95ee\u8fd0\u884c\u7ed3\u679c\u548c\u4e2d\u95f4\u7ed3\u679c\uff08#\uff09\uff08\u5982\u679c\u6709\u5faa\u73af\uff0c\u6bcf\u6b21\u5faa\u73af\u5230\u90fd\u8981\u5199\uff0c\u4f46\u662f\u4e0d\u4f1a\u592a\u591a\uff09

    \u4e0d\u4f1a\u6709\u76f4\u63a5\u624b\u5199\u4e00\u6574\u4e2a\u7a0b\u5e8f\u7684\u9898

    \u91cd\u70b9\uff1a \u51fd\u6570\u53c2\u6570\u4f20\u9012\uff0c\u5982\u4f55\u6784\u9020\u4e00\u4e2a\u5806\u6808\u6846\u67b6\uff0cebp\u3002\u3002 \u9700\u8981\u770b\u61c2\u662f\u4e0d\u662f\u9012\u5f52\uff0c \u6709\u4e00\u4e2a\u7a0b\u5e8f\u586b\u7a7a\u4f1a\u51fa\u5355\u6b65\u8c03\u8bd5\uff0c\u8fb9\u89e3\u5bc6\u8fb9\u52a0\u5bc6\u90a3\u4e2a\u3002\u3002 \u4e0d\u4f1a\u8003\u4fdd\u62a4\u6a21\u5f0f\u3002

    "},{"location":"CS/x86assm/#_2","title":"\u590d\u4e60","text":""},{"location":"CS/x86assm/#intel-808680386-cpu","title":"Intel 8086/80386 CPU \u529f\u80fd\u7ed3\u6784","text":""},{"location":"CS/x86assm/#_3","title":"\u5de5\u4f5c\u65b9\u5f0f","text":"
    1. \u4ece\u5b58\u50a8\u5668\u4e2d\u53d6\u4e00\u6761\u6307\u4ee4
    2. \u5206\u6790\u6307\u4ee4\u7684\u64cd\u4f5c\u7801
    3. \u4ece\u5b58\u50a8\u5668\u4e2d\u8bfb\u53d6\u64cd\u4f5c\u6570
    4. \u6267\u884c\u6307\u4ee4
    5. \u5199\u5165\u7ed3\u679c\u96c6
    6. \u56de\u52301

    \u8fd0\u7b97\u5668\u8fdb\u884c\u4fe1\u606f\u5904\u7406\uff0c\u5bc4\u5b58\u5668\u8fdb\u884c\u4fe1\u606f\u5b58\u50a8\uff0c\u63a7\u5236\u5668\u63a7\u5236\u5404\u79cd\u5668\u4ef6\u5de5\u4f5c\uff0c\u603b\u7ebf\u8fde\u63a5\u5404\u79cd\u5668\u4ef6\u3002

    "},{"location":"CS/x86assm/#163280x86-view","title":"16\u4f4d\u548c32\u4f4d\u768480x86\u7684\u533a\u522b - \u64cd\u4f5c\u7cfb\u7edfview","text":""},{"location":"CS/x86assm/#_4","title":"\u903b\u8f91\u5730\u5740\u4e0e\u7269\u7406\u5730\u5740\u8f6c\u6362\uff1a","text":"

    1234h:0058h \u8f6c\u5316\u6210\u7269\u7406\u5730\u5740=12340h+0058h=12398h \u8865\u7801

    "},{"location":"CS/x86assm/#_5","title":"\u6807\u5fd7\u4f4d","text":"

    \u72b6\u6001\u6807\u5fd7\uff1aCF ZF SF OF AF PF \u63a7\u5236\u6807\u5fd7\uff1aDF(direction flags) TF(trace/trap flag) IF(interrupt flag)

    "},{"location":"CS/x86assm/#_6","title":"\u6570\u636e\u5728\u5185\u5b58\u4e2d\u7684\u5b58\u653e\u89c4\u5f8b\uff1a","text":"

    \u5c0f\u7aef\u683c\u5f0f\u3002\u4f4e\u5b57\u8282\u5728\u524d\uff0c\u9ad8\u5b57\u8282\u5728\u540e\u3002 \u8bbeds=1000h, bx=2000h, ax=1234h Mov ds:[bx], ax \u6267\u884c\u540e1000:2001\u6307\u5411\u7684\u5b57\u8282=12h

    "},{"location":"CS/x86assm/#_7","title":"\u5bc4\u5b58\u5668","text":"

    \u603b\u7ed3

    \u5bc4\u5b58\u5668 \u7c7b\u522b \u7528\u9014 AX \u6570\u636e\u5bc4\u5b58\u5668 \u7b97\u672f\u8fd0\u7b97\u4e2d\u7684\u4e3b\u8981\u5bc4\u5b58\u5668\uff0c\u5728\u4e58\u9664\u8fd0\u7b97\u4e2d\u7528\u6765\u5236\u5b9a\u88ab\u9664\u6570\uff0c\u4e5f\u662f\u4e58\u9664\u8fd0\u7b97\u540e\u7ed3\u679c\u7684\u9ed8\u8ba4\u5b58\u50a8\u5355\u5143\u3002\u53e6\u5916I/O\u6307\u4ee4\u5747\u4f7f\u7528\u8be5\u5bc4\u5b58\u5668\u4e0eI/O\u8bbe\u5907\u4f20\u9001\u4fe1\u606f\u3002 BX \u6570\u636e\u5bc4\u5b58\u5668 \u6307\u4ee4\u5bfb\u5740\u65f6\u5e38\u7528\u505a\u57fa\u5740\u5bc4\u5b58\u5668\uff0c\u5b58\u5165\u504f\u79fb\u91cf\u6216\u504f\u79fb\u91cf\u7684\u6784\u6210\u6210\u5206 CX \u6570\u636e\u5bc4\u5b58\u5668 \u5728\u5faa\u73af\u6307\u4ee4\u64cd\u4f5c\u6216\u4e32\u5904\u7406\u6307\u4ee4\u4e2d\u9690\u542b\u8ba1\u6570 DX \u6570\u636e\u5bc4\u5b58\u5668 \u5728\u53cc\u5b57\u8282\u957f\u8fd0\u7b97\u4e2d\u4e0eAX\u6784\u621032\u4f4d\u64cd\u4f5c\u6570\uff0cDX\u4e3a\u9ad816\u4f4d\u3002\u5728\u67d0\u4e9bI/O\u6307\u4ee4\u4e2d\uff0cDX\u88ab\u7528\u6765\u5b58\u653e\u7aef\u53e3\u5730\u5740 SP \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u59cb\u7ec8\u662f\u6808\u9876\u7684\u4f4d\u7f6e\uff0c\u4e0eSS\u5bc4\u5b58\u5668\u4e00\u8d77\u6784\u6210\u6808\u9876\u6570\u636e\u7684\u7269\u7406\u5730\u5740 BP \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u7cfb\u7edf\u9ed8\u8ba4\u5176\u6307\u5411\u5806\u6808\u4e2d\u67d0\u4e00\u5355\u5143\uff0c\u5373\u63d0\u4f9b\u6808\u4e2d\u8be5\u5355\u5143\u7684\u504f\u79fb\u91cf\u3002\u52a0\u6bb5\u524d\u7f00\u540e\uff0cBP\u53ef\u4f5c\u4e3a\u975e\u5806\u6808\u6bb5\u7684\u5730\u5740\u6307\u9488 SI \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u4e0eDS\u8054\u7528\uff0c\u6307\u793a\u6570\u636e\u6bb5\u4e2d\u67d0\u64cd\u4f5c\u7684\u504f\u79fb\u91cf\u3002\u5728\u505a\u4e32\u5904\u7406\u65f6\uff0cSI\u6307\u793a\u6e90\u64cd\u4f5c\u6570\u5730\u5740\uff0c\u5e76\u6709\u81ea\u52a8\u589e\u91cf\u548c\u81ea\u52a8\u51cf\u91cf\u7684\u529f\u80fd\u3002\u53d8\u5740\u5bfb\u5740\u65f6\uff0cSI\u4e0e\u67d0\u4e00\u4f4d\u79fb\u91cf\u5171\u540c\u6784\u6210\u64cd\u4f5c\u6570\u7684\u504f\u79fb\u91cf DI \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u4e0eDS\u8054\u7528\uff0c\u6307\u793a\u6570\u636e\u6bb5\u4e2d\u67d0\u64cd\u4f5c\u6570\u7684\u504f\u79fb\u91cf\uff0c\u6216\u4e0e\u67d0\u4e00\u4f4d\u79fb\u91cf\u5171\u540c\u6784\u6210\u64cd\u4f5c\u6570\u7684\u504f\u79fb\u91cf\uff0c\u4e32\u5904\u7406\u64cd\u4f5c\u65f6\uff0cDI\u6307\u793a\u9644\u52a0\u6bb5\u4e2d\u76ee\u7684\u5730\u5740\uff0c\u5e76\u6709\u81ea\u52a8\u589e\u91cf\u548c\u51cf\u91cf\u7684\u529f\u80fd\u3002 CS \u6bb5\u5bc4\u5b58\u5668 \u5b58\u653e\u5f53\u524d\u7a0b\u5e8f\u7684\u6307\u793a\u4ee3\u7801 DS \u6bb5\u5bc4\u5b58\u5668 \u5b58\u653e\u7a0b\u5e8f\u6240\u8bbe\u8ba1\u7684\u6e90\u6570\u636e\u6216\u7ed3\u679c SS \u6bb5\u5bc4\u5b58\u5668 \u4ee5\u201c\u5148\u5165\u540e\u51fa\u201d\u4e3a\u539f\u5219\u7684\u6570\u636e\u533a ES \u6bb5\u5bc4\u5b58\u5668 \u8f85\u52a9\u6570\u636e\u533a\uff0c\u5b58\u653e\u4e32\u6216\u5176\u5b83\u6570\u636e IP \u63a7\u5236\u5bc4\u5b58\u5668 \u5b83\u59cb\u7ec8\u6307\u5411\u5f53\u524d\u5c06\u8981\u6267\u884c\u6307\u4ee4\u5728\u4ee3\u7801\u6bb5\u4e2d\u7684\u504f\u79fb\u91cf FR \u63a7\u5236\u5bc4\u5b58\u5668 \u63a7\u5236\u6807\u5fd7\u4f4d

    "},{"location":"CS/x86assm/#_8","title":"\u901a\u7528\u5bc4\u5b58\u5668","text":"

    IA-32\u67b6\u6784\u4e2d\u4e00\u5171\u67094\u4e2a32\u4f4d\u5bc4\u5b58\u5668\uff0c\u7528\u4e8e\u4fdd\u5b58\u4e34\u65f6\u6570\u636e\uff0c\u8fd94\u4e2a\u901a\u7528\u5bc4\u5b58\u5668\u53ef\u4ee5\u5f53\u4f5c16\u4f4d\u7528\uff0c\u4e5f\u53ef\u4ee5\u4f5c8\u4f4d\u7528\u3002

    AX BX CX DX\uff1a\u6570\u636e\u5bc4\u5b58\u5668\uff0c\u6bcf\u4e2a\u6570\u636e\u5bc4\u5b58\u5668\u90fd\u53ef\u4ee5\u62c6\u6210\u4e24\u4e2a 8 \u4f4d\u5bc4\u5b58\u5668\u72ec\u7acb\u4f7f\u7528\uff0c\u5982 AX \u53ef\u62c6\u5206\u4e3a AH \u548c AL\uff0cBX \u62c6\u5206\u4e3a BH \u548c BL \u7b49\u3002H \u548c L \u5206\u522b\u8868\u793a\u9ad8 8 \u4f4d\u548c\u4f4e 8 \u4f4d\u3002

    AX(accumulator)\uff1a\u7d2f\u52a0\u5668\u3002\u5728\u4e58\u9664\u6cd5\u8fd0\u7b97\u3001\u4e32\u8fd0\u7b97\u3001 I/O \u6307\u4ee4\u4e2d\u90fd\u4f5c\u4e3a\u4e13\u7528\u5bc4\u5b58\u5668\uff1b BX (base)\uff1a\u57fa\u5740\u5bc4\u5b58\u5668\uff0c\u5e38\u7528\u4e8e\u5b58\u6863\u5185\u5b58\u5730\u5740\u3002

    CX (count)\uff1a\u8ba1\u6570\u5bc4\u5b58\u5668\u3002\u5e38\u7528\u4e8e\u5b58\u653e\u5faa\u73af\u8bed\u53e5\u7684\u5faa\u73af\u6b21\u6570\uff0c\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e2d\u4e5f\u5e38\u7528\u3002

    DX (data)\uff1a\u6570\u636e\u5bc4\u5b58\u5668\u3002\u5e38\u5e38\u548cEAX\u4e00\u8d77\u4f7f\u7528\u3002

    "},{"location":"CS/x86assm/#_9","title":"\u53d8\u5740\u5bc4\u5b58\u5668","text":"

    \u5b58\u653e\u5728\u53d8\u52a8\u7684\u5185\u5b58\u5730\u5740

    ESI(source index): \u6e90\u53d8\u5740\u5bc4\u5b58\u5668\uff0c\u901a\u5e38\u5b58\u653e\u8981\u5904\u7406\u7684\u6570\u636e\u7684\u5185\u5b58\u5730\u5740\u3002

    EDI(destination index)\uff1a\u76ee\u7684\u53d8\u5740\u5bc4\u5b58\u5668\uff0c\u901a\u5e38\u5b58\u653e\u5904\u7406\u540e\u7684\u6570\u636e\u7684\u5185\u5b58\u5730\u5740\u3002

    ESI\u548cEDI\u5e38\u7528\u6765\u914d\u5408\u4f7f\u7528\u5b8c\u6210\u6570\u636e\u7684\u8d4b\u503c\u64cd\u4f5c

    rep movs dword ptr[edi], dword ptr[esi];\n

    \u8fd9\u53e5\u7684\u610f\u601d\u662f\u628aESI\u6307\u5411\u7684\u5185\u5b58\u5730\u5740\u4e2d\u7684\u5185\u5bb9\u590d\u5236\u5230EDI\u6240\u6307\u5411\u7684\u5185\u5b58\u4e2d\uff0c\u6570\u636e\u957f\u5ea6\u5728ECX\u4e2d\u6307\u5b9a\u3002

    "},{"location":"CS/x86assm/#_10","title":"\u6307\u9488\u5bc4\u5b58\u5668","text":"

    ESP\uff08stack pointer\uff09\uff1a\u5806\u6808\u6307\u9488\u5bc4\u5b58\u5668\u3002SS\uff1aSP\u6307\u5411\u5806\u6808\u7684\u6808\u9876\uff0c\u56e0\u6b64\u867d\u7136\u662f\u901a\u7528\u5bc4\u5b58\u5668\uff0c\u4f46\u4e0d\u5e94\u968f\u4fbf\u6539\u53d8SP\u7684\u503c\u3002\u4e0d\u53ef\u4ee5\u4f5c\u4e3a\u901a\u7528\u5bc4\u5b58\u5668\u4f7f\u7528\uff0cESP\u5b58\u653e\u5f53\u524d\u5806\u6808\u6808\u9876\u7684\u5730\u5740\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0cESP\u548cEBP\u8054\u5408\u4f7f\u7528\u6765\u8bbf\u95ee\u51fd\u6570\u4e2d\u7684\u53c2\u6570\u548c\u5c40\u90e8\u53d8\u91cf\u3002 EBP\uff08base pointer\uff09\uff1a\u57fa\u5740\u6307\u9488\u5bc4\u5b58\u5668\u3002\u53ef\u4ee5\u4f5c\u4e3a\u901a\u7528\u5bc4\u5b58\u5668\u7528\u4e8e\u5b58\u653e\u64cd\u4f5c\u6570\uff0c\u5e38\u7528\u6765\u4ee3\u66ff\u5806\u6808\u6307\u9488\u8bbf\u95ee\u5806\u6808\u7684\u6570\u636e\u3002 EIP\uff1a\u6307\u4ee4\u6307\u9488\u5bc4\u5b58\u5668\uff0c\u603b\u662f\u6307\u5411\u4e0b\u4e00\u6761\u8981\u6267\u884c\u7684\u6307\u4ee4\u7684\u5730\u5740\u3002 \u5e38\u89c1\u7684\u8bbf\u95ee\u5806\u6808\u6307\u4ee4\uff1a

    push ebp\nmov ebp, esp\nsub esp, 78\npush esi\npush edi\ncmp dword ptr [ebp+8], 0\n

    ss\u6808\u6bb5\u5bc4\u5b58\u5668 sp\u6808\u9876\u6307\u9488\u5bc4\u5b58\u5668 bp\u9ed8\u8ba4\u7684\u6808\u5bfb\u5740\u5bc4\u5b58\u5668

    "},{"location":"CS/x86assm/#_11","title":"\u6807\u5fd7\u5bc4\u5b58\u5668","text":"

    \u6807\u5fd7\u5bc4\u5b58\u5668EFLAGS\u4e00\u5171\u670932\u4f4d\uff0c\u5728\u8fd932\u4f4d\u4e2d\u5927\u90e8\u5206\u662f\u4fdd\u7559\u7ed9\u7f16\u5199\u64cd\u4f5c\u7cfb\u7edf\u7684\u4eba\u7528\u7684\u3002

    IP (instruction pointer)\uff1a\u6307\u4ee4\u6307\u9488\u5bc4\u5b58\u5668\u3002\u4ee3\u7801\u6bb5\u5bc4\u5b58\u5668 CS \u548c\u6307\u4ee4\u6307\u9488\u5bc4\u5b58\u5668 IP \u662f 8086CPU \u4e2d\u6700\u5173\u952e\u7684\u4e24\u4e2a\u5bc4\u5b58\u5668\u3002\u5b83\u4eec\u5206\u522b\u7528\u6765\u63d0\u4f9b\u5f53\u524d\u6307\u4ee4\u7684\u6bb5\u5730\u5740\u548c\u504f\u79fb\u5730\u5740\u3002\u5373\u4efb\u610f\u65f6\u523b\uff0c8086CPU \u5c06 CS:IP \u6307\u5411\u7684\u5185\u5bb9\u5f53\u505a\u547d\u4ee4\u6267\u884c\u3002\u6bcf\u6761\u6307\u4ee4\u8fdb\u5165\u6307\u4ee4\u7f13\u51b2\u5668\u540e\u3001\u6267\u884c\u524d\uff0cIP += \u6240\u8bfb\u53d6\u6307\u4ee4\u7684\u957f\u5ea6\uff0c\u4ece\u800c\u6307\u5411\u4e0b\u4e00\u6761\u6307\u4ee4\u3002\u7528\u6237\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee IP \u5bc4\u5b58\u5668\u3002

    FL (flags)\uff1a\u6807\u5fd7\u5bc4\u5b58\u5668\u3002\u4e0e\u5176\u4ed6\u5bc4\u5b58\u5668\u4e00\u6837\uff0c\u6807\u5fd7\u5bc4\u5b58\u5668\u4e5f\u6709 16 \u4f4d\uff0c\u4f46\u662f\u6807\u5fd7\u5bc4\u5b58\u5668\u53ea\u7528\u5230\u5176\u4e2d\u7684 9 \u4f4d\u3002\u8fd9 9 \u4f4d\u5305\u62ec 6 \u4e2a\u72b6\u6001\u6807\u5fd7\u548c 3 \u4e2a\u63a7\u5236\u6807\u5fd7\uff0c\u53c2\u89c1\u4e0b\u9762\u7684\u201c\u6807\u5fd7\u4f4d\u201d\u3002

    OF\uff08Overflow Flag\uff09:\u6ea2\u51fa\u6807\u5fd7\uff0c\u6ea2\u51fa\u65f6\u4e3a1\uff0c\u5426\u5219\u7f6e0\u3002\u4e24\u4e2a\u6b63\u6570\u76f8\u52a0\u53d8\u8d1f\uff0c\u6216\u4e24\u4e2a\u8d1f\u6570\u76f8\u52a0\u53d8\u6b63\u4f1a\u6ea2\u51fa\u3002#

    DF \uff08Direction Flag\uff09:\u65b9\u5411\u6807\u5fd7\uff0c\u5728\u4e32\u5904\u7406\u6307\u4ee4\u4e2d\u63a7\u5236\u4fe1\u606f\u7684\u65b9\u5411\u30020:\u6b63\u65b9\u5411\uff0c1\uff1a\u53cd\u65b9\u5411\u3002cld\uff0cstd\u3002#

    IF (Interrupt Flag) :\u4e2d\u65ad\u6807\u5fd7\u3002\u7981\u6b62\u4e2d\u65ad0\uff0c\u5141\u8bb8\u4e2d\u65ad1\u3002cli\uff0csti\u3002#

    AF (Auxiliary carry Flag) :\u8f85\u52a9\u8fdb\u4f4d\u6807\u5fd7\uff0c\u6709\u8fdb\u4f4d\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002

    ZF (Zero Flag) :\u96f6\u6807\u5fd7\uff0c\u8fd0\u7b97\u7ed3\u6784\u4e3a0\u65f6ZF\u4f4d\u4f4d\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002

    SF (Sign Flag):\u7b26\u53f7\u6807\u5fd7\uff0c\u7ed3\u679c\u4e3a\u8d1f\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002#

    CF (Carry Flag): \u8fdb\u4f4d\u6807\u5fd7\uff0c\u8fdb\u4f4d\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002\u914d\u5957\u7684clc\uff0cstc\u4e24\u6761\u8bbe\u7f6e\u6307\u4ee4\uff1a\u6e05\u9664\u548c\u7f6e1\u3002#

    PF (Parity Flag): \u5947\u5076\u6807\u5fd7\u3002\u7ed3\u679c\u64cd\u4f5c\u6570\u4e2d1\u7684\u4e2a\u6570\u4e3a\u5076\u6570\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002

    TF\uff1a\u5355\u6b65\u8c03\u8bd5\u8981\u7528\u3002#

    EFLAGS\u662f\u5b9e\u73b0\u6761\u4ef6\u5224\u65ad\u548c\u903b\u8f91\u5224\u65ad\u7684\u4e00\u79cd\u673a\u5236\uff0c\u5728\u6c47\u7f16\u8bed\u8a00\u4e2d\u4e00\u822c\u4e0d\u76f4\u63a5\u8bbf\u95eeEFLAGS\u5bc4\u5b58\u5668\uff0c\u800c\u662f\u901a\u8fc7\u6307\u4ee4\u7684\u64cd\u4f5c\u9690\u542b\u8bbf\u95eeEFLAGS\u5bc4\u5b58\u5668\u3002

    cmp dword ptr [ebp+8], 0. // \u5f71\u54cd\u6807\u5fd7\u4f4dCF\uff0cZF\uff0cSF\uff0cOF\uff0cAF\u548cPF\nJz 99495898 //\u5982\u679cZF\u7b49\u4e8e1\uff0c\u5219\u8df3\u8f6c\u523000405898 
    "},{"location":"CS/x86assm/#_12","title":"\u6307\u4ee4","text":"

    \u603b\u7ed3

    \u6307\u4ee4 \u4f5c\u7528 \u53c2\u6570 \u6539\u53d8\u6807\u5fd7\u4f4d mov \u8d4b\u503c \u88ab\u8d4b\u503c\u5bc4\u5b58\u5668\uff0c\u3010\u5bc4\u5b58\u5668\uff0c\u5185\u5b58\uff0c\u503c\u3011 no xchg \u6570\u636e\u4ea4\u6362 \u3010\u5bc4\u5b58\u5668\uff0c\u5185\u5b58\u3011\uff0c\u3010\u5bc4\u5b58\u5668\uff0c\u5185\u5b58\u3011 no push \u8fdb\u6808 \u6e90\u64cd\u4f5c\u6570\u3010\u5bc4\u5b58\u5668\u3011 pop \u51fa\u6808 \u76ee\u7684\u64cd\u4f5c\u6570\u3010\u5bc4\u5b58\u5668\u3011 pushf \u6807\u5fd7\u4f4d\u8fdb\u6808 \u65e0 popf \u6807\u5fd7\u4f4d\u51fa\u6808 \u65e0 lea Load effect address\uff0c\u5bfb\u5740\uff0c\u53d6\u504f\u79fb\u5730\u5740 lds \u5f53\u6307\u4ee4\u6307\u5b9a\u7684\u662f16\u4f4d\u5bc4\u5b58\u5668\u65f6\uff0c\u628a\u6e90\u64cd\u4f5c\u6570\u5b58\u50a8\u5355\u5143\u4e2d\u5b58\u653e\u7684\u5341\u516d\u4f4d\u504f\u79fb\u5730\u5740\u53d6\u51fa\u5b58\u653e\u5728\u5bc4\u5b58\u5668\u4e2d\uff0c\u7136\u540e\u628a\u6e90\u64cd\u4f5c\u6570+2\u7684\u5341\u516d\u4f4d\u6570\u88c5\u5165\u6307\u4ee4\u6307\u5b9a\u7684\u6bb5\u5bc4\u5b58\u5668\u3002\u5f53\u6307\u4ee4\u6307\u5b9a\u7684\u662f32\u4f4d\u5bc4\u5b58\u5668\u65f6 \u628a\u6e90\u64cd\u4f5c\u6570\u5b58\u50a8\u5355\u5143\u4e2d\u5b58\u653e\u768432\u4f4d\u504f\u79fb\u5730\u5740\u88c5\u5165\u5bc4\u5b58\u5668 \u7136\u540e\u628a \u6e90\u64cd\u4f5c\u6570+4 \u768416\u4f4d\u6570\u88c5\u5165\u6bb5\u5bc4\u5b58\u5668\u3002mem\u6307\u5411\u7684\u5730\u5740,\u9ad8\u4f4d\u5b58\u653e\u5728DS\u4e2d,\u4f4e\u4f4d\u5b58\u653e\u5728reg\u4e2d. LDS reg,mem les \u628a\u5185\u5b58\u4e2d\u6307\u5b9a\u4f4d\u7f6e\u7684\u53cc\u5b57\u64cd\u4f5c\u6570\u7684\u4f4e\u4f4d\u5b57\u88c5\u5165\u6307\u4ee4\u4e2d\u6307\u5b9a\u7684\u5bc4\u5b58\u5668\u3001\u9ad8\u4f4d\u5b57\u88c5\u5165ES\u5bc4\u5b58\u5668\u3002 cbw 8\u4f4d\u6570\u6269\u5c55\u4e3a16\u4f4d\u6570\uff0c\u6709\u7b26\u53f7\u6269\u5145 no cwd \u5b57(16\u4f4d)\u6269\u5c55\u4e3a\u53cc\u5b57(32\u4f4d)\uff0c\u6709\u7b26\u53f7\uff1f no add \u52a0 OPRDS\uff0cOPRDD adc \u5e26\u8fdb\u4f4d\u52a0\uff08\u7ed3\u679c\u542b\u6807\u5fd7\u4f4dCF\u7684\u503c\uff0c=OPRDS\uff0bOPRDD\uff0bCF\uff09 OPRDS\uff0cOPRDD sub \u51cf OPRDD\uff0cOPRDS sbb \u5e26\u8fdb\u4f4d\u51cf\uff08\u7ed3\u679c\u542b\u6807\u5fd7\u4f4dCF\u7684\u503c\uff0c=OPRDD\uff0dOPRDS\uff0dCF\uff09 OPRDD\uff0cOPRDS inc \u81ea\u589e1 \u5bc4\u5b58\u5668 dec \u81ea\u51cf1 \u5bc4\u5b58\u5668 mul 32\u4f4d\uff1a\u88ab\u4e58\u6570\u9ed8\u8ba4\u4e3aEAX\uff0c\u90a3\u4e48\u4e58\u79ef\u5c06\u5b58\u653e\u5728EDX\uff1aEAX\u4e2d 32\u4f4d\u4e58\u6570 16\u4f4d\uff1a\u88ab\u4e58\u6570\u9ed8\u8ba4\u4e3aAX\u90a3\u4e48\u4e58\u79ef\u5c06\u653e\u5728DX\uff1aAX\u4e2di 16\u4f4d\u4e58\u6570 8\u4f4d\uff1a\u88ab\u4e58\u6570\u9ed8\u8ba4\u4e3aAL\uff0c\u90a3\u4e48\u4e58\u79ef\u5c06\u653e\u5728AX 8\u4f4d\u4e58\u6570 div 32\u4f4d\uff1a\u88ab\u9664\u6570\u5c06\u662fEDX\uff1aEAX\uff0c \u6700\u7ec8\u7684\u5546\u5c06\u5b58\u653e\u5728EAX\uff0c \u4f59\u6570\u5c06\u5b58\u653e\u5728EDX\u4e2d 32\u4f4d\u4e58\u6570 16\u4f4d\uff1a\u88ab\u9664\u6570\u4e3aEAX\uff0c\u6700\u7ec8\u5f97\u5230\u7684\u5546\u653e\u5728AX\uff0c\u4f59\u6570\u653e\u5728EAX\u7684\u9ad816\u4f4d 16\u4f4d\u4e58\u6570 8\u4f4d\uff1a\u88ab\u9664\u6570\u662f16\u4f4d\uff0c\u6700\u7ec8\u5f97\u5230\u7684\u5546\u5c06\u653e\u5728AL\u4e2d\uff0c\u4f59\u6570\u653e\u5728AH\u4e2d 8\u4f4d\u4e58\u6570 imul \u65e0\u7b26\u53f7\u4e58 idiv \u65e0\u7b26\u53f7\u9664 xlat \u6362\u7801\u6307\u4ee4\uff0c\u4ee5bx\u4e3a\u9996\u5730\u5740\u7684\uff0c\u504f\u79fb\u5730\u5740\u4e3aal\u7684\u5185\u5bb9\u9001\u7ed9al\u3002 in \u7aef\u53e3\u8bfb\u5199\u6307\u4ee4 IN AL,21H\uff1b\u8868\u793a\u4ece21H\u7aef\u53e3\u8bfb\u53d6\u4e00\u5b57\u8282\u6570\u636e\u5230AL out \u7aef\u53e3\u8bfb\u5199\u6307\u4ee4 and \u6309\u4f4d\u4e0e or \u6309\u4f4d\u6216 xor \u6309\u4f4d\u5f02\u6216 not \u64cd\u4f5c\u6570\u6309\u4f4d\u53d6\u53cd neg \u64cd\u4f5c\u6570\u6309\u4f4d\u53d6\u53cd\u52a0\u4e00 test \u5bf9\u4e24\u4e2a\u64cd\u4f5c\u6570\u8fdb\u884c\u6309\u4f4d\u4e0e\u64cd\u4f5c\u3002\u4e0eand\u4e0d\u540c\uff0c\u4e0d\u5f71\u54cd\u76ee\u6807\u64cd\u4f5c\u6570\u7684\u503c\u3002 shl \u903b\u8f91\u5de6\u79fb\uff0c\u5c06\u4e00\u4e2a\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\u6216\u5355\u5143\u4e2d\u7684\u6570\u636e\u5411\u5de6\u79fb\u4f4d\uff0c\u5c06\u6700\u540e\u79fb\u51fa\u7684\u4e00\u4f4d\u5199\u5165cf\u4e2d\u3002\u6700\u4f4e\u4f4d\u75280\u8865\u5145\u3002 shr \u903b\u8f91\u53f3\u79fb\uff0c\u5c06\u4e00\u4e2a\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\u6216\u5355\u5143\u4e2d\u7684\u6570\u636e\u5411\u5de6\u79fb\u4f4d\uff0c\u5c06\u6700\u540e\u79fb\u51fa\u7684\u4e00\u4f4d\u5199\u5165cf\u4e2d\u3002\u6700\u9ad8\u4f4d\u75280\u8865\u5145\u3002 sal \u7b97\u672f\u5de6\u79fb\uff0c\u4e0eshl\u4e00\u6837\uff0c\u88650 sar \u7b97\u672f\u53f3\u79fb\uff0c\u4e0eshr\u4e0d\u4e00\u6837\uff0c\u7b97\u672f\u53f3\u79fb\u8865\u6700\u9ad8\u4f4d rol \u5faa\u73af\u5de6\u79fb ror \u5faa\u73af\u53f3\u79fb rcl \u5e26\u8fdb\u4f4d\u5faa\u73af\u5de6\u79fb\uff0c\u5de6\u79fb\u7684\u65f6\u5019\u79fb\u51fa\u53bb\u7684\u4f1a\u653e\u5728cf\uff1f rcr \u5e26\u8fdb\u4f4d\u5faa\u73af\u53f3\u79fb cmp \u6bd4\u8f83 ja jump if above jb Jump if below jae Jump if above or equal jbe Jump if below or equal jg jump if greater\uff0c\u6709\u7b26\u53f7\u5927\u4e8e\u8df3\u8f6c jl jump less\uff0c\u6709\u7b26\u53f7\u5c0f\u4e8e\u8df3\u8f6c jge jump if greater or equal jle Jump if less or equal jc jump if with carry, CF = 1 jnc jump if not with carry, CF = 0 je = jz jump if equal, ZF = 1 jne = jnz jump if not equal, ZF = 0 jz jump if zero, ZF = 1 jnz jump if not zero, ZF = 0 jcxz jump if cx equals zero js SF = 1 jns SF = 0 jo Jump if overflow, OF = 1 jno jump if not overflow, OF = 0 loop \u5faa\u73af \u4ee3\u7801\u6bb5\uff08\uff1f\uff09\u540d clc clear carry flag\uff0c\u5c06cf\u4f4d\u6e05\u96f6 stc set carry flag\uff0cCF\u7f6e1 cli clear interrupt endable flag\uff0cIF\u6e05\u96f6\uff0c\u5173\u95ed\u4e2d\u65ad sti set interrupt endable flag\uff0cIF\u7f6e\u4f4d1\uff0c\u6253\u5f00\u4e2d\u65ad CMC complement carry flag\uff0cCF\u53d6\u53cd CLD clear direction flag\uff0cDF\u6e05\u96f6 STD set interrupt endable flag\uff0cDF\u7f6e1 call \u8fd1\u8c03\u7528 ret \u8fd1\u8fd4\u56de call far ptr \u8fdc\u8c03\u7528\u3002\u4e09\u4e2apush\u4e00\u4e2ajmp\u3002push f\uff0cpush cs\uff0cpush ip\uff0cjump retf \u8fdc\u8fd4\u56de\u3002\u4e09\u4e2apop\u3002\u6307\u4ee4\u2f64\u6808\u4e2d\u7684\u6570\u636e\uff0c\u4fee\u6539CS\u548cIP\u7684\u5185\u5bb9\uff0c\u4ece\u2f7d\u5b9e\u73b0\u8fdc\u8f6c\u79fb int \u4e2d\u65ad\u6307\u4ee4 iret \u4e2d\u65ad\u8fd4\u56de jmp short \u6bb5\u5185\u77ed\u8f6c\u79fb\uff0c\u77ed\u662f\u6307\u8981\u8df3\u2f84\u7684\u2f6c\u6807\u5730\u5740\u4e0e\u5f53\u524d\u5730\u5740\u524d\u540e\u76f8\u5dee\u4e0d\u8d85\u8fc7128\u5b57\u8282 jmp near ptr \u6bb5\u5185\u8fd1\u8f6c\u79fb\u3002\u8fd1\u662f\u6307\u8df3\u8f6c\u7684\u2f6c\u6807\u5730\u5740\u4e0e\u5f53\u524d\u5730\u5740\u5728\u2f64\u2f00\u4e2a\u6bb5\u5185\uff0c\u5373CS\u7684\u503c\u4e0d\u53d8\uff0c\u53ea\u6539\u53d8EIP\u7684\u503c jmp far ptr \u6bb5\u95f4\u8f6c\u79fb\uff0c\u8fdc\u6307\u8df3\u5230\u53e6\u2f00\u4e2a\u4ee3\u7801\u6bb5\u53bb\u6267\u2f8f\uff0cCS/EIP\u90fd\u8981\u6539\u53d8 Jmp dword ptr \u6bb5\u95f4\u8f6c\u79fb\uff0c\u4ee5\u5185\u5b58\u5730\u5740\u5355\u5143\u5904\u7684\u53cc\u5b57\u6765\u4fee\u6539\u6307\u4ee4\uff0c\u2fbc\u5730\u5740\u5185\u5bb9\u4fee\u6539CS\uff0c\u4f4e\u5730\u5740\u5185\u5bb9 \u4fee\u6539IP\uff0c\u5185\u5b58\u5730\u5740\u53ef\u4ee5\u4ee5\u4efb\u4f55\u5408\u6cd5\u7684\u2f45\u5f0f\u7ed9\u51fa repe/renpe scasb \u5b57\u7b26\u4e32\u626b\u63cf\u6307\u4ee4\u3002cmp al, es:[di] di++; \u5f53DF=1\u65f6\uff0c\u4e3adi-- repne:\u5f53ECX!=0\u5e76\u4e14ZF==0\u65f6 \u91cd\u590d repe: cx != 0\u4e14zf != 0\u91cd\u590d repe/renpe cmpsb \u5b57\u7b26\u4e32\u6bd4\u8f83\u6307\u4ee4\u3002\u2f50\u8f83byte ptr ds:[si]\u4e0ebyte ptr es:[di] \u5f53DF=0\u65f6\uff0cSI++\uff0cDI++ \u5f53DF=1\u65f6\uff0cSI--\uff0cDI-- repne:\u5f53ECX!=0\u5e76\u4e14ZF==0\u65f6 \u91cd\u590d repe: cx != 0\u4e14zf != 0\u91cd\u590d rep movsb \u5b57\u7b26\u4e32\u79fb\u52a8\u6307\u4ee4\u3002\u5176\u4e2drep\u8868\u793arepeat\uff0cs\u8868\u793astring\uff0cb\u8868\u793abyte \u5728\u6267\u2f8f\u6b64\u6307\u4ee4\u524d\u8981\u505a\u4ee5\u4e0b\u51c6\u5907\u2f2f\u4f5c\uff1a \u2460ds:si lodsb \u5757\u88c5\u5165\u6307\u4ee4\uff0c\u628aSI\u6307\u5411\u7684\u5b58\u50a8\u5355\u5143\u8bfb\u5165\u7d2f\u52a0\u5668\uff0clodsb\u5c31\u8bfb\u5165ax\uff0clodsw\u5c31\u8bfb\u5165ax\uff0c\u7136\u540esi\u81ea\u52a8\u589e\u52a0\u6216\u51cf\u5c0f1\u62162 stosb/stosw/stosd SI\u6307\u5411\u7684\ud83d\udd17,\u5176\u4e2dLODSB\u662f\u8bfb\u5165AL, LODSW\u662f\u8bfb\u5165AX\u4e2d, \u7136\u540eSI\u81ea\u52a8\u589e\u52a0\u6216\u51cf\u5c0f1\u62162\u4f4d.\u5f53\u65b9\u5411\u6807\u5fd7\u4f4dDF=0\u65f6\uff0c\u5219SI\u81ea\u52a8\u589e\u52a0\uff1bDF=1\u65f6\uff0cSI\u81ea\u52a8\u51cf\u5c0f\u3002 rep stosb lodsb"},{"location":"CS/x86assm/#_13","title":"\u6570\u636e\u4f20\u9001\u6307\u4ee4","text":"

    \u6570\u636e\u4f20\u9001\u6307\u4ee4\u662f\u4e3a\u4e86\u5b9e\u73b0CPU\u548c\u5185\u5b58\uff0c\u8f93\u5165\u548c\u8f93\u51fa\u7aef\u53e3\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u9001\u3002

    mov

    mov eax, 56 // \u5c0656H\u4f20\u9001\u5230eax\u5bc4\u5b58\u5668\nmov esi, dword ptr [eax * 2 + 1]  // \u5c06\u5185\u5b58\u5730\u5740\u4e3aeax*2+1\u76844\u5b57\u8282\u6570\u636e\u4f20\u9001\u5230esi\u5bc4\u5b58\u5668\nmov ah, byte ptr [esi * 2 + eax]  // \u5c06\u5185\u5b58\u5730\u5740\u4e3aesi*+eax\u5904\u76848\u4f4d\u6570\u636e\u4f20\u9001\u5230AH\u5bc4\u5b58\u5668\n

    xchg

    \u5bc4\u5b58\u5668\u548c\u5185\u5b58\u7684\u6570\u636e\u4ea4\u6362\uff0c\u4ea4\u6362\u7684\u6570\u636e\u53ef\u4ee5\u662f8\u5b57\u8282\u300116\u5b57\u8282\u621632\u5b57\u8282\uff0c\u5fc5\u987b\u683c\u5f0f\u76f8\u540c

    xchg eax, edx; // \u5c06edx\u5bc4\u5b58\u5668\u7684\u503c\u548ceax\u5bc4\u5b58\u5668\u7684\u503c\u4ea4\u6362\nxchg [esp-55], edi; // \u5c06edi\u5bc4\u5b58\u5668\u7684\u503c\u548c\u5806\u6808\u5730\u5740\u4e3a[esp-55]\u5904\u7684\u503c\u4ea4\u6362\n

    push pop

    push\u548cpop\uff1a\u79f0\u4e3a\u538b\u5165\u5806\u6808\u6307\u4ee4\u548c\u5f39\u51fa\u5806\u6808\u6307\u4ee4\uff0c\u683c\u5f0f\u662fpush src(\u6e90\u64cd\u4f5c\u6570)\u548cpop dst(\u76ee\u7684\u64cd\u4f5c\u6570)\uff0cpush\u6307\u4ee4\u548cpop\u6307\u4ee4\u9700\u8981\u5339\u914d\u51fa\u73b0\uff0c\u5426\u5219\u5806\u6808\u4f1a\u4e0d\u5e73\u8861\u3002push\u6307\u4ee4\u5c06\u539f\u64cd\u4f5c\u6570src\u538b\u5165\u5806\u6808\uff0c\u540c\u65f6esp-4\uff08\u6808\u9876\u6307\u9488\u51cf\u4e00\u4e2a4\u4f4d\uff09\uff0c\u800cpop\u53cd\u4e4b\uff0c\u4ece\u5806\u6808\u7684\u9876\u90e8\u5f39\u51fa4\u5b57\u8282\u7684\u6570\u503c\u7136\u540e\u653e\u5165dst\u3002\u572832\u4f4d\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0cpush\u548cpop\u7684\u64cd\u4f5c\u662f\u4ee54\u5b57\u8282\u4e3a\u5355\u4f4d\u7684\uff0cpush\u548cpop\u6307\u4ee4\u5e38\u7528\u4e8e\u5411\u51fd\u6570\u4f20\u53c2\u3002

    push eax // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u4ee54\u5b57\u8282\u538b\u5165\u5806\u6808\uff0c\u540c\u65f6esp-4\npush dword ptr [12FF8589] // \u5c06\u5806\u6808\u9876\u90e8\u76844\u5b57\u8282\u5f39\u51fa\u5230\u5185\u5b58\u5730\u5740\u4e3a12FF8589\u6240\u6307\u5730\u65b9\uff0c\u540c\u65f6esp+4\n-----------------------------------------------------------------------------\npop dword ptr [12FF8589] // \u5c06\u5806\u6808\u9876\u90e8\u76844\u5b57\u8282\u5f39\u51fa\u5230\u5185\u5b58\u5730\u5740\u4e3a12FF8589\u6240\u6307\u7684\u5730\u65b9\uff0c\u540c\u65f6esp+4\npop eax // \u5c06\u5806\u6808\u9876\u90e8\u76844\u5b57\u8282\u5f39\u51fa\u5230eax\u5bc4\u5b58\u5668\uff0c\u540c\u65f6esp+4\n
    "},{"location":"CS/x86assm/#_14","title":"\u5730\u5740\u4f20\u9001\u6307\u4ee4","text":"

    x86\u67093\u6761\u5730\u5740\u4f20\u9001\u6307\u4ee4\uff0c\u5206\u522b\u662fLEA\uff0cLDS\u548cLES\u3002\u5176\u5b9eLDS\u548cLES\u6307\u4ee4\u548c\u6bb5\u5bc4\u5b58\u5668\u6709\u5173\uff0c\u572832\u4f4d\u7684windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4e00\u822c\u7684\u7a0b\u5e8f\u5458\u90fd\u4e0d\u9700\u8981\u7ba1\u7406\u6bb5\u5bc4\u5b58\u5668\uff0c\u6240\u4ee5\u76f8\u5bf9\u800c\u8a00\uff0cLDS\u548cLES\u5bc4\u5b58\u5668\u4f7f\u7528\u5f97\u6bd4\u8f83\u5c11\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u5e38\u89c1\u7684\u53ea\u6709LEA\u6307\u4ee4\u3002

    LEA

    \u79f0\u4e3a\u5730\u5740\u4f20\u9001\u6307\u4ee4\uff0c\u683c\u5f0f\u662f\u201cLEA DST, ADDR\u201d\u3002LEA\u5c06ADDR\u5730\u5740\u52a0\u8f7d\u5230DST\uff0c\u5176\u4e2dADDR\u53ef\u4ee5\u662f\u5185\u5b58\uff0c\u4e5f\u53ef\u4ee5\u662f\u5bc4\u5b58\u5668\uff0c\u800cDST\u5fc5\u987b\u662f\u4e00\u4e2a\u901a\u7528\u5bc4\u5b58\u5668\u3002

    lea eax, [12345678]; // \u6307\u4ee4\u6267\u884c\u540eeax\u5bc4\u5b58\u5668\u7684\u503c\u4e3a12345678H\nmov eax, [12345678]; // \u800cmov eax, [12345678] \u6307\u4ee4\u6267\u884c\u540eeax\u5bc4\u5b58\u5668\u7684\u503c\u4e3a\u5185\u5b58\u5730\u574012345678\u6307\u5411\u7684\u90a3\u4e2a\u6570\u503c\n// LEA\u6307\u4ee4\u53ef\u7528\u4e8e\u7b97\u6cd5\u8fd0\u7b97\nlea ecx, [ecx + eax*4];  // ecx = ecx + eax * 4\n// \u76f8\u5f53\u4e8e\u8ba1\u7b97\u51faecx+eax*4\u7684\u6570\u503c\uff0c\u5728[]\u91cc\u662f\u4e00\u4e2a\u5730\u5740\uff0clea\u53d6\u5730\u5740\u540e\u5c31\u53d6\u5230\u4e86\u8fd9\u4e2a\u6570\u503c\n
    "},{"location":"CS/x86assm/#_15","title":"\u7b97\u6570\u8fd0\u7b97\u6307\u4ee4","text":"

    80x86\u63d0\u4f9b\u4e868\u6761\u52a0\u51cf\u6cd5\u6307\u4ee4\uff0c4\u6761\u4e58\u9664\u6cd5\u6307\u4ee4\u3002

    ADD\uff1a\u52a0\u6cd5\u6307\u4ee4

    add eax, esi; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u52a0\u4e0aesi\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728eax\u7684\u5bc4\u5b58\u5668\u4e2d\nadd ebx, dword ptr[12345678] // \u5c06ebx\u5bc4\u5b58\u5668\u7684\u503c\u52a0\u4e0a\u5185\u5b58\u5730\u5740\u4e3a12345678\u6240\u5728\u76844\u5b57\u8282\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728ebx\u5bc4\u5b58\u5668\u4e2d\n// \u4e0d\u540c\u7684\u5e73\u53f0\u548c\u7f16\u8bd1\u5668\u4e2d\uff0cdword\u5360\u7528\u7684\u5b57\u8282\u6570\u4e0d\u540c\uff0c\u572832\u4f4d\u7684windows\u4e2d\u4e00\u4e2aword\u536016\u5b57\u8282\uff0cdword\u536032\u5b57\u8282\n// 64\u4f4d\u4e2d\u4e00\u4e2aword\u536032\u5b57\u8282\uff0cdword\u536064\u5b57\u8282\n

    sub \u51cf\u6cd5\u6307\u4ee4

    sub ecx, 4H; // \u5c06ecx\u5bc4\u5b58\u5668\u7684\u503c\u51cf\u53bb4H\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\nsub byte ptr[eax], ch; // \u5c06\u5185\u5b58\u5730\u5740\u4e3aeax\u6240\u6307\u5411\u7684\u6570\u636e\u7ed3\u6784\u6309\u5b57\u8282\u4e3a\u5355\u4f4d\u548cch\u5bc4\u5b58\u5668\u76f8\u51cf\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u6309\u5b57\u8282\u4e3a\u5355\u4f4d\u4fdd\u5b58\u5728eax\u6240\u6307\u5411\u7684\u4f4d\u7f6e\n

    inc\u52a01\u6307\u4ee4

    inc eax; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u52a01\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5b58\u653e\u5728\u539f\u6765\u7684\u5730\u65b9\n

    dec\u51cf1\u6307\u4ee4

    dec edx; // \u5c06dec\u5bc4\u5b58\u5668\u7684\u503c\u51cf1\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5b58\u653e\u5728\u539f\u6765\u7684\u5730\u65b9\n

    cmp\u6bd4\u8f83\u6307\u4ee4

    \u79f0\u6bd4\u8f83\u6307\u4ee4\u683c\u5f0f\u662f\u201dcmp oper1, oper2\u201d

    cmp\u6307\u4ee4\u5c06oper1\u51cf\u53bboper2\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4e0d\u4fdd\u5b58\uff0c\u53ea\u662f\u76f8\u5e94\u5730\u8bbe\u7f6e\u5bc4\u5b58\u5668eflags\u7684cf\uff0cpf\uff0czf\uff0caf\uff0csf\u548cof\u3002\u4e5f\u5c31\u662f\u8bf4\u53ef\u4ee5\u901a\u8fc7\u6d4b\u8bd5\u5bc4\u5b58\u5668eflags\u76f8\u5173\u7684\u6807\u5fd7\u503c\u5f97\u77e5cmp\u6267\u884c\u540e\u7684\u7ed3\u679c

    cmp eax, 56H; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u51cf\u53bb56H\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4e0d\u4fdd\u5b58\uff0c\u5e76\u4e14\u8bbe\u7f6e\u5bc4\u5b58\u5668eflags\u76f8\u5173\u7684\u6807\u5fd7\u4f4d\n

    neg

    neg\uff1a\u53d6\u8865\u6307\u4ee4\uff0c\u683c\u5f0f\u662fneg oper

    neg\u6307\u4ee4\u5c06oper\u64cd\u4f5c\u6570\u53d6\u53cd\uff0c\u7b80\u800c\u8a00\u4e4b\u5c31\u662f\u5c060\u51cf\u53bboper\u64cd\u4f5c\u6570\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5b58\u5728oper\u81ea\u8eab\u4e2d\u3002

    neg eax; \n

    mul imul

    \u65e0\u7b26\u53f7\u4e58\u6cd5\u6307\u4ee4\u548c\u6709\u7b26\u53f7\u4e58\u6cd5\u6307\u4ee4\u3002mul\u6307\u4ee4\u9690\u542b\u4e86\u4e00\u4e2a\u53c2\u52a0\u8fd0\u7b97\u7684\u64cd\u4f5c\u6570eax\u5bc4\u5b58\u5668\uff0c\u5c06eax\u5bc4\u5b58\u5668\u91cc\u7684\u503c\u4e58oper\uff0c\u7ed3\u679c\u4fdd\u5b58\u5728eax\u4e2d\u3002\u5982\u679c\u7ed3\u679c\u8d85\u8fc732\u4f4d\u5219\u9ad832\u4f4d\u4f7f\u7528edx\u5bc4\u5b58\u5668\u4fdd\u5b58\uff0ceax\u5bc4\u5b58\u5668\u4fdd\u5b58\u4f4e32\u4f4d\u3002

    mul edx; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u4e58\u4ee5edx\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\n

    div idiv

    \u9664\u6cd5\u6307\u4ee4\u548c\u6709\u7b26\u53f7\u9664\u6cd5\u6307\u4ee4\u3002

    div ecx; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u63094\u5b57\u8282\u4e3a\u5355\u4f4d\u9664\u4ee5ecx\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5546\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\uff0c\u4f59\u6570\u4fdd\u5b58\u5728edx\u5bc4\u5b58\u5668\u4e2d\u3002\ndiv word ptr [esp+36]; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u6309word\u4e3a\u5355\u4f4d\u9664\u4ee5\u5806\u6808\u5730\u5740\u4e3aesp+36\u6240\u6307\u5411\u7684\u6570\u636e\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5546\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\uff0c\u4f59\u6570\u4fdd\u5b58\u5728edx\u5bc4\u5b58\u5668\u4e2d\u3002\n
    "},{"location":"CS/x86assm/#80386","title":"\u9ad8\u7ea7\u8bed\u8a00\u4e2d\u7684\u6570\u636e\u7ed3\u6784\u4e0e80386\u95f4\u63a5\u5bfb\u5740","text":"

    BX BP SI DI

    BX\uff1a

    BP\uff1a

    SI\uff1a

    DI\uff1a

    \u95f4\u63a5\u5bfb\u5740\uff1abx\uff0cbp\uff0csi\uff0cdi\uff0c\u53ef\u4ee5\u653e\u5728\u65b9\u62ec\u53f7\u5185

    \u7f3a\u7701\u6bb5\u5740\uff1ads\u548css\uff0c\u5982\u679c\u65b9\u62ec\u53f7\u5185\u6709bp\uff0c\u4e00\u5b9a\u662fss\uff0cbx\u4e00\u5b9a\u662fds

    CS (code segment): \u4ee3\u7801\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u50a8\u4ee3\u7801\u6bb5\u7684\u6bb5\u5730\u5740\u3002

    DS (data segment)\uff1a\u6570\u636e\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u50a8\u6570\u636e\u6bb5\u7684\u6bb5\u5730\u5740\u3002

    SS (stack segment)\uff1a\u5806\u6808\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u50a8\u5806\u6808\u6bb5\u7684\u6bb5\u5730\u5740\u3002

    ES (extra segment)\uff1a\u9644\u52a0\u6570\u636e\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u653e\u9644\u52a0\u6bb5\u7684\u6bb5\u5730\u5740\u3002\u6709\u65f6\uff0c\u4e00\u4e2a\u6570\u636e\u6bb5\u4e0d\u591f\u7528\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u58f0\u660e\u4e00\u4e2a\u9644\u52a0\u6bb5\u6765\u5b58\u653e\u66f4\u591a\u7684\u6570\u636e\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u58f0\u660e 2 \u4e2a\u6570\u636e\u6bb5\uff0c\u5206\u522b\u7528 DS \u548c ES \u6307\u5411\u3002

    \u7a0b\u5e8f\u5f00\u59cb\u8fd0\u884c\u65f6\uff0cDOS \u4f1a\u628a ds \u548c es \u8d4b\u503c\u4e3a psp(program segment prefix) \u6bb5\u5730\u5740\u3002psp \u6bb5\u4f4d\u4e8e\u7a0b\u5e8f\u9996\u4e2a\u6bb5\u7684\u524d\u9762\uff0c\u957f\u5ea6\u4e3a 100h \u5b57\u8282\uff0c\u5176\u7528\u9014\u662f\u4fdd\u5b58\u5f53\u524d exe \u76f8\u5173\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u5982 psp:80h \u5f00\u59cb\u5b58\u653e\u4e86 exe \u7684\u547d\u4ee4\u884c\u53c2\u6570\u3002

    \u95f4\u63a5\u5bfb\u5740\uff1a \u53ef\u4ee5\u2f64\u4f5c\u95f4\u63a5\u5bfb\u5740\u7684\u5bc4\u5b58\u5668\u53ea\u6709\u56db\u4e2a\uff1abx, bp, si, di [bx], [bp], [si], [di]\u662f\u6700\u7b80\u5355\u7684\u95f4\u63a5\u5bfb\u5740 [bx + si], [bp + si], [bx + di], [bp + di]\u6ce8\u610f\u524d\u2faf\u5fc5\u987b\u662fbx/bp\uff0c\u540e\u2faf\u5fc5\u987b\u662fdi/si [bx+2] [bp-2] [si+1] [di-1] [bx+si+2] [bx+di-2]

    [bp+si+1] [bp+di-1] tips\uff1a\u4e24\u4e2a\u5bc4\u5b58\u5668\u76f8\u52a0\u7684\u95f4\u63a5\u5bfb\u5740\u2f45\u5f0f\u4e2d, bx\u6216bp\u901a\u5e38\u2f64\u6765\u8868\u793a\u6570\u7ec4\u7684\u2fb8\u5730\u5740, \u2f7dsi\u6216di\u5219\u2f64\u6765\u8868\u793a\u4e0b \u6807\u3002

    \u7f3a\u7701\u6bb5\u5740\uff1a\u4e0d\u542bbp\u7684\u6e90\u64cd\u4f5c\u6570\u2f00\u822c\u90fd\u7701\u7565\u7684\u6bb5\u5730\u5740ds\uff0c\u542b\u6709bp\u7684\u6e90\u64cd\u4f5c\u6570\u7701\u7565\u4e86ss\uff0c\u2f7d\u8fd9\u4e2a\u9ed8\u8ba4\u7684\u6bb5\u5730\u5740\u662f \u53ef\u4ee5\u88ab\u6539\u53d8\u7684

    \u7528\u5806\u6808\u4f20\u9012\u53c2\u6570\u65f6\uff0c\u5982\u4f55\u7528[bp+]\u5b9e\u73b0\u5bf9\u53c2\u6570\u7684\u5f15\u7528\uff1f

    bp + \u591a\u5c11\u5c31\u662f\u6808\u91cc\u7684\u591a\u5c11

    \u738b\u723d\u300a\u6c47\u7f16\u8bed\u2f94\u300b\u7b2c\u56db\u7248 \u9644\u5f554:\u2f64\u6808\u4f20\u9012\u53c2\u6570

    difcube:\n    mov bp, sp\n    mov ax, [bp+4]  ;a\u7684\u503c\u9001\u5165ax\u4e2d\n    sub ax, [bp+6]  ;\u51cf\u6808\u4e2db\u7684\u503c\n    mov bp, ax\n    mul bp\n    mul bp\n    pop bp\n    ret 4\n
    "},{"location":"CS/x86assm/#_16","title":"\u5176\u5b83\u7684\u7b14\u8bb0","text":""},{"location":"CS/x86assm/#x86_1","title":"x86\uff1a","text":"

    Intel\u4ece16\u4f4d\u5fae\u5904\u7406\u56688086\u5f00\u59cb\u7684\u6574\u4e2aCPU\u82af\u7247\u7cfb\u5217\uff0c\u7cfb\u5217\u4e2d\u7684\u6bcf\u79cd\u578b\u53f7\u90fd\u4fdd\u6301\u4e0e\u4ee5\u524d\u7684\u5404\u79cd\u578b\u53f7\u517c\u5bb9\uff0c\u4e3b\u8981\u67098086\uff0c8088\uff0816\u4f4dCPU\uff09\uff0c80186\uff0c80286\uff08\u8fd9\u4e24\u4e2a\u662f\u8fc7\u6e21\u4ea7\u54c1\uff09\uff0c 80386\uff0c80486\u4ee5\u53ca\u4ee5\u540e\u5404\u79cd\u578b\u53f7\u7684Pentium\u82af\u7247\uff0832\u4f4dCPU\uff09\uff0c\u901a\u5e38\u6240\u8bf4\u7684x86\u90fd\u662f\u630732\u4f4dCPU

    80386: 32\u4f4d\u6c47\u7f16\u3002

    80836\u5bc4\u5b58\u5668

    \u901a\u7528\u5bc4\u5b58\u5668(EAX EBX ECX EDX,ESP,EBP,ESI,EDI)

    \u901a\u7528\u5bc4\u5b58\u5668\u4e0e8086\u7684\u5bc4\u5b58\u5668\u76f8\u6bd4,\u753116\u4f4d\u53d8\u4e3a\u4e8632\u4f4d

    ESP:\u6808\u9876

    EBP:\u6808\u5e95

    EAX\uff0cEBX\uff0cECX\uff0cEDX\u901a\u7528\u5bc4\u5b58\u5668

    EAX\uff1a\u7d2f\u52a0\u5668\uff08\u4e58\u6cd5\u7684\u65f6\u5019\u5b58\u4f4e\u4f4d\uff09

    EBX\uff1a\u57fa\u5740\uff08\uff3bEBX\uff0b100\uff28\uff3d\uff09

    ECX\uff1a\u8ba1\u6570\uff08\u5faa\u73af\u7684\u65f6\u5019\u8ba1\u6570\uff09

    EDX\uff1a\u6570\u636e\uff08\u9ed8\u8ba4EDX\uff0a10H\uff0b\uff0e\uff0e\uff0e\uff1b\u4e58\u6cd5\u7684\u65f6\u5019\u5b58\u9ad8\u4f4d\uff09

    ESI\uff0cEDI\uff1a\u53d8\u5740\u5bc4\u5b58\u5668

    ESI\uff1a\u6e90\u53d8\u5740\u5bc4\u5b58\u5668

    EDI\uff1a\u76ee\u7684\u53d8\u5740\u5bc4\u5b58\u5668\u3000\u4e0eEBX\u57fa\u5740\u642d\u914d\u4f7f\u7528

    "},{"location":"CS/x86assm/#_17","title":"\u53c2\u8003\u6587\u732e","text":"

    asm_sum.doc

    xxjj\u7684\u300a\u6c47\u7f16\u8bed\u8a00\u8003\u8bd5\u603b\u7ed3\u300b https://www.yuque.com/xianyuxuan/coding/mkte6u

    [80386]80x86\u6c47\u7f16\u6307\u4ee4_CarlosX\u7684\u535a\u5ba2-CSDN\u535a\u5ba2_80386\u6307\u4ee4\u96c6

    80386 \u7b97\u672f\u8fd0\u7b97\u6307\u4ee4\uff0c\u903b\u8f91\u8fd0\u7b97\u6307\u4ee4\uff0c\u79fb\u4f4d\u6307\u4ee4 (\u4e09) _ttzyanswer\u7684\u535a\u5ba2-CSDN\u535a\u5ba2

    "},{"location":"CS/CA/","title":"\u7d22\u5f15","text":"

    \u6253\u7b97\u7a0d\u5fae\u5199\u4e00\u70b9\u662f\u56e0\u4e3a\u81ea\u5df1\u5b66\u4f53\u7cfb\u7684\u65f6\u5019\u6ca1\u627e\u5230\u7279\u522b\u5b8c\u6574\u7b14\u8bb0\u8d44\u6599 + \u6ca1\u4e0a\u8ba1\u7ec4\uff0c\u81ea\u5df1\u5b8c\u5168\u6ca1\u7406\u89e3\uff0c\u5355\u7eaf\u786c\u80cc\u901f\u6210\u7684\uff0c\u8bb0\u4e00\u4e0b\u81ea\u5df1\u901f\u6210\u770b\u4e86\u54ea\u4e9b\u4e1c\u897f

    \u5f53\u7136\u9996\u5148\u82b1\u4e86\u4e24\u4e2a\u4e0b\u5348\u8fc7\u4e86\u4e00\u904d\u9a6c\u5fb7\u8ba1\u7ec4\u7684\u667a\u4e91 + xyx\u8ba1\u7ec4\u7b14\u8bb0\uff0c\u8fb9\u5b66\u8fb9\u52a8\u7b14

    \u8fd8\u6709\u6284 A4 \u7684\u89c4\u5212\u8bf7\u89c1\u6211 github \u90a3\u4e2a ZJU \u8d44\u6e90\u4ed3\u5e93

    \u53c2\u8003\u8d44\u6599

    "},{"location":"CS/CA/chap2/","title":"chap2: Memory Hierachy Design","text":""},{"location":"CS/CA/chap2/#_1","title":"\u76ee\u5f55","text":""},{"location":"CS/CA/chap2/#cache","title":"cache \u57fa\u7840\u6982\u5ff5","text":"

    \u8fd9\u5757\u5e38\u8003\u5927\u9898\uff0c\u6bd4\u5982\u8ba1\u7b97\u5730\u5740\u957f\u5ea6\uff0c\u8ba1\u7b97 AMAT\uff0c\u8ba1\u7b97 miss \u6b21\u6570\u7b49\u3002

    "},{"location":"CS/CA/chap2/#cache_1","title":"cache \u7684\u5206\u7c7b\u548c\u5730\u5740\u7684\u8ba1\u7b97\u65b9\u6cd5","text":"

    Warning

    \u8fd9\u4e2a\u8868\u8bb0\u4e0d\u6e05\u4e86\u6253\u7b97\u7b49\u4e0a\u8ba1\u7ec4\u518d\u8865\u3002

    \u7c7b\u522b \u89e3\u91ca \u6807\u8bb0\u9879\u7ed3\u6784 \u5730\u5740\u8ba1\u7b97 \u4f18\u70b9 \u7f3a\u70b9 direct-mapping \u76f4\u63a5\u6620\u5c04 fully associative \u5168\u5173\u8054 2^n-set associative 2^n\u8def\u7ec4\u5173\u8054 "},{"location":"CS/CA/chap2/#cache-write","title":"cache write \u7684\u5904\u7406\u65b9\u6cd5","text":"write \u7b56\u7565 \u89e3\u91ca \u7ecf\u5e38\u642d\u914d\u7684 write-miss \u7b56\u7565 \u89e3\u91ca write through \u6bcf\u6b21\u5199\u6570\u636e\u65f6\u65e2\u5199\u5728cache\u4e5f\u5199\u5728main memory\u3002\u597d\u5904\u662fcache\u548cmain memory\u603b\u662f\u4e00\u81f4\u7684\uff0c\u4f46\u662f\u5f88\u6162\u3002\u53ef\u4ee5\u901a\u8fc7\u5f15\u5165\u4e00\u4e2awrite buffer\u6765\u6539\u8fdb\u3002 write around\uff08\u4e5f\u53ebnon-allocate\uff09 \u8003\u8651\u5230\u65e2\u7136\u672c\u6765\u5c31\u8981\u53bb\u4e00\u6b21main memory\uff0c\u4e0d\u5982\u76f4\u63a5\u5199\u5728\u91cc\u9762\uff0c\u4e0d\u518d\u62ff\u5230cache\u91cc\u4e86\u3002 write back \u53ea\u5c06\u4fee\u6539\u540e\u7684\u5185\u5bb9\u653e\u5728cache\u91cc\uff0c\u8be5block\u8981\u88ab\u8986\u76d6\u7684\u65f6\u5019\u518d\u5199\u56de\u5185\u5b58\u3002\u8fd9\u79cd\u60c5\u51b5\u9700\u8981\u4e00\u4e2a\u989d\u5916\u7684dirty bit\u6765\u8bb0\u5f55\u8fd9\u4e2acache\u662f\u5426\u88ab\u66f4\u6539\u8fc7\uff0c\u4ece\u800c\u76f4\u5230\u88ab\u8986\u76d6\u524d\u662f\u5426\u9700\u8981\u88ab\u5199\u56de\u5185\u5b58\u3002 write allocate \u50cfread miss\u4e00\u6837\u5148\u628ablock\u62ff\u5230cache\u91cc\u518d\u5199\u5165"},{"location":"CS/CA/chap2/#cache-miss-3c","title":"cache miss \u7684\u79cd\u7c7b \uff08\u7b80\u79f0\u4e3a3C\uff09","text":"\u79cd\u7c7b \u89e3\u91ca compulsory miss \u51b7\u542f\u52a8\u5931\u914d\uff0c\u521a\u4e0a\u7535cache\u662f\u7a7a\u7684\uff0c\u6240\u4ee5\u4e0d\u8bba\u4ec0\u4e48\u8bbf\u95ee\u90fd\u8981miss\u4e00\u6b21\u3002cache\u8d8a\u5927compulsory miss\u8d8a\u591a\u3002 capacity miss cache\u5757\u7684\u5927\u5c0f\u4e0d\u6ee1\u8db3\u7a0b\u5e8f\u5c40\u90e8\u6027\u65f6\u53d1\u751f\u7684\u5931\u914d\uff0c\u79f0\u4e3a\u5bb9\u91cf\u5931\u914d\u3002cache\u5757\u5927\u5c0f\u589e\u5927\uff0c\u5bb9\u91cf\u5931\u914d\u7387\u51cf\u5c0f\uff0c\u4e0e\u5173\u8054\u5ea6\u65e0\u5173\u3002 conflict miss \u5728\u91c7\u7528\u7ec4\u5173\u8054\u548c\u76f4\u63a5\u6620\u50cf\u65b9\u5f0f\u7684cache\u4e2d\uff0c\u4e3b\u5b58\u7684\u5f88\u591a\u5757\u90fd\u6620\u5c04\u5230cache\u7684\u540c\u4e00\u5757\uff0c\u5982\u679c\u67d0\u5757\u672c\u6765\u5728cache\u4e2d\uff0c\u521a\u88ab\u66ff\u6362\u51fa\u53bb\uff0c\u53c8\u88ab\u8bbf\u95ee\u5230\u3002\u6709\u70b9\u50cf OS \u91cc\u9875\u66ff\u6362\u65f6\u8bb2\u5230\u7684\u201c\u6296\u52a8\u201d\u3002\u5173\u8054\u5ea6\u8d8a\u5927\uff0cConflict\u5931\u914d\u8d8a\u5c0f\u3002"},{"location":"CS/CA/chap2/#cache_2","title":"cache \u4f18\u5316\u65b9\u6cd5","text":"

    \u8fd9\u5757\u5e38\u8003\u9009\u62e9\u3002

    \u603b\u7ed3\u6027\u7684\u56fe

    \u63a5\u4e0b\u6765\u5177\u4f53\u8bb2\u89e3\u6bcf\u4e00\u79cd\u4f18\u5316\u65b9\u6cd5\u3002

    \u9996\u5148\u56db\u5927\u7c7b\u4f18\u5316\u7684\u601d\u8def\u662f\u5982\u4f55\u4ea7\u751f\u7684\uff1f\u6765\u81ea\u4e8e\u8861\u91cf\u5185\u5b58\u6027\u80fd\u7684\u516c\u5f0f\uff1a

    \\[ Average\\space Memory\\_access\\space Time\\space (AMAT) = Hit\\_time + Miss\\_rate \\times Miss\\_penalty \\]

    \u9996\u5148\u8fd9\u4e2a\u516c\u5f0f\u7684\u610f\u601d\u662f\uff0c\u5f53 CPU \u9700\u8981\u5185\u5b58\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u8bbf\u95ee\u65f6\u95f4\u7684\u8ba1\u7b97\u65b9\u6cd5\u662f\uff1a - \u5982\u679c\u5728 cache \u91cc\u627e\u5230\u4e86\uff0c\u5373\u53d1\u751f cache hit\uff0c\u90a3\u4e48\u9700\u8981\u7684\u65f6\u95f4\u53ea\u6709 cache \u7684\u8bbf\u95ee\u7528\u65f6\u5373hit_time\u3002 - \u5982\u679c\u5728 cache \u91cc\u6ca1\u627e\u5230\uff08\u6b64\u65f6\u5df2\u7ecf\u7528\u4e86\u4e00\u4e2a hit_time\uff0c\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48 hit_time \u662f 100% \u8981\u7528\u6389\u7684\uff09\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u53bb\u5185\u5b58\u91cc\u627e\uff0c\u53bb\u5185\u5b58\u91cc\u627e\u7684\u7528\u65f6\u662f\u8fd9\u79cd\u60c5\u51b5\u6240\u5360\u7684\u767e\u5206\u6bd4 miss_rate \u4e58\u4e0a\u53bb\u5185\u5b58\u91cc\u627e\u4e00\u6b21\u7684\u8017\u65f6 miss_penalty\u3002

    Note

    \u5f53\u7136\u9898\u76ee\u91cc\u8fd8\u53ef\u80fd\u4f1a\u8bf4 \"cache \u548c memory \u662f\u540c\u65f6\u8bbf\u95ee\u7684\"\uff0c\u610f\u601d\u5c31\u662f cache \u548c memory \u4e00\u8d77\u627e\uff0c\u5982\u679c cache \u91cc\u627e\u5230\u4e86\uff0c\u5c31\u628a memory \u8bbf\u95ee\u6390\u6389\uff0c\u8fd9\u6837\u5728 miss \u7684\u60c5\u51b5\u4e0b\u662f\u6bd4\u5148\u5728 cache \u91cc\u627e\u5b8c\u518d\u53bb memory \u627e\u66f4\u5feb\u7684\u3002\u8fd9\u6837\u7684\u6761\u4ef6\u4e0b\u8ba1\u7b97 AMAT \u5c31\u9700\u8981\u628a hit_time \u4e58\u4e0a\u4e00\u4e2a hit_rate\uff0c\u4e0d\u518d\u662f 100% \u7528\u6389\u4e86\u3002

    \u603b\u4e4b\uff0cAMAT \u7684\u8868\u8fbe\u5f0f\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u4e09\u79cd\u4f18\u5316\u7684\u5927\u65b9\u5411\uff0c\u5373 (1)\u964d\u4f4e hit_time (2)\u51cf\u5c0f miss_rate (3)\u51cf\u5c0f miss_penalty\u3002\u6b64\u5916\u8fd8\u6709\u4e00\u4e2a\u5927\u65b9\u5411\u53eb (4)\u505a\u5e76\u884c\u7684 cache\uff0c\u5728\u6709\u7684\u8001\u5e08\u7684 PPT \u91cc\u7b2c(4)\u9879\u597d\u50cf\u4f1a\u62c6\u51fa\u4e24\u7c7b\u6765\u8bb2\uff0c\u4e0d\u8fc7\u6211\u4eec\u8fd9\u91cc\u5c31\u6309\u603b\u5171\u56db\u79cd\u5927\u65b9\u5411\u6765\u5199\uff0c\u8ddf\u56fe\u4e00\u81f4\uff0c\u6bd4\u8f83\u8212\u670d\u3002

    "},{"location":"CS/CA/chap2/#miss-penalty","title":"Miss Penalty","text":"

    Multilevel Caches

    \u7ecf\u5178\u7684\u5185\u5b58\u6a21\u578b\u662f

    \u5c0f/\u5feb <---------------> \u5927/\u6162\n[\u5bc4\u5b58\u5668] - [cache] - [\u5185\u5b58] - [\u5916\u5b58]\n

    \u8fd9\u4e2a\u65b9\u6cd5\u662f\u628a\u5b83\u53d8\u6210

    \u5c0f/\u5feb <---------------> \u5927/\u6162\n[\u5bc4\u5b58\u5668] - [\u5c0fcache] - [\u5927cache] - [\u5185\u5b58] - [\u5916\u5b58]\n
    \u6bd4\u5982\u5c0f cache \u6ca1\u627e\u5230\u7684\u5148\u4ece\u5927 cache \u627e\uff0c\u5927 cache \u6ca1\u627e\u5230\u7684\u518d\u53bb\u5185\u5b58\u627e\u3002\u6b64\u7c7b\u53ef\u80fd\u51fa AMAT \u7684\u8ba1\u7b97\u9898\uff0c\u628a\u5404\u79cd rate \u62ce\u6e05\u4ee5\u540e\u5c31\u50cf\u4f55\u8001\u5e08\u8bf4\u7684\u201c\u5f53\u6210\u521d\u4e2d\u7269\u7406\u9898\u505a\u5c31\u884c\u201d\u3002

    Early Resart & Critical Word 1st

    \u4f17\u6240\u5468\u77e5\uff08\u81f3\u5c11\u4f60\u73b0\u5728\u77e5\u9053\u4e86\uff09cache \u7684\u4e00\u4e2a block \u7ecf\u5e38\u662f\u542b\u6709\u591a\u4e2a word \u7684\uff08\u4f60\u53ef\u80fd\u4f1a\u604d\u7136\u5927\u609f\u6709\u4e9b\u9898\u76ee\u91cc\u8bf4\u7684\u201ccache \u6309 word \u7f16\u5740\u201d\u662f\u4ec0\u4e48\u610f\u601d\uff09\uff0c\u800c block \u5f80\u5f80\u662f\u5927\u4e8e cache \u548c\u5185\u5b58\u4e4b\u95f4\u7684\u6570\u636e\u7ebf\u4f4d\u5bbd\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u60f3\u8981\u66ff\u6362\u4e00\u4e2a block\uff0c\u9700\u8981\u5728 cache \u548c\u5185\u5b58\u4e4b\u95f4\u4f20\u9001\u597d\u51e0\u8d9f\u624d\u80fd\u628a\u4e00\u4e2a block \u66ff\u6362\u5b8c\u3002

    \u4f46\u662f miss \u53d1\u751f\u65f6 CPU \u9700\u8981\u7684\u53ef\u80fd\u53ea\u6709\u4e00\u4e2a word\uff0c\u90a3\u4e48\u53ef\u4ee5\u5148\u628a CPU \u9700\u8981\u7684\u8fd9\u4e2a word \u5199\u56de\u6765\uff0c\u8ba9 CPU \u5148\u7ee7\u7eed\u8dd1\u8d77\u6765\uff0c\u5728 CPU \u7ee7\u7eed\u8dd1\u7684\u540c\u65f6\u518d\u628a\u5269\u4e0b\u7684 word \u5199\u8fdb cache\u3002

    Priority to Read Miss

    \u5728\u4f7f\u7528 write buffer \u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u679c write \u7684\u6570\u636e\u5f88\u5feb\u5c31\u8981 read\uff0c\u53ef\u4ee5\u5148\u4e0d\u5c06 buffer \u7684\u6570\u636e\u5199\u8fdb\u5185\u5b58\uff0c\u800c\u662f\u7b49\u5230read\u7684\u65f6\u5019\u76f4\u63a5\u4ecebuffer\u91cc\u8bfb\uff0c\u8bfb\u591a\u6b21\u4e4b\u540e\u518d\u4e00\u6b21\u4ecebuffer\u91cc\u5199\u5185\u5b58\u3002

    \u5176\u4e2d\uff0cwrite buffer \u662f\u4e00\u4e2a\u53ef\u4ee5\u8bbe\u5728 cache \u548c\u5185\u5b58\u4e4b\u95f4\u7684\u7ed3\u6784\uff0c\u610f\u601d\u662f\uff0c\u5047\u8bbe\u5185\u5b58\u53ea\u6709\u4e00\u4e2a\u8bfb\u5199\u7aef\u53e3\uff0c\u5199\u5165\u5185\u5b58\u975e\u5e38\u6162\uff0c\u90a3\u4e48 cache \u53ef\u4ee5\u5c06\u9700\u8981\u5199\u5230\u5185\u5b58\u7684\u4e1c\u897f\u5148\u642c\u5230 write buffer \u91cc\uff0c\u7136\u540e cache \u5148\u8dd1\u7740\uff0c\u5185\u5b58\u53bb\u6162\u6162\u5199\u5165\u3002

    Merging Write Buffer

    \u540c\u6837\u662f\u4f7f\u7528 write buffer \u7684\u60c5\u51b5\u3002merging write buffer \u5c31\u662f\u5c06\u5728\u591a\u884c\u53ef\u4ee5\u4e00\u6b21\u5199\u56de\u7684\u5185\u5bb9\u5408\u5e76\u5230\u4e00\u884c\uff0c\u4ee5\u53ef\u4ee5\u4e00\u6b21\u5199\u56de\u3002write buffer \u7684\u5185\u5bb9\u662f\u6309 byte \u7f16\u5740\u7684\uff0c\u4f46\u5185\u5b58\u6570\u636e\u7ebf\u4f4d\u5bbd\u4e00\u822c\u5927\u4e8e byte\uff0c\u6bd4\u5982\u4e00\u6b21\u53ef\u4ee5\u5199\u56de\u4e00\u6574\u4e2a word\uff0c\u90a3\u4e48\u5047\u5982 write buffer \u91cc\u73b0\u5728\u6709\u56db\u884c mem[200], mem[400], mem[208], mem[408]\uff0c\u5199\u56de\u5185\u5b58\u5c31\u9700\u8981\u56db\u6b21\u3002\u4f46\u662f\u5982\u679c\u6211\u4eec\u628a\u5728\u540c\u4e00\u4e2a word \u91cc\u7684 byte \u5408\u5e76\u4e00\u4e0b\uff0c\u53d8\u6210 mem[200] mem[208] \u548c mem[400] mem[408] \u4e24\u884c\uff0c\u4e24\u6b21\u5199\u56de\uff0c\u5c31\u4f1a\u53d8\u5feb\u3002

    Victim Caches

    \u662f\u4e00\u79cd\u51cf\u5c11 conflict miss \u7684\u65b9\u6cd5\uff0c\u5373\u66ff\u6362\u51fa\u53bb\u7684\u9875\u5148\u653e\u8fdb\u8fd9\u4e2a victim cache \u7ed3\u6784\u3002victim cache \u4e0e cache \u662f\u5168\u76f8\u5173\u7684\uff0c\u6709\u70b9\u50cf\u4e00\u4e2a\u4e8c\u7ea7 cache\uff0c\u662f\u4e00\u4e2a\u6bd4\u4e00\u7ea7 cache \u6162\u7684 cache\u3002\u8fd9\u6837\u5982\u679c\u53d1\u751f conflict miss\uff0c\u4ece\u8fd9\u4e2a victim cache \u91cc\u53d6\u6570\u636e\u6bd4\u4ece\u5185\u5b58\u91cc\u53d6\u66f4\u5feb\u3002

    "},{"location":"CS/CA/chap2/#miss-rate","title":"Miss Rate","text":"

    \u8fd9\u4e00\u680f\u7684\u524d\u4e09\u4e2a\u65b9\u6cd5\u90fd\u4e0d\u662f\u5f88\u806a\u660e\uff0c\u672c\u8d28\u4e0a\u662f\u5728 cache \u7684\u4e09\u79cd\u8bbe\u8ba1\u65b9\u6cd5\u4e2d\u53bb\u6743\u8861\uff0c\u800c\u6211\u4eec\u77e5\u9053 cache \u7684\u4e09\u79cd miss \u8fd8\u662f\u6b64\u6d88\u5f7c\u957f\u7684\uff0c\u54ea\u4e00\u79cd\u8bbe\u8ba1\u65b9\u6cd5\u90fd\u4e0d\u80fd\u5b8c\u7f8e\u89e3\u51b3\u3002\u4e0d\u8fc7\u6574\u4f53\u800c\u8a00\uff0cfrom \u738b\u9053\u8ba1\u7ec4\uff0c\u4f7f\u7528\u5408\u9002\u7684 2^n \u8def\u7ec4\u5173\u8054\u65f6\uff0c\u6700\u597d\u7684\u60c5\u51b5\u80fd\u591f\u51e0\u4e4e\u517c\u5177\u76f4\u63a5\u6620\u5c04\u7684\u6548\u7387\u548c\u5168\u5173\u8054\u7684\u547d\u4e2d\u7387\u3002

    Larger Block Size

    \u628a cache \u7684\u6bcf\u4e2a\u5757\u8bbe\u8ba1\u5f97\u66f4\u5927\uff0c\u8fd9\u6837\u6bcf\u4e2a\u5757\u5b58\u5f97\u4e1c\u897f\u591a\u4e86\uff0c\u5f53\u7136 miss_rate \u5c31\u4e0b\u964d\u3002\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0cmiss_penalty \u4e0a\u5347\u4e86\uff0c\u56e0\u4e3a\u5199\u8d77\u6765\u53d8\u6162\u4e86\u3002

    Larger Cache Size

    \u628a cache \u7684\u5757\u6570\u589e\u591a\uff0c\u8fd9\u6837\u5b58\u5f97\u4e1c\u897f\u4e5f\u591a\u4e86\uff0cmiss_rate \u5c31\u4e5f\u4e0b\u964d\u3002\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0c\u51b7\u542f\u52a8 compulsory miss \u4e0a\u5347\u4e86\uff1b\u5982\u679c\u4e0d\u662f\u76f4\u63a5\u6620\u5c04\uff0c\u67e5\u627e\u65f6\u95f4\u4e5f\u4e0a\u5347\u4e86\u3002

    Higher Associativity

    \u63d0\u5347\u7ec4\u5173\u8054\u6570\uff0c\u8fd9\u6837\u51cf\u5c11 cache \u91cc\u9762\u7684\u4e1c\u897f\u88ab\u66ff\u6362\u51fa\u53bb\u7684\u6982\u7387\uff0c\u51cf\u5c11 conflict miss\u3002\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0c\u67e5\u627e\u65f6\u95f4\u589e\u52a0\u3002

    Way-predicting Cache

    \u5728\u7ec4\u5173\u8054\u8bbe\u8ba1\u4e2d\uff0c\u4f7f cache \u5177\u6709\u9884\u6d4b\u9700\u8981\u67e5\u627e\u7684 tag \u7684\u80fd\u529b\u3002\u56e0\u4e3a\u53bb\u67e5\u9700\u8981\u7684\u6570\u636e\u5728\u7ec4\u91cc\u54ea\u4e2a tag \u6bd4\u8f83\u6162\uff0c\u6240\u4ee5\u5148\u731c\u4e00\u4e2a tag \u5728 cache \u91cc\u627e\u7740\uff0c\u7b49 tag \u51c6\u5907\u597d\u540e\u5982\u679c\u731c\u5bf9\u4e86\uff0c\u90a3\u4e48\u8282\u7ea6\u4e86\u65f6\u95f4\uff0c\u5c31\u53ef\u4ee5\u76f4\u63a5 hit\u3002

    Pseudo-associative Caches

    \u65e2\u662f\u76f4\u63a5\u6620\u5c04\u53c8\u662f\u7ec4\u5173\u8054\u6620\u5c04\u7684 cache\u3002\u9996\u5148\u628a cache \u5f53\u4f5c\u4e00\u4e2a\u76f4\u63a5\u6620\u5c04 cache\uff0c\u7b2c\u4e00\u6b21\u67e5\u7684\u65f6\u5019\u5c31\u8fd9\u4e48\u67e5\uff0c\u6700\u5feb\u3002\u4f46\u662f\u8fd9\u79cd cache \u53c8\u540c\u65f6\u662f\u4e00\u4e2a\u7ec4\u5173\u8054\u6620\u5c04\uff0c\u5728 cache \u5757\u4e2d\u653e\u4e00\u4e2a\u989d\u5916\u7684\u6807\u5fd7\u8868\u793a\u4e0e\u4e4b\u5173\u8054\u7684\u5176\u5b83\u5757\uff0c\u5982\u679c miss \u4e86\u518d\u53bb\u67e5\u8fd9\u4e9b\u5757\u3002\u8fd9\u6837\u6709\u4e00\u4e2a\u5c0f\u7684 hit_time \u548c2^n - 1\u4e2a\u5927\u7684 pseudo_hit_time\uff0c\u4f46\u662f\u5e73\u5747\u6765\u8bf4 miss_rate \u6bd4\u76f4\u63a5\u6620\u5c04\u5c0f\uff0chit_time \u6bd4\u7ec4\u5173\u8054\u6620\u5c04\u5c0f\u3002

    Compiler Techniques Reduce Cache Misses

    \u7528\u8f6f\u4ef6\u65b9\u6cd5\uff0c\u4f18\u5316\u4ee3\u7801\u3002\u8fd9\u91cc\u6709\u56db\u4e2a\u4f8b\u7a0b\uff0c\u5206\u522b\u53eb Merging Arrays, Loop Interchange, Blocking, \u548c Loop Merging\u3002\u7b80\u5355\u7684\u76f4\u63a5\u7528\u6587\u5b57\u63cf\u8ff0\u4e86\u3002

    Merging Arrays

    \u6bd4\u5982\u6211\u4eec\u9700\u8981\u8bbf\u95ee\u7684\u662fa[100], b[100], \u5728\u540c\u4e00\u4e2a\u5faa\u73af\u91cc\u8fde\u7eed\u8bbf\u95eea[i] b[i]\u5373\u4e0b\u6807\u76f8\u540c\u7684\u9879\uff0ccache\u5982\u679c\u4e00\u6b21\u6027\u653e\u4e0d\u4e0b\u4e24\u4e2a\u6570\u7ec4\uff0c\u5c31\u4f1a\u4e24\u4e2a\u6570\u7ec4\u4ea4\u66ff\u4ece\u5185\u5b58\u91cc\u53d6\u51fa\u6765\u653e\u5230cache\u91cc\u3002\u8fd9\u65f6\u5019\u53ef\u4ee5\u8bbe\u8ba1\u6210\u4e00\u4e2a\u7ed3\u6784\u4f53\u6570\u7ec4struct ab { a[100], b[100] }\uff0c\u8fd9\u6837 cache \u53ef\u4ee5\u628a a \u548c b \u76f8\u90bb\u5730\u62ff\u8fdb\u6765\u3002\u51cf\u5c11miss\u3002

    Loop Interchange

    e.g.

    /* Before: \u5916\u884c\u5185\u5217\uff0c\u4e00\u884c\u53ef\u4ee5\u4e00\u6b21\u88ab\u653e\u8fdb\u5185\u5b58 */\nfor (k = 0; k < 100; k = k+1)\nfor (j = 0; j < 100; j = j+1)\nfor (i = 0; i < 5000; i = i+1)\nM[i][j] = 2 * M[i][j];\n/* After: \u5916\u5217\u5185\u884c */\nfor (k = 0; k < 100; k = k+1)\nfor (i = 0; i < 5000; i = i+1)\nfor (j = 0; j < 100; j = j+1)\nM[i][j] = 2 * M[i][j];\n

    \u4fee\u6539\u540e\u7684cache\u547d\u4e2d\u7387\u53d8\u9ad8\u4e86\uff0c\u56e0\u4e3a\u4ea4\u6362\u540e\u5bf9\u5185\u5b58\u7684\u8bbf\u95ee\u662f\u8fde\u7eed\u7684\u3002\u4e00\u822c\u662f\u884c\u5bf9\u9f50\u7684\uff0c\u6700\u4f4e\u7ef4\u662f\u76f8\u90bb\u7684\u3002

    Blocking

    \u9002\u5f53\u62c6\u5206\u8fd0\u7b97\uff0c\u4ee5\u914d\u5408cache\u5927\u5c0f\u3002e.g. \u77e9\u9635\u76f8\u4e58\u4f8b\u5b50\u3002

    /* Before */\nfor (i = 0; i < N: i += 1)\nfor (j = 0; j < N; j += 1) {\nr = 0;      for (k = 0; k < N; k +=1 )\nr = r + y[i][k] * z[k][j];  }\n/* After */\nfor (jj = 0 ; jj < N; jj = jj+B)\nfor (kk = 0; kk < N; kk = kk +B) {\n// ...\u8bb0\u4e0d\u6e05\u4e86\nfor (ii = 0; ii < B; ii ++) {\n// \u603b\u4e4b\u8fd9\u4e2a\u5185\u5c42\u5faa\u73af\u53ea\u5904\u7406\u4e00\u4e2a B * B \u7684 block\uff0c\u5176\u4e2d block \u662f cache \u80fd\u653e\u4e0b\u7684\u5927\u5c0f\n}\n}\n
    \u90a3\u4e48\u4f18\u5316\u524d cache \u9700\u8981\u66ff\u6362\u66f4\u591a\u6b21\uff0c\u56e0\u4e3a\u4e0d\u8bba\u662f\u884c\u5faa\u73af\u8fd8\u662f\u5217\u5faa\u73af\uff0c\u8d85\u8fc7 B \u4e4b\u540e cache \u90fd\u8981\u91cd\u65b0\u5199\u4e00\u904d\u3002\u7136\u540e\u4e0b\u6b21\u5199\u5230\u8fd9\u4e2a block \u65f6\u518d\u6362\u8fdb\u6765\u4e00\u6b21\u3002

    \u4f18\u5316\u540e\u6bcf\u6b21\u5bf9\u6bcf\u4e00\u4e2a block \u4e00\u6b21\u6027\u5b8c\u6210\u64cd\u4f5c\u3002

    Loop Merging

    \u6bd4\u5982\u6709\u4e24\u4e2a\u5faa\u73af\u7684\u5faa\u73af\u8d77\u6b62\u6761\u4ef6\u4e00\u6837\uff0c\u90a3\u4e48\u5c31\u4e0d\u8981\u5f00\u4e24\u4e2a\u5faa\u73af\u4e86\uff0c\u5408\u5e76\u5230\u4e00\u4e2a\u5faa\u73af\u91cc\u5b8c\u6210\u3002

    "},{"location":"CS/CA/chap2/#parallelism","title":"Parallelism","text":"

    Non-blocking Caches

    cache miss\u65f6, \u7b49\u5f85\u5185\u5b58\u5199\u56de\u65f6\u7ee7\u7eed\u505a\u522b\u7684\u6ca1\u6709\u51b2\u7a81\u7684\u4e8b\u60c5\uff0c\u4e0d\u5fc5\u8981\u8ba9\u6240\u6709\u7684\u8d44\u6e90\u90fd\u7b49\u5f85\u5185\u5b58\u3002\u53ef\u4ee5\u8ba9\u522b\u7684\u5757\u5148\u5b8c\u6210\u522b\u7684\u6307\u4ee4\u7684\u9700\u6c42\u3002\u6bd4\u5982\u5728\u5904\u7406write miss\u7684\u65f6\u5019\uff0c\u5141\u8bb8\u5904\u7406read hit\u3002

    \u4e3b\u8981\u7528\u4e8eout of order\uff08\u4e71\u5e8f\uff09\u7684\u5904\u7406\u5668\u4e0a\u3002

    ppt \u7ed9\u7684\u5b9a\u4e49\u662f\uff1aallows cache to continues to supply hits while processing read misses (hit under miss, hit under multiple miss)

    Hardware Prefetching of Instr/Data

    \u53ef\u4ee5\u7531\u786c\u4ef6\u63a7\u5236\u6570\u636e\u9884\u53d6\uff0c\u4e00\u79cd\u7c7b\u4f3c branch-prediction \u7684\u505a\u6cd5\u3002\u9884\u6d4b\u5e76\u63d0\u524d\u53d6\u51fa\u53ef\u80fd\u9700\u8981\u7528\u5230\u7684\u6570\u636e\u653e\u5230cache\u91cc\u3002

    \u4f7f\u7528prefetching\u7684\u524d\u63d0\u662f\u6307\u4ee4\u662f\u5e76\u884c\u7684\uff0ccache \u4e5f\u662f non-blocking \u7684\u3002

    Compiler Controlled Prefetching

    \u4e0a\u9762\u4e00\u6761\u9884\u53d6\u65b9\u6cd5\uff0c\u4e5f\u53ef\u4ee5\u7531\u7a0b\u5e8f\u5458\u548c\u7f16\u8bd1\u5668\u624b\u52a8\u6307\u5b9a\u54ea\u4e9b\u5185\u5bb9\u5e94\u8be5\u88ab\u653e\u5230cache\u3002

    "},{"location":"CS/CA/chap2/#hit-time","title":"Hit Time","text":"

    Small & Simple Caches

    \u6bd4\u5982\u5c31\u9488\u5bf9 cache \u672c\u8eab\uff0c\u51cf\u5c0f cache \u7684\u590d\u6742\u5ea6\u4ee5\u51cf\u5c0f\u7ec4\u5408\u903b\u8f91\u7684\u5ef6\u8fdf\u3002\u5f53\u7136\u7531\u4e8e\u6211\u4eec\u4e4b\u524d\u8ba8\u8bba\u8fc7\u7684 cache \u4e09\u4e2a\u6307\u6807\u7684\u76f8\u4e92\u5236\u7ea6\uff0c\u662f\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5176\u5b83\u4e24\u4e2a\u6307\u6807\u53d8\u4e0d\u597d\u7684\u3002

    Avoiding Address Translation

    \u8fd9\u91cc\u9700\u8981\u5206\u522b\u56de\u5fc6\u4e00\u4e0b cache \u6807\u8bb0\u4f4d\u7684\u7ed3\u6784\u548c OS \u91cc\u7684\u9875\u8868\u9879\u3002\u4e00\u822c\u672c\u8bfe\u7a0b\u4e2d\u4f7f\u7528\u7684 cache \u8bbe\u8ba1\u89c4\u5219\u90fd\u662f \"physically tagged, virtually indexed\"(PTVI)\uff0c\u610f\u601d\u662f\uff0c\u7528\u4e8e\u67e5\u627e cache block \u7684 tag \u6574\u4e2a\u5168\u90fd\u5728 page offset \u91cc\uff0c\u8fd9\u5757 offset \u5b57\u6bb5\u5bf9\u4e8e\u865a\u62df\u5730\u5740\u548c\u7269\u7406\u5730\u5740\u6765\u8bf4\u662f\u5b8c\u5168\u4e00\u6837\u7684\uff0c\u53ea\u6709 page number \u9700\u8981\u9001\u8fdb tlb \u53bb\u5bfb\u627e\u7269\u7406\u5e27\u53f7\u3002\u5982\u56fe\u3002

    \u5982\u679c\u4e4b\u524d\u7684\u505a\u6cd5\u662f cache \u7b49\u5230\u7269\u7406\u5e27\u53f7\u627e\u51fa\u6765\u3001\u5730\u5740\u7ffb\u8bd1\u5b8c\u518d\u53bb\u67e5\u627e\uff0c\u5c31\u592a\u6162\u4e86\u3002\u65e2\u7136 tag \u4e0d\u7528\u7b49\u5230\u5730\u5740\u7ffb\u8bd1\u5c31\u80fd\u62ff\u5230\uff0c\u53ef\u4ee5\u4f7f\u5730\u5740\u7ffb\u8bd1\u548c cache \u67e5\u627e\u540c\u65f6\u8fdb\u884c\u3002

    Pipelined Cache Access

    \u56e0\u4e3a cache management unit \u7684\u64cd\u4f5c\u5206\u4e3a\u597d\u591a\u6b65\uff0c\u53ef\u4ee5\u628a\u6bcf\u6b65\u53bb\u50cf\u6d41\u6c34\u7ebf\u4e00\u6837\u5e76\u884c\u3002\u7f3a\u70b9\u662f\u4f1a\u589e\u52a0\u7cfb\u7edf\u5f00\u9500\uff0c\u5bfc\u81f4 hit_time \u589e\u52a0\uff0c\u4f46\u662f\u597d\u5904\u662f\u524d\u9762\u7684\u6307\u4ee4 miss \u65f6\uff0c\u4e0b\u4e00\u6761\u6307\u4ee4\u53ef\u4ee5\u5e76\u884c\u3002

    Multi-banked Cache

    \u5c06\u591a\u8def\u7ec4\u5173\u8054\u7684\u6bcf\u4e00\u8def\u7684\u67e5\u627e\u5e76\u884c\u3002

    ppt \u7ed9\u7684\u5b9a\u4e49\u662f\uff1acache is divided into independent banks that can support simultateous accesses like interleaved memory banks.

    Trace Cache

    \u6838\u5fc3\u903b\u8f91\u662f\u7f13\u5b58\u903b\u8f91\u4e0a\u7684\u6307\u4ee4\u6d41\uff0c\u800c\u4e0d\u662f\u7f13\u5b58\u7269\u7406\u5730\u5740\u7684\u6307\u4ee4\u6d41\uff0c\u4ece\u800c\u52a0\u5feb\u6307\u4ee4\u7684\u9884\u53d6\u3002\u6bd4\u5982\u5206\u652f\u6307\u4ee4\u4e2d\u4e0d\u53bb\u9884\u6d4b\u91cc cache \u4e0d\u4f1a\u547d\u4e2d\u7684\u5206\u652f\uff0c\u8fd9\u6837\u8282\u7701\u4e86 cache \u7a7a\u95f4\uff0c\u4e5f\u8ba9\u76f8\u90bb\u7684\u6307\u4ee4\u5728 cache \u4e2d\u4e5f\u76f8\u90bb\u3002\u6211\u7684\u7406\u89e3\u5b83\u7684\u610f\u601d\u662f\u628a prediction \u7684\u529f\u80fd\u9001\u7ed9\u4e86 cache\uff0c\u5982\u679c\u5206\u652f\u9884\u6d4b\u9884\u6d4b\u5230\u4e86\u67d0\u4e2a\u8df3\u8f6c\u6307\u4ee4\u4f1a\u53d1\u751f\uff0c\u90a3\u4e48 cache \u5c31\u53bb\u9884\u53d6\u53d1\u751f\u7684\u5206\u652f\u540e\u9762\u7684\u6570\u636e\u3002

    "},{"location":"CS/CA/chap3/","title":"chap3: Instruction-level Parallelism (ILP)","text":""},{"location":"CS/CA/chap3/#_1","title":"\u76ee\u5f55","text":""},{"location":"CS/CA/chap3/#ilp","title":"ILP \u57fa\u7840\u6982\u5ff5","text":"

    Note

    \u662f\u5199\u5f97\u7b80\u5355\u70b9\u4e86\u54c8\u3002\u5199\u4e0d\u52a8\u4e86\u3002\u8981\u4e0d\u5927\u5bb6\u770b\u8ba1\u7ec4\u738b\u9053\u597d\u4e86\u3002

    \u4e09\u79cd\u7ade\u4e89

    \u6d41\u6c34\u7ebf\u7c7b\u578b

    \u770b\u7684\u65f6\u5019\u6ce8\u610f\u603b\u7ed3\u4e00\u4e0b\u6bcf\u4e00\u79cd\u7684 CPI \u662f\u5927\u4e8e\u7b49\u4e8e\u8fd8\u662f\u5c0f\u4e8e 1\u3002\u6211\u603b\u7ed3\u4e0d\u51fa\u6765\u4e86\u3002

    "},{"location":"CS/CA/chap3/#ilp_1","title":"ILP \u5728\u4f53\u7cfb\u91cc\u5b66\u7684\u4e09\u79cd\u7b97\u6cd5","text":"

    Note

    \u672c\u6765\u8fd9\u5757\u8be5\u5199\u7684\u4f46\u662f\u6211\u5199\u4e0d\u52a8\u4e86

    \u76f4\u63a5\u53bb bing \u641c\u7d22 (1)Scoreboard, (2)Tomasulo, (3)Tomasulo w speculation, \u53bb\u627e\u4e00\u4e2a\u5357\u5927\u540c\u5b66\u5199\u7684\u77e5\u4e4e\u5e16\u5b50\uff0c\u6211\u662f\u770b\u8fd9\u5957\u5e16\u5b50\u770b\u61c2\u7684\u3002\u8fd8\u6709 lab \u91cc\u8fd9\u5757\u7684\u5b9e\u9a8c\u4e5f\u80fd\u5e2e\u52a9\u7406\u89e3\u3002

    \u8bf7\u518d\u7ed3\u5408\u8fd9\u5f20\u56fe\u8bb0\u5fc6\u4e00\u4e0b\uff1a

    \u8fd8\u6709\u4e00\u4e2a\u4e0a\u8ff0\u8d44\u6599\u4f3c\u4e4e\u6ca1\u8bb2\u5230\u7684\u70b9\uff0c\u5173\u4e8e ISSUE \u65f6\u673a\uff0c\u6211\u8bb0\u5f97\u662f - Scoreboard: \u9700\u8981\u7684 Function Unit \u4e3a\u7a7a\uff0c\u4e14\u9700\u8981\u5199\u7684 Reg State \u6ca1\u6709\u522b\u7684\u6307\u4ee4\u8fd8\u51c6\u5907\u5199\uff08\u907f\u514d WAW\uff09\u65f6\u3002 - Tomasulo: Reservation Station \u6709\u7a7a\u65f6\u3002 - Tomasulo w ROB (\u5373 w speculation): Reservation Station \u548c ROB \u90fd\u7a7a\u65f6\u3002

    Warning

    \u4f46\u662f\u4e0a\u8ff0 Tomasulo w ROB \u4f3c\u4e4e\u8ddf\u6211\u8003\u7684\u4e00\u4e2a\u671f\u672b\u9898\u4e0d\u517c\u5bb9\uff0c\u4e0d\u77e5\u9053\uff0c\u7b49\u540e\u4eba\u6765\u4e3a\u6211\u6307\u51fa

    "},{"location":"CS/CA/chap3/#branch-prediction","title":"Branch prediction","text":"

    \u56de\u5fc6 control hazard\uff0c\u6d41\u6c34\u7ebf CPU \u9047\u5230\u8df3\u8f6c\u8bed\u53e5\u5982\u679c\u5224\u65ad\u6761\u4ef6\u8fd8\u6ca1\u5c31\u7eea\uff0c\u5c31\u9700\u8981\u7b49\u64cd\u4f5c\u6570\u624d\u80fd\u7ee7\u7eed\u5f80\u4e0b\u8d70\u3002\u6211\u4eec\u60f3\u8ba9 CPU \u968f\u4fbf\u5148\u731c\u4e00\u4e2a\u5f80\u4e0b\u8d70\u7740\uff0c\u5982\u679c\u7b49\u64cd\u4f5c\u6570\u51c6\u5907\u597d\u53d1\u73b0\u731c\u9519\u4e86\uff0c\u5927\u4e0d\u4e86\u518d\u6390\u6389\uff0c\u731c\u5bf9\u4e86\u90a3\u5c31\u8282\u7ea6\u65f6\u95f4\u4e86\u3002

    \u731c\u7684\u6839\u636e\u6709\u4ec0\u4e48\u5462\uff0c\u786e\u5b9e\u6709\u6839\u636e\uff0c\u7edf\u8ba1\u8868\u660e\u5927\u90e8\u5206\u7a0b\u5e8f\u91cc\u53d1\u751f\u8df3\u8f6c\uff08branch taken\uff09\u548c\u4e0d\u53d1\u751f\u8df3\u8f6c\uff08branch not taken\uff09\u7684\u6570\u76ee\u662f\u4e25\u91cd\u4e0d\u6210\u6bd4\u4f8b\u7684\uff0c\u7ecf\u5e38\u5176\u4e2d\u4e00\u4e2a\u53ef\u80fd\u80fd\u5360\u5230 90% \u591a\u7684\u60c5\u51b5\u3002\u90a3\u4e48\uff0c\u5047\u8bbe\u5982\u679c\u77e5\u9053\u4e4b\u524d\u5f88\u591a\u8df3\u8f6c\u8bed\u53e5\u90fd\u8df3\u4e86\uff0c\u63a5\u4e0b\u6765\u53d1\u751f\u7684\u8df3\u8f6c\u8bed\u53e5\u4e5f\u5927\u6982\u7387\u4f1a\u8df3\u3002

    \u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u8bbe\u8ba1\u4e00\u4e2a\u72b6\u6001\u673a\uff0c\u6709\u56db\u79cd\u7f16\u7801 00(\u5f88\u53ef\u80fd\u8df3) 01(\u5e94\u8be5\u8df3\u5427) 10(\u5e94\u8be5\u4e0d\u8df3\u5427) 11(\u5f88\u53ef\u80fd\u4e0d\u8df3)\uff0c\u5982\u679c\u72b6\u6001\u673a\u5728 00 \u548c 01 \u72b6\u6001\u5c31\u9884\u6d4b\u4e0b\u4e00\u6b21\u4e5f\u8df3\u8f6c\uff0c\u5982\u679c\u72b6\u6001\u673a\u5728 10 \u548c 11 \u5c31\u9884\u6d4b\u4e0b\u4e00\u6b21\u4e0d\u8df3\u8f6c\u3002

    \u800c\u72b6\u6001\u8f6c\u79fb\u662f\u8fd9\u6837\u53d1\u751f\u7684\uff1a

    Note

    \u6211\u77e5\u9053 mkdocs \u5e94\u8be5\u6e32\u4e0d\u4e86 mermaid\uff0c\u4f46\u662f\u6211\u61d2\uff0c\u8bf7\u5927\u5bb6\u8111\u6e32\u4e00\u4e0b\u3002\u3002\u6216\u8005\u770b\u81ea\u5df1\u8001\u5e08 ppt\u3002\u3002\u662f\u4e00\u4e2a\u6709\u56db\u4e2a\u72b6\u6001\u7684\u7ea2\u7ea2\u84dd\u84dd\u7684\u72b6\u6001\u673a

    graph LR\n00 --(\u672c\u6b21\u8df3\u4e86)--> 00\n00 --(\u672c\u6b21\u6ca1\u8df3)--> 01\n01 --(\u672c\u6b21\u8df3\u4e86)--> 00\n01 --(\u672c\u6b21\u6ca1\u8df3)--> 10\n10 --(\u672c\u6b21\u8df3\u4e86)--> 01\n10 --(\u672c\u6b21\u6ca1\u8df3)--> 11\n11 --(\u672c\u6b21\u8df3\u4e86)--> 10\n11 --(\u672c\u6b21\u6ca1\u8df3)--> 11\n

    \u8ba1\u7b97\u9898\u4f1a\u8003\u4f7f\u7528\u8fd9\u6837\u7684 branch prediction\uff0c\u9884\u6d4b\u5931\u8bef\u7684\u6982\u7387\u662f\u591a\u5c11\u3002

    "},{"location":"CS/CA/chap5/","title":"chap5: Thread-level Parallelism","text":""},{"location":"CS/CA/chap5/#_1","title":"\u76ee\u5f55","text":""},{"location":"CS/CA/chap5/#cache","title":"cache \u4e00\u81f4\u6027\u7684\u6982\u5ff5","text":"

    \u4e0d\u77e5\u9053\u600e\u4e48\u63cf\u8ff0\u7684\u4e24\u4e2a\u672f\u8bed

    Note

    \u8ba1\u7ec4\u738b\u9053\u6709\u4e00\u7ae0\u4e13\u95e8\u8bb2\u3002\u5176\u5b83\u8bf7\u901a\u8fc7\u738b\u9053\u5b66\u4e60\uff0c\u8fd8\u6709\u59dc\u8001\u5e08 ppt \u4e5f\u6709\u4e00\u4e2a\u5c0f\u603b\u7ed3\u7684\u8868\u683c\u3002

    \u6982\u5ff5 \u5168\u540d \u7279\u70b9 \u4f18\u70b9 UMA uniform memory access \u6bcf\u4e2a\u8282\u70b9\u5230 memory \u7684\u8bbf\u95ee\u65f6\u95f4\u4e00\u81f4 NUMA non-uniform memory access \u6bcf\u4e2a\u8282\u70b9\u5230 memory \u7684\u8bbf\u95ee\u65f6\u95f4\u4e0d\u4e00\u81f4\uff0c\u5230\u81ea\u5df1\u7684\u5feb\uff0c\u5230\u522b\u4eba\u7684\u6162 \u6269\u5c55\u5230\u66f4\u5927\u89c4\u6a21\u4e0a\u7684\u53ef\u6269\u5c55\u6027\u5f3a

    cache \u4e00\u81f4\u6027\u7684\u672f\u8bed

    \u5982\u679c CPU \u6709\u591a\u4e2a\u6838\uff0c\u6216\u8005\u5982\u679c CPU \u662f\u5206\u5e03\u5f0f\u7684\uff0c\u5b83\u4eec\u5171\u7528\u4e00\u4e2a cache\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u4f7f cache \u5bf9\u6240\u6709\u6838/\u8282\u70b9\u7684\u8bfb\u5199\u4fdd\u6301\u4e00\u81f4\u6027\uff0c\u6bd4\u5982\u4e00\u4e2a\u6838/\u8282\u70b9\u5199\u7684\u4e1c\u897f\u5bf9\u5176\u5b83\u6838/\u8282\u70b9\u53ef\u89c1\uff0c\u5176\u5b83\u6838/\u8282\u70b9\u770b\u89c1\u7684\u90fd\u662f\u6700\u65b0\u7684\u3002

    \u672f\u8bed \u4e00\u53e5\u8bdd\u5b9a\u4e49\uff08\u5728 ppt \u4e0a\u53d1\u73b0\u7684\uff0c\u4f46\u662f\u4e2a\u4eba\u611f\u89c9\u4e0d\u592a\u51c6\u786e\uff09 \u5173\u6ce8\u7684\u65b9\u9762\u662f\uff08\u8fd9\u680f from \u8bfe\u672c\u66f4\u51c6\u786e\uff0c\u4f46\u4e0d\u662f\u4e00\u53e5\u8bdd\u5b9a\u4e49\uff09 coherence Memory accesses executed by each processor were kept in order. reads and writes to the same location consistency Memory accesses among different processors were interleaved. reads and writes wrt other memory locations"},{"location":"CS/CA/chap5/#cache_1","title":"\u8fbe\u6210 cache \u4e00\u81f4\u6027\u4e24\u4e2a\u534f\u8bae","text":"

    Note

    \u806a\u660e\u7684\u8bfb\u8005\u5df2\u7ecf\u53d1\u73b0\u6211\u5df2\u7ecf\u4e0d\u60f3\u5199\u4e86

    Snooping\u534f\u8bae

    Note

    \u8bf7\u901a\u8fc7\u81ea\u5df1\u73ed\u8001\u5e08 ppt \u5b66\u4e60\uff1aMOESI \u72b6\u6001\u673a + \u4f8b\u9898\u8868\u683c \u4e24\u4e2a\u56fe

    Directory\u534f\u8bae

    Note

    \u8bf7\u901a\u8fc7\u81ea\u5df1\u73ed\u8001\u5e08 ppt \u5b66\u4e60: \u4f8b\u9898\u8868\u683c \u4e00\u4e2a\u56fe

    "},{"location":"CS/CPP/course/","title":"Courses \u542c\u8bfe","text":""},{"location":"CS/CPP/course/#cs106bcs106l","title":"\u5173\u4e8eCS106B\u548cCS106L","text":"

    CS106B\u504f\u7b80\u5355\uff0c\u76f8\u5f53\u4e8eZJU\u7684\u6570\u636e\u7ed3\u6784+C++\u7684STL\u7528\u6cd5\u4e00\u5757\u8bb2\uff0c\u53e6\u5916\u518d\u8bb2\u4e00\u4e9bFDS\u7684\u7b97\u6cd5\u3002 CS106L\u662f\u4e13\u95e8\u8bb2C++\u8fdb\u9636\u7279\u6027\u7684\u3002

    \u56e0\u4e3a\u5728\u542cCS106B\u4e4b\u524d\u5b66\u8fc7FDS\uff0cCS106B\u82b1\u4e00\u5929\u901f\u901a\u4e86\u4e00\u4e0b\uff0c\u91cd\u590d\u5185\u5bb9\u6709\u70b9\u591a\uff0c\u622a\u4e0b\u4e86\u4e00\u5e45\u56fe\u3002

    CS106L\u63d0\u4f9b\u7684C++\u5b66\u4e60\u8def\u7ebf\u56fe

    "},{"location":"CS/CPP/course/#zju","title":"ZJU\u8bfe\u7a0b","text":""},{"location":"CS/CPP/course/#_1","title":"\u8bfe\u7a0b\u53c2\u8003\u8d44\u6599","text":"

    CPP Reference Standard C++ CppCon

    "},{"location":"CS/CPP/course/#_2","title":"\u4e0a\u8bfe\u5fc3\u5f97","text":"

    \u6211\u8ddf\u7684\u662fcx\u8001\u5e08\u7684\u73ed\uff0c\u5e94\u8be5\u662f\u6559\u5f97\u6700\u597d\u7684\u4e00\u6863orz \u4f46\u662f\u4e0a\u8bfe\u5185\u5bb9\u4ecd\u4e0d\u80fd\u8986\u76d6\u4f5c\u4e1a\u548c\u671f\u672b\u7684\u5185\u5bb9\uff0c\u89c9\u5f97\u542c\u8bfe\u5185\u5bb9\u53ea\u80fd\u8d77\u5230\u4e00\u4e2a\u9aa8\u67b6\u4f5c\u7528\uff0c\u8bfe\u540e\u9700\u8981\u82b1\u4e0a\u8bfe2\u81f33\u500d\u7684\u65f6\u95f4\u81ea\u5b66\u81ea\u5df1\u6574\u7406\u7b14\u8bb0\uff0c\u591a\u8bfb\u591a\u5199\u4ee3\u7801\uff0c\u4e0d\u7136\u671f\u672b\u4f1a\u9047\u5230\u6ca1\u89c1\u8fc7\u7684\u7279\u6027\uff0c\u4f1a\u6709\u70b9\u60e8orz\uff08\u50cf\u6211\u4e00\u6837\uff09

    "},{"location":"CS/CPP/course/#_3","title":"\u9762\u5411\u5bf9\u8c61\u56db\u5927\u7279\u6027","text":""},{"location":"CS/CPP/course/#_4","title":"\u7c7b\u548c\u5bf9\u8c61/\u6784\u9020\u51fd\u6570\u548c\u6790\u6784\u51fd\u6570","text":""},{"location":"CS/CPP/course/#class-struct","title":"class \u4e0e struct \u7684\u6bd4\u8f83","text":""},{"location":"CS/CPP/course/#_5","title":"\u7c7b\u7684\u7ed3\u6784\uff1a\u6570\u636e\u6210\u5458\u548c\u6210\u5458\u51fd\u6570","text":""},{"location":"CS/CPP/course/#_6","title":"\u7c7b\u7684\u58f0\u660e\u683c\u5f0f","text":"
    class Name\n{\n    public:\n        public_data;\n        public_functions;\n    protected:\n        protected_data;\n        protected_functions;\n    private:\n        private_data;\n        private_functions;\n}\n
    "},{"location":"CS/CPP/course/#_7","title":"\u4e60\u60ef","text":""},{"location":"CS/CPP/course/#_8","title":"\u7c7b\u5916\u5b9a\u4e49","text":"

    \u8fd4\u56de\u7c7b\u578b \u7c7b\u540d::\u6210\u5458\u51fd\u6570\u540d\uff08\u53c2\u6570\u8868\uff09 { // \u51fd\u6570\u4f53 }

    "},{"location":"CS/CPP/course/#_9","title":"\u5185\u8054\u51fd\u6570\u548c\u5916\u8054\u51fd\u6570","text":""},{"location":"CS/CPP/course/#_10","title":"\u5bf9\u8c61","text":"

    \u53ef\u4ee5\u628a\u76f8\u540c\u6570\u636e\u7ed3\u6784\u548c\u76f8\u540c\u64cd\u4f5c\u96c6\u7684\u5bf9\u8c61\u770b\u4f5c\u5c5e\u4e8e\u540c\u4e00\u7c7b\u3002\u5bf9\u8c61\u662f\u7c7b\u7684\u5b9e\u4f8b\u3002

    "},{"location":"CS/CPP/course/#_11","title":"\u5bf9\u8c61\u7684\u5b9a\u4e49","text":""},{"location":"CS/CPP/course/#_12","title":"\u5bf9\u8c61\u4e2d\u6210\u5458\u7684\u8bbf\u95ee","text":"

    \u5bf9\u8c61\u540d.\u6570\u636e\u6210\u5458\u540d\uff08\u662f \u5bf9\u8c61\u540d.\u7c7b\u540d::\u6210\u5458\u540d \u7684\u7f29\u5199\uff09 \u5bf9\u8c61\u540d.\u6210\u5458\u51fd\u6570\u540d\uff08\u53c2\u6570\u8868\uff09

    class Sample\n{\npublic:\nint k;\nint geti(){return i;}\nint getj(){return j;}\nint getk(){return k;}\nprivate:\nint i;\nprotected:\nint j;\n};\nint main()\n{\nSample a;\na.i;        // \u975e\u6cd5\na.j:        // \u975e\u6cd5\na.k;        // \u5408\u6cd5\n}\n

    "},{"location":"CS/CPP/course/#_13","title":"\u7c7b\u7684\u4f5c\u7528\u57df","text":""},{"location":"CS/CPP/course/#_14","title":"\u6784\u9020\u51fd\u6570\u4e0e\u6790\u6784\u51fd\u6570","text":"

    \u7c7b\u7684\u6784\u9020\u51fd\u6570\u662f\u7c7b\u7684\u4e00\u4e2a\u7279\u6b8a\u6210\u5458\u51fd\u6570\uff0c\u6ca1\u6709\u8fd4\u56de\u7c7b\u578b\uff08\u4e0d\u662fvoid\uff09\uff0c\u53ef\u4ee5\u6709\u53c2\u6570\uff0c\u51fd\u6570\u540d\u548c\u7c7b\u540d\u4e00\u6837\u3002\u5f53\u521b\u5efa\u7c7b\u7684\u4e00\u4e2a\u65b0\u5bf9\u8c61\u65f6\uff0c\u81ea\u52a8\u8c03\u7528\u6784\u9020\u51fd\u6570\uff0c\u5b8c\u6210\u521d\u59cb\u5316\u5de5\u4f5c\u3002

    "},{"location":"CS/CPP/course/#namespace","title":"Namespace","text":""},{"location":"CS/CPP/course/#namespace_1","title":"\u4ec0\u4e48\u662fnamespace\uff1f","text":"

    \u662f\u5355\u4e00\u7684\u5168\u5c40\u540d\u5b57\u7a7a\u95f4\u3002\u9632\u6b62\u5728\u4e00\u4e2a\u7a7a\u95f4\u4e2d\u76f8\u540c\u7684\u540d\u5b57\u5f15\u8d77\u51b2\u7a81\u3002 \u4f8b\u5b50\uff1a

    namespace myown1\n{\nstring user_name = \"myown1\";\n}\nnamespace myown2\n{\nstring user_name = \"myown2\";\n}\nint main()\n{\n// using namespace myown1; \ncout << \"\\\\n\" << \"Hello, \"\n<< myown1::user_name\n<< \"...and goodbye!\\\\n\"\ncout << \"\\\\n\" << \"Hello, \"\n<< myown2::user_name\n<< \"...and goodbye!\\\\n\"\nreturn 0;\n}\n

    \u5173\u952e\u8bcdusing\u5c06\u4e00\u4e2a\u540d\u5b57\u7a7a\u95f4\u53d8\u4e3a\u53ef\u89c1\uff0c\u4e0d\u4f1a\u8986\u76d6\u5f53\u524d\u7684namespace\u3002

    "},{"location":"CS/CPP/course/#_15","title":"\u7ee7\u627f\u4e0e\u6d3e\u751f\u7c7b","text":" \u76ee\u7684 \u4ee3\u7801\u7684\u91cd\u7528\u548c\u4ee3\u7801\u7684\u6269\u5145 \u7ee7\u627f\u79cd\u7c7b \u5355\u7ee7\u627f/\u591a\u7ee7\u627f \u7ee7\u627f\u5185\u5bb9 \u9664\u6784\u9020\u51fd\u6570/\u6790\u6784\u51fd\u6570/\u79c1\u6709\u6210\u5458\u5916\u7684\u6240\u6709\u6210\u5458"},{"location":"CS/CPP/course/#_16","title":"\u7ee7\u627f\u7684\u8bbf\u95ee\u63a7\u5236","text":"

    \u6d3e\u751f\u7c7b\u7ee7\u627f\u4e86\u57fa\u7c7b\u4e2d\u9664\u6784\u9020\u51fd\u6570\u548c\u6790\u6784\u51fd\u6570\u4e4b\u5916\u7684\u6240\u6709\u6210\u5458\u3002\u6d3e\u751f\u7c7b\u7684\u6210\u5458\u5305\u62ec\uff1a - \u7ee7\u627f\u57fa\u7c7b\u7684\u6210\u5458 - \u6d3e\u751f\u7c7b\u5b9a\u4e49\u65f6\u58f0\u660e\u7684\u6210\u5458

    \u4ece\u5df2\u6709\u7c7b\u6d3e\u751f\u51fa\u65b0\u7c7b\u65f6\uff0c\u53ef\u4ee5\u5728\u6d3e\u751f\u7c7b\u5185\u5b8c\u6210\u4ee5\u4e0b\u51e0\u79cd\u529f\u80fd\uff1a - \u589e\u52a0\u65b0\u7684\u6570\u636e\u6210\u5458 - \u589e\u52a0\u65b0\u7684\u6210\u5458\u51fd\u6570 - \u91cd\u65b0\u5b9a\u4e49\u57fa\u7c7b\u4e2d\u5df2\u6709\u7684\u6210\u5458\u51fd\u6570 - \u53ef\u4ee5\u6539\u53d8\u73b0\u6709\u6210\u5458\u7684\u5c5e\u6027

    \u58f0\u660e\u4e00\u4e2a\u6d3e\u751f\u7c7b\u7684\u4e00\u822c\u683c\u5f0f

    class \u6d3e\u751f\u7c7b\u540d:\u7ee7\u627f\u65b9\u5f0f \u57fa\u7c7b\u540d\n{\n// \u6d3e\u751f\u7c7b\u65b0\u589e\u7684\u6570\u636e\u6210\u5458\u548c\u6210\u5458\u51fd\u6570\n};\n

    \u4e09\u79cd\u7ee7\u627f\u65b9\u5f0f

    class employee: public person\n{};\n// default\nclass employee: private person\n{};\nclass employee: protected person\n{};\n

    \u57fa\u7c7b\u6210\u5458\u5728\u6d3e\u751f\u7c7b\u4e2d\u7684\u8bbf\u95ee\u5c5e\u6027

    \u5728\u57fa\u7c7b\u4e2d\u7684\u8bbf\u95ee\u5c5e\u6027 \u7ee7\u627f\u65b9\u5f0f \u5728\u6d3e\u751f\u7c7b\u4e2d\u7684\u8bbf\u95ee\u5c5e\u6027 \u89e3\u91ca private public inaccessible \u57fa\u7c7b\u4e2dprivate\u7684\u5bf9\u8c61\u5728\u7c7b\u5916\u5f53\u7136\u4e0d\u53ef\u8bbf\u95ee private private inaccessible private protected inaccessible public public public \u57fa\u7c7b\u4e0d\u7ba1 public private private public protected protected protected public protected \u6743\u9650\u4f1a\u88ab\u7ee7\u627f\u65b9\u5f0f\u7f29\u5c0f\u800c\u4e0d\u4f1a\u653e\u5927 protected private private protected protected protected

    \u6d3e\u751f\u7c7b\u5bf9\u57fa\u7c7b\u7684\u8bbf\u95ee\u89c4\u5219 - \u5185\u90e8\u8bbf\u95ee\uff1a\u7531\u6d3e\u751f\u7c7b\u4e2d\u65b0\u589e\u6210\u5458\u5bf9\u57fa\u7c7b\u7ee7\u627f\u6765\u7684\u6210\u5458\u7684\u8bbf\u95ee\u3002 - \u5bf9\u8c61\u8bbf\u95ee\uff1a\u5728\u6d3e\u751f\u7c7b\u5916\u90e8\uff0c\u901a\u8fc7\u6d3e\u751f\u7c7b\u7684\u5bf9\u8c61\u5bf9\u4ece\u57fa\u7c7b\u7ee7\u627f\u6765\u7684\u6210\u5458\u7684\u8bbf\u95ee\u3002

    \u57fa\u7c7b\u6210\u5458 private\u6210\u5458 public\u6210\u5458 protected\u6210\u5458 \u5185\u90e8\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee \u53ef\u8bbf\u95ee \u53ef\u8bbf\u95ee \u5bf9\u8c61\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee

    \u79c1\u6709\u7ee7\u627f\u4e3e\u4f8b

    class Point\n{\npublic:\nvoid InitP(float x = 0, float y = 0)\n{\nthis->X = x;\nthis->Y = y;\n}\nvoid Move(float offX, float offY)\n{\nX += offX;\nY += offY;\n}\nfloat GetX() const{return X;}\nfloat GetY() const{return Y;}\nprivate:\nfloat X, Y;\n};\nclass Rectangle: private Point // \u6d3e\u751f\u7c7b\u58f0\u660e\n{\npublic: //\u65b0\u589e\u5916\u90e8\u63a5\u53e3\nvoid InitR(float x, float y, float w, float h)\n{\nInitR(x, y);\nW = w;\nH = h;\n} // \nvoid Move(float xOff, float yOff)\n{\nPoint::\n}\n}\n

    "},{"location":"CS/CPP/final_review/","title":"ZJU \u671f\u672b\u590d\u4e60","text":"

    \u9762\u5411\u671f\u672b\u9898\u7684\u76f8\u4f3c\u77e5\u8bc6\u70b9\u805a\u7c7b

    "},{"location":"CS/CPP/final_review/#_1","title":"\u6784\u9020\u987a\u5e8f","text":"

    \uff081\uff09main\u51fd\u6570\u4ee5\u5916\u7684\u5bf9\u8c61\uff0c\u5168\u5c40\u7c7b\u5b9a\u4e49\u540e\u76f4\u63a5\u5b9a\u4e49\u7684\u7c7b\u5bf9\u8c61 \uff082\uff09main\u51fd\u6570\u5185\u7684\u5bf9\u8c61 \uff083\uff09\u7236\u7c7b\u6784\u9020 \uff084\uff09\u5b50\u7c7b\u7c7b\u6210\u5458 \uff085\uff09\u5b50\u7c7b\u6784\u9020 \u6790\u6784\u987a\u5e8f\u76f8\u53cd

    "},{"location":"CS/CPP/final_review/#_2","title":"\u4ec0\u4e48\u65f6\u5019\u751f\u6210\u9ed8\u8ba4\u6784\u9020\u51fd\u6570\uff1f","text":"

    \u5982\u679c\u5df2\u7ecf\u6709\u6784\u9020\u51fd\u6570\uff0c\u7f16\u8bd1\u5668\u4e0d\u4f1a\u751f\u6210\u9ed8\u8ba4\u6784\u9020\u51fd\u6570 \u6ca1\u6709\u7684\u65f6\u5019\u4e5f\u4e0d\u4e00\u5b9a\u4f1a\u751f\u6210 \u9700\u8981\u7528\u624d\u751f\u6210

    "},{"location":"CS/CPP/final_review/#_3","title":"\u91cd\u8f7d\u89c4\u5219","text":"

    \u4e0d\u80fd\u91cd\u8f7d\u7684\u6709\uff1a - \u4f5c\u7528\u57df\u64cd\u4f5c\u7b26:: - \u6761\u4ef6\u64cd\u4f5c\u7b26?:\uff08\u5e94\u8be5\u662f\u95ee\u53f7\u8868\u8fbe\u5f0f\uff1f\uff09 - \u70b9\u64cd\u4f5c\u7b26\u3001\u7c7b\u6210\u5458\u6307\u9488 - \u9884\u5904\u7406\u7b26\u53f7#

    \u53ea\u80fd\u91cd\u8f7d\u4e3a\u53cb\u5143\u4e0d\u80fd\u6210\u5458\u51fd\u6570\uff1a - <<\u548c>> \u539f\u56e0\u662f\u6210\u5458\u51fd\u6570\u91cd\u8f7d\uff0c\u53ea\u80fd\u5e26\u4e00\u4e2a\u53c2\u6570\uff0clhs\u5fc5\u987b\u662f\u6210\u5458\u81ea\u8eab

    \u4f46\u662f\u6d41\u64cd\u4f5c\u7b26\u5de6\u8fb9\u662fcin\u6216cout\uff0c\u91cd\u8f7d\u4e3a\u53cb\u5143\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u6bd4\u6210\u5458\u51fd\u6570\u591a\u8bf4\u660e\u4e00\u4e2a\u5f62\u53c2\u505alhs

    \u91cd\u8f7d\u548c\u91cd\u5199\u90fd\u662f\u591a\u6001\uff1a \u91cd\u8f7d\uff1a\u8fd0\u884c\u65f6\u591a\u6001 \u91cd\u5199\uff1a\u7f16\u8bd1\u65f6\u591a\u6001

    static\u548cvirtual\u53ea\u80fd\u6709\u4e00\u4e2a

    \u6790\u6784\u51fd\u6570\u4e0d\u80fd\u5e26\u53c2\u6570

    "},{"location":"CS/CPP/final_review/#_4","title":"\u5b50\u7c7b\u548c\u7236\u7c7b\u6307\u9488","text":""},{"location":"CS/CPP/final_review/#static_castdynamic_cast","title":"static_cast\u548cdynamic_cast","text":""},{"location":"CS/CPP/final_review/#_5","title":"\u5f15\u7528","text":"

    \u4ec0\u4e48\u65f6\u5019\u5fc5\u987b\u7528\u5e38\u5f15\u7528\uff08const &\uff09\uff1a\u5f15\u7528\u578b\u53c2\u6570\u5e94\u5f53\u5728\u80fd\u5b9a\u4e49\u4e3aconst\u7684\u60c5\u51b5\u4e0b\u5c3d\u91cf\u5b9a\u4e49\u4e3aconst\u3002

    \u4f7f\u7528\u5f15\u7528\u7684\u4e3b\u8981\u539f\u56e0\uff1a \u7a0b\u5e8f\u80fd\u591f\u4fee\u6539\u8c03\u7528\u51fd\u6570\u4e2d\u7684\u6570\u636e\u5bf9\u8c61 \u901a\u8fc7\u4f20\u9012\u5f15\u7528\u800c\u4e0d\u662f\u6574\u4e2a\u6570\u636e\u5bf9\u8c61\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6

    \u53ea\u4f7f\u7528\u4f20\u9012\u8fc7\u6765\u7684\u503c\u800c\u4e0d\u4fee\u6539 \u9700\u8981\u4fee\u6539\u4f20\u9012\u8fc7\u6765\u7684\u503c \u5185\u7f6e\u6570\u636e\u7c7b\u578b\uff08\u5c0f\u578b\u7ed3\u6784\uff09 \u6309\u503c\u4f20\u9012 \u6307\u9488\u4f20\u9012 \u6570\u7ec4 \u6307\u9488\u4f20\u9012 \u6307\u9488\u4f20\u9012 \u8f83\u5927\u7684\u7ed3\u6784\uff09 \u6307\u9488\u6216\u5f15\u7528 \u6307\u9488\u6216\u5f15\u7528 \u7c7b/\u5bf9\u8c61 \u5f15\u7528\u4f20\u9012 \u5f15\u7528\u4f20\u9012

    \u5f15\u7528\u548c\u6307\u9488\u7684\u533a\u522b\uff1a \u53ef\u4ee5\u628a\u5f15\u7528\u7406\u89e3\u6210\u4e00\u4e2a\u5e38\u91cf\u6307\u9488\uff0c\u56e0\u6b64\u5f15\u7528\u58f0\u660e\u65f6\u5c31\u5fc5\u987b\u521d\u59cb\u5316\uff0c\u4e00\u7ecf\u58f0\u660e\u4e0d\u80fd\u518d\u548c\u5176\u5b83\u5bf9\u8c61\u7ed1\u5b9a\u3002

    Copy constructor must pass its first argument by reference

    "},{"location":"CS/CPP/final_review/#_6","title":"\u7c7b\u5185\u9759\u6001\u6210\u5458\u7684\u521d\u59cb\u5316","text":"

    const static\u53ef\u4ee5\u5728\u7c7b\u5185\u76f4\u63a5\u521d\u59cb\u5316\uff0c\u975econst static\u6210\u5458\u9700\u8981\u5728\u7c7b\u5916\u521d\u59cb\u5316\u3002

    \u53ef\u4ee5\u8c03\u7528\u9ed8\u8ba4\u521d\u59cb\u5316A::n\uff0c\u81ea\u52a8\u521d\u59cb\u5316\u4e3a0\u3002\u6b64\u65f6\u8c03\u7528\u9ed8\u8ba4\u6784\u9020\u4e0d\u80fd\u7528n()\uff0c\u5426\u5219\u8ba4\u4e3a\u662f\u4e2a\u51fd\u6570\u3002\u6216\u8005\u5e26\u521d\u59cb\u503c\u521d\u59cb\u5316A::n(9)

    static\u548cconst - \u6ca1\u6709static\u5c31\u662fconst\u7684\u8bf4\u6cd5

    const\u7684\u51e0\u79cd\u5f62\u5f0f

    const int& fun(int& a); // \u4fee\u9970\u8fd4\u56de\u503c \nint& fun(const int& a); // \u4fee\u9970\u5f62\u53c2 \nint& fun(int& a) const {} // const\u6210\u5458\u51fd\u6570\n

    const\u8fd4\u56de\u503c\uff1a\u662f\u4fee\u9970\u8fd4\u56de\u503c\u5f15\u7528\u7c7b\u578b\u7684\u65f6\u5019\uff0c\u4e3a\u4e86\u907f\u514d\u8fd4\u56de\u503c\u88ab\u4fee\u6539\u7684\u60c5\u51b5

    \u8fd4\u56de\u503c\u662f\u5f15\u7528\u7684\u51fd\u6570\uff0c\u8fd9\u4e2a\u5f15\u7528\u5fc5\u7136\u4e0d\u662f\u4e34\u65f6\u5bf9\u8c61\u7684\u5f15\u7528\uff0c\u4e00\u5b9a\u662f\u6210\u5458\u53d8\u91cf\u6216\u8005\u51fd\u6570\u53c2\u6570\u3002\uff08\u53ea\u8981\u53c2\u6570\u4e0d\u9700\u8981\u4fee\u6539\u4e00\u5b9a\u52a0\u4e0aconst\uff09

    const\u53c2\u6570\u5fc5\u987b\u4f20\u7b7e\u540d\u540e\u5e26const\u7684\u51fd\u6570\uff1a\u8981\u628athis\u6307\u9488\u53d8\u6210const

    \u600e\u6837\u6784\u6210\u91cd\u8f7d - \u4e0d\u91cd\u8f7d\u7684

    const int& fun(int& a); // \u53c2\u6570\u5217\u8868\u6ca1\u6709\u53d8 \nint& fun(const int a); // \u56e0\u4e3a\u662f\u503c\u4f20\u9012\uff0c\u4e0d\u662fconst\u7684\u4e5f\u80fdtype conversion\n

    "},{"location":"CS/CPP/final_review/#inline-function","title":"inline function","text":"

    \u4ee3\u66ff\u5b8f\u7684\u4e00\u79cd\u64cd\u4f5c\uff0c\u5728\u7f16\u8bd1\u9636\u6bb5\u628a\u6240\u6709\u51fd\u6570\u540d\u66ff\u6362\u6210inline function\u7684\u5b9e\u73b0 \u6bd4\u51fd\u6570\u7684\u4f18\u70b9\uff1a\u4e0d\u7528\u9891\u7e41\u8fdb\u6808\u51fa\u6808 \u6bd4\u5b8f\u7684\u4f18\u70b9\uff1a\u6709\u7c7b\u578b\u68c0\u67e5\uff0c\u80fd\u5199\u591a\u884c\uff0c\u80fd\u64cd\u4f5c\u7c7b\u7684\u79c1\u6709\u6210\u5458 inline\u5173\u952e\u5b57\u53ea\u6709\u51fa\u73b0\u5728\u51fd\u6570\u7684\u5b9a\u4e49\u800c\u4e0d\u662f\u58f0\u660e\u524d\u65f6\u624d\u6709\u7528\u3002 \u9759\u6001\u7ed1\u5b9a\u00a0Static\u00a0Binding \u3002\u80fd\u591f\u660e\u786e\u8fd0\u884c\u7684\u662f\u54ea\u4e2a\u7c7b\u7684\u65b9\u6cd5\u65f6\u4f1a\u53d1\u751f\u9759\u6001\u7ed1\u5b9a \u3002\u53d1\u751f\u5728\u7f16\u8bd1\u65f6\u523b\uff0c\u6240\u4ee5\u53c8\u53eb\u65e9\u7ed1\u5b9a \u52a8\u6001\u7ed1\u5b9aDynamic\u00a0Binding \u3002\u51fa\u73b0\u591a\u6001\uff0c\u7f16\u8bd1\u5668\u4e0d\u80fd\u660e\u786e\u5230\u5e95\u4f7f\u7528\u54ea\u4e2a\u7c7b\u7684\u65b9\u6cd5\u65f6\u53d1\u751f\u52a8\u6001\u7ed1\u5b9a \u3002\u53d1\u751f\u5728\u8fd0\u884c\u65f6\u523b\uff0c\u6240\u4ee5\u53c8\u53eb\u665a\u7ed1\u5b9a \u3002\u53ea\u6709\u5b58\u5728\u00a0virtual\u00a0\u65e6\u901a\u8fc7\u6307\u9488\u8bbf\u95ee\u65f6\uff0c\u624d\u4f1a\u53d1\u751f\u52a8\u6001\u7ed1\u5b9a

    static binding \u7f16\u8bd1\u65f6

    class Animal { public: void eat() { cout << \"Animal eats\" << endl; } }; class Dog : public Animal { public: void eat() { cout << \"Dog eats\" << endl; } };\n

    dynamic binding \u8fd0\u884c\u65f6

    class Animal { public: virtual void eat() { cout << \"Animal eats\" << endl; } }; class Dog : public Animal { public: void eat() { cout << \"Dog eats\" << endl; } };\n
    \u200b

    \u5728\u4e0b\u9762\u7684\u60c5\u51b5\u4e0b\uff0c\u6784\u9020\u51fd\u6570\u4f1a\u88ab\u8c03\u7528\uff1a - \u5bf9\u4e8e\u5168\u5c40\u5bf9\u8c61\uff0c\u5728main()\u4e24\u6570\u8fd0\u884c\u4e4b\u524d\uff0c\u6216\u8005\u5728\u540c\u4e00\u4e2a\u7f16\u8bd1\u5355\u5143\u5185\u5b9a\u4e49\u7684\u4efb\u4e00\u51fd\u6570\u6216\u5bf9\u8c61 \u88ab\u4f7f\u7528\u4e4b\u524d\u3002\u5728\u540c\u4e00\u4e2a\u7f16\u8bd1\u5355\u5143\u5185\uff0c\u5b83\u4eec\u7684\u6784\u9020\u4e24\u6570\u6309\u7167\u58f0\u660e\u7684\u987a\u5e8f\u521d\u59cb\u5316\u3002 - \u5bf9\u4e8e static\u00a0local\u00a0variables\uff0c\u00a0\u5728\u7b2c\u4e00\u6b21\u8fd0\u884c\u5230\u5b83\u7684\u58f0\u660e\u7684\u65f6\u5019. - \u5bf9\u4e8e automatic\u00a0storage\u00a0duration\u00a0\u7684\u5bf9\u8c61\uff0c\u5728\u5176\u58f0\u660e\u88ab\u8fd0\u884c\u65f6\u3002 - \u5bf9\u4e8e dynamic\u00a0storage\u00a0duration\u00a0\u7684\u5bf9\u8c61\uff0c\u5728\u5176\u7528\u00a0new\u00a0\u8868\u8fbe\u5f0f\u521b\u5efa\u65f6\u3002

    "},{"location":"CS/CPP/final_review/#_7","title":"\u667a\u80fd\u6307\u9488","text":"
    std::unique_ptr<T> //\u72ec\u5360\u8d44\u6e90\u6240\u6709\u6743\u7684\u6307\u9488\u3002 \nstd::shared_ptr<T> //\u5171\u4eab\u8d44\u6e90\u6240\u6709\u6743\u7684\u6307\u9488\u3002 \nstd::weak_ptr<T> //\u5171\u4eab\u8d44\u6e90\u7684\u89c2\u5bdf\u8005\uff0c\u9700\u8981\u548cstd::shared_ptr \u4e00\u8d77\u4f7f\u7528\uff0c\u4e0d\u5f71\u54cd\u8d44\u6e90\u7684\u751f\u547d\u5468\u671f\u3002\n

    \u4f7f\u7528\u88f8\u6307\u9488 \u6240\u4ee5\u9ed8\u8ba4\u53c2\u6570\u662f\u548c\u865a\u8868\u65e0\u5173\u4e0e\u5f53\u524d\u7c7b\u578b\u6709\u5173\u5417 \u662f\u7684 \u9ed8\u8ba4\u53c2\u6570\u4e0d\u8fdb\u865a\u8868 \u2192 upcasting\u7684\u65f6\u5019

    "},{"location":"CS/CPP/final_review/#upcasting","title":"upcasting","text":""},{"location":"CS/CPP/templates/","title":"\u6a21\u677fTemplate \u548c \u6807\u51c6\u6a21\u677f\u5e93STL","text":"

    \u9700\u6c42\uff1a\u8ba9\u6211\u4eec\u7684\u4ee3\u7801\u72ec\u7acb\u4e8e\u5177\u4f53\u7684\u7c7b\u578b\u5de5\u4f5c\u3002

    \u6211\u4eec\u5199\u51fa\u4e00\u4e2a\u9002\u7528\u4e8e\u6240\u6709\u7c7b\u578b\u7684\u6570\u636e\u7ed3\u6784\u7684\u7c7b\u6216\u7b97\u6cd5\uff08\u51fd\u6570\uff09\uff0c\u5728\u771f\u6b63\u9700\u8981\u4f7f\u7528\u65f6\u751f\u6210\u4e00\u4e2a\u9002\u7528\u4e8e\u6240\u9700\u7c7b\u578b\u7684\u5b9e\u4f8b\u3002\u8fd9\u79cd\u7f16\u7a0b\u8303\u5f0f\u79f0\u4e3a\u8303\u578b\u7f16\u7a0b\u3002

    \u6a21\u677f\u7c7b\u7684\u5199\u6cd5

    template<typename T>\nclass Container{\nT *data;\nunsigned size, capa;\npiblic:\nContainer(unsigned capa = 512): data(new T[capa]){}\n~Container() {delete[] data;}\nT& operator[](unsigned index) {return data[index];}\n}\n

    \u8fd9\u91cctemplate T\u8868\u660e\u5b83\u63a5\u53d7\u4e00\u4e2a\u7c7b\u578b\u4f5c\u4e3a\u53c2\u6570\uff0c\u540d\u5b57\u662fT\u3002\u5728\u6a21\u677f\u7684\u5b9a\u4e49\u5185\u90e8\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5230\u8fd9\u4e2a\u7c7b\u578b\u53d8\u91cfT\u3002

    \u7279\u5316\uff1a\u6839\u636e\u6a21\u677f\u751f\u6210\u5b9e\u9645\u7684\u7c7b\u7684\u8fc7\u7a0b

    Container<int> ci;\nContainer<double> cd;\n

    \u6a21\u677f\u51fd\u6570\u8981\u600e\u4e48\u5199

    template<typename T>\nT abs(T x) {return x>0?x:-x;}\n

    \u6a21\u677f\u8fd0\u7b97\u7b26\u91cd\u8f7d\u600e\u4e48\u5199

    template<typename T>\nclass Container {\nT* data;\nunsigned size = 0, capa;\npublic: Container(unsigned capa = 512) : data(new T[capa]), capa(capa){}\n~Container(){delete[] data;}\nT& operator[](unsigned index) {return data[index];}\nconst T& operator[](unsigned idnex) const {return data[index];}\nunsigned getSize() const {return size;}\nunsigned getCapa() const {return capa;}\nContainer &add(T val){\ndata[size++] = val;\nreturn *this;\n}\n};\ntemplate<typename T>\nostream & operator<<(ostream& os, const Container<T>&c){\nfor (unsigned i = 0; i < c.getSize(); i++){\nos << c[i] << ' ';\nreturn os;\n}\n}\n

    "},{"location":"CS/CPP/templates/#reference","title":"Reference","text":"

    7 \u6a21\u677f (I) - \u57fa\u672c\u77e5\u8bc6\u4e0e STL \u4f7f\u7528 - \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4

    "},{"location":"CS/CPP/templates/#template","title":"\u53ef\u53d8\u53c2\u6570\u6a21\u677f template

    C++11\u7684\u65b0\u7279\u6027 \u5bf9\u53c2\u6570\u9ad8\u5ea6\u6cdb\u5316\uff0c\u53ef\u4ee5\u8868\u793a0\u5230\u4efb\u610f\u4e2a\u4efb\u610f\u7c7b\u578b\u7684\u53c2\u6570\u3002

    \u8bed\u6cd5

    template <class ...T>  // \u58f0\u660e\u4e00\u4e2a\u53c2\u6570\u5305\uff0c\u8fd9\u4e2a\u53c2\u6570\u5305\u4e2d\u5305\u542b0\u5230\u4efb\u610f\u4e00\u4e2a\u53c2\u6570\u6a21\u677f\nvoid f(T... args);     // \u5728\u6a21\u677f\u5b9a\u4e49\u7684\u53f3\u8fb9\uff0c\u53ef\u4ee5\u5c06\u53c2\u6570\u5305\u5c55\u5f00\u6210\u4e00\u4e2a\u4e00\u4e2a\u72ec\u7acb\u53c2\u6570\n

    \u6700\u5927\u7684\u96be\u70b9\uff1a\u5982\u4f55\u5c55\u5f00\u53ef\u53d8\u6a21\u677f\u53c2\u6570

    \u6253\u5370\u53c2\u6570\u4e2a\u6570\uff1a

    template<class ...T>\nvoid f(T... args)\n{\n        cout << sizeof...(args) << endl;\n}\n\nf();\nf(1, 2);\nf(1, 2.5, \"\");\n

    \u9012\u5f52\u65b9\u5f0f\u5c55\u5f00\u53c2\u6570\u5305

    #include <iostream>\nusing namespace std;\n\n// \u9012\u5f52\u7ec8\u6b62\u51fd\u6570\nvoid print(){\n    cout << \"empty\" << endl;\n}\n\n// \u5c55\u5f00\u51fd\u6570\ntemplate<class T, class ...Args>\nvoid print(T head, Args... rest){\n    cout << \"parameter\" << head << endl;\n    print(rest...);\n}\n\nint main(){\n    print(1, 2, 3, 4);\n    return 0;\n}\n

    \u4e0a\u8ff0\u4f8b\u5b50\u4f1a\u8f93\u51fa\u6bcf\u4e00\u4e2a\u53c2\u6570\uff0c\u76f4\u5230\u7a7a\u65f6\u8f93\u51faempty\u3002\u5c55\u5f00\u53c2\u6570\u5305\u7684\u51fd\u6570\u6709\u4e24\u4e2a\uff0c\u4e00\u4e2a\u662f\u9012\u5f52\u51fd\u6570\uff0c\u53e6\u4e00\u4e2a\u662f\u9012\u5f52\u7ec8\u6b62\u51fd\u6570\uff0c\u53c2\u6570\u5305Args\u2026\u5728\u5c55\u5f00\u7684\u8fc7\u7a0b\u4e2d\u9012\u5f52\u8c03\u7528\u81ea\u5df1\uff0c\u6bcf\u8c03\u7528\u4e00\u6b21\uff0c\u53c2\u6570\u5305\u4e2d\u7684\u53c2\u6570\u5c31\u5c11\u4e00\u4e2a\uff0c\u76f4\u5230\u6240\u6709\u53c2\u6570\u90fd\u5c55\u5f00\u4e3a\u6b62\u3002\u5f53\u6ca1\u6709\u53c2\u6570\u65f6\uff0c\u5219\u8c03\u7528\u975e\u6a21\u677f\u51fd\u6570print()\u7ec8\u6b62\u9012\u5f52\u8fc7\u7a0b\u3002

    \u7ec8\u6b62\u51fd\u6570\u4e5f\u53ef\u4ee5\u5199\u6210

    template<class T>\nvoid print(T t){\n    cout << t << endl;\n}\n

    \u53ef\u53d8\u6a21\u677f\u53c2\u6570\u6c42\u548c

    template<typename T>\nT sum(T t){\n    return t;\n}\ntemplate<typename T, typename ... Types>\nT sum(T first, Types ...rest){\n    return first + sum<T> (rest...);\n}\n\nsum(1, 2, 3, 4);\n

    \u9012\u5f52\u51fd\u6570\u5c55\u5f00\u53c2\u6570\u5305\u662f\u4e00\u79cd\u6807\u51c6\u505a\u6cd5\uff0c\u4e5f\u6bd4\u8f83\u597d\u7406\u89e3\uff0c\u4f46\u662f\u7f3a\u70b9\u65f6\u5fc5\u987b\u8981\u4e00\u4e2a\u91cd\u8f7d\u7684\uff08\u540c\u540d\uff09\u9012\u5f52\u7ec8\u6b62\u51fd\u6570\u6765\u7ec8\u6b62\u9012\u5f52\u3002

    \u6216\u8005\u4e0d\u9012\u5f52\u65b9\u5f0f\uff0c\u8fd9\u79cd\u65b9\u5f0f\u9700\u8981\u501f\u52a9\u9017\u53f7\u8868\u8fbe\u5f0f\u548c\u521d\u59cb\u5316\u5217\u8868\u3002\u524d\u9762\u7684print\u53ef\u4ee5\u8fd9\u4e48\u5199

    template<class T>\nvoid printarg(T t){\n    cout << t << endl;\n}\n\ntemplate <class ...Args>\nvoid expand(Args... args){\n    int arr[] = {(printarg(args), 0)...};\n}\n\nexpand(1, 2, 3, 4);\n

    arr\u8fd9\u4e2a\u6570\u7ec4\u7684\u76ee\u7684\u5355\u7eaf\u662f\u5c55\u5f00\u53c2\u6570\u5305

    \u5982\u679c\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u5c31\u53ef\u4ee5\u652f\u6301lambda\u8868\u8fbe\u5f0f

    template<class F, class... Args> void expand(const F& f, Args&&...args){\ninitializer_list<int>{(f(std::forward< Args>(args)), 0)};\n}\nexpand([](int i){cout << i << endl;}, 1,2,3);\n

    \u53ef\u4ee5\u5e26\u4efb\u610f\u4e2a\u6570\u4e0d\u540c\u7684\u53c2\u6570\uff0c\u6bd4\u5982std::tuple

    template<class... Types>\nclass tuple;\n

    \u6a21\u677f\u504f\u7279\u5316\u548c\u9012\u5f52\u65b9\u5f0f\u5c55\u5f00\u53c2\u6570\u5305

    \u53ef\u53d8\u53c2\u6570\u6a21\u677f\u7c7b\u7684\u5c55\u5f00\u4e00\u822c\u9700\u8981\u5b9a\u4e49\u4e24\u5230\u4e09\u4e2a\u7c7b\uff0c\u5305\u62ec\u7c7b\u58f0\u660e\u548c\u504f\u7279\u5316\u7684\u6a21\u677f\u7c7b

    // \u524d\u5411\u58f0\u660e\ntemplate<typename... Args>\nstruct Sum;\n\n// \u57fa\u672c\u5b9a\u4e49\ntemplate<typename First, typename... Rest>\nstruct Sum<First, Rest...>{\n    enum { value = Sum<First>::value + Sum<Rest...>::value };\n}\n\n// \u9012\u5f52\u7ec8\u6b62\ntemplate<typename Last>\nstruct Sum<Last>{\n    enum { value = sizeof(Last) };\n}\n

    ","text":""},{"location":"CS/CPP/templates/#stl","title":"\u6807\u51c6\u6a21\u677f\u5e93 STL

    STL\u516d\u5927\u90e8\u4ef6\uff1a\u5bb9\u5668\uff08containers\uff09\uff0c\u5206\u914d\u5668\uff08allocators\uff09\uff0c\u7b97\u6cd5\uff08algorithm\uff09\uff0c\u8fed\u4ee3\u5668\uff08iterator\uff09\uff0c\u9002\u914d\u5668\uff08adapters\uff09\uff0c\u4eff\u51fd\u6570\uff08functors\uff09

    ","text":""},{"location":"CS/CPP/templates/#_1","title":"\u5e38\u7528\u7684\u5bb9\u5668","text":"

    vector, deque, list, set/multiset, map/multimap \u7b49

    "},{"location":"CS/CPP/templates/#1-vector","title":"1. Vector","text":"

    Vector\u662f\u4e00\u79cd\u53d8\u957f\u6570\u7ec4\u3002

    #include<vector>\nusing namespace std;\nvector<int> name;\nvector<double> name;\nvector<char> name;\nvector<struct node> name;\n// \u8fd9\u4e24\u4e2a\u4e3b\u8981\u6709\u901f\u5ea6\u4e0a\u7684\u533a\u522b\uff0carray\u975e\u5e38\u6162\uff0cvector\u5feb\u4e00\u4e9b\nvector< vector<int> > name; // > >\u4e4b\u95f4\u8981\u52a0\u7a7a\u683c\uff0c\u65b0\u6807\u51c6\u4e0d\u7528\u52a0\u4e86\nvector<int> array[SIZE]; // \u8fd9\u4e2a\u4e0d\u662f\u5f88\u5e38\u7528\uff0c\u56e0\u4e3a\u5bb9\u6613\u51fa\u9519\uff0c\u4e14\u6570\u7ec4\u4e0d\u77e5\u9053\u81ea\u5df1\u7684\u957f\u5ea6\uff0c\u8fd8\u6709std::array\n

    \u8bbf\u95ee\u65b9\u5f0f

    // 1. \u901a\u8fc7\u4e0b\u6807\n#include<iostream>\n#include<vector>\nusing namespace std;\nint main()\n{\nvector<int> vi;\nvi.push_back(1);\ncout<<vi[0]<<endl;\nreturn 0;\n}\n// 2. \u901a\u8fc7\u8fed\u4ee3\u5668\nvector<int>::iterator\nvector<double>::iterator\n// \u4f8b\n#include<iostream>\n#include<vector>\nint main()\n{\nvector<int> v;\nfor(int i = 0; i < 5; i++)\n{\nv.push_back(i); }\nvector<int>::iterator it=v.begin();\nfor(int i = 0; i < v.size(); i++)\n{\ncout << it[i] << \" \";\n// \u4e5f\u53ef\u4ee5\u5199\u6210 cout << * (it + i) << \" \";\n}\nreturn 0;\n}\n// \u6216\u8005\u4f18\u96c5\u7684\u5199\u6cd5\n// \u56e0\u4e3a\u8fed\u4ee3\u5668\u4e0d\u652f\u6301 it < v.end()\u7684\u5199\u6cd5\uff0c\u53ea\u80fd\u5199!=\nfor (vector<int>::iterator it=v.begin(); it!=v.end();it++)\n{\ncout << *it << \" \";\n}\n
    \u5e38\u7528\u51fd\u6570
    push_back(item) // \u5728vector\u540e\u9762\u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\npop_back(item) // \u5728vector\u540e\u9762\u5220\u9664\u4e00\u4e2a\u5143\u7d20\nsize(vector) // \u8fd4\u56de\u5143\u7d20\u4e2a\u6570\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(1)\nclear(vector) // \u6e05\u9664\u6240\u6709\u5143\u7d20\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(N)\ninsert(position, x) // \u5728position\u7684\u5730\u65b9\u63d2\u5165\u4e00\u4e2ax\n// \u4f8b\nv.insert(v.begin()+2, -1); // \u76f8\u5f53\u4e8e\u5728v[2]\u5904\u63d2\u5165\u4e00\u4e2a-1\nerase(position);\nerase(positionBegin, positionEnd);  // \u5de6\u95ed\u53f3\u5f00\n

    "},{"location":"CS/CPP/templates/#2-set","title":"2. set","text":"

    \u96c6\u5408\u662f\u4e0d\u5141\u8bb8\u5143\u7d20\u91cd\u590d\u7684\u65e0\u5e8f\u5bb9\u5668

    #include<set>\nusing namespace std;\nset<int> name;\nset<double> name;\nset<char> name;\nset<struct node> name;\nset<set<int> > name;\n
    \u56e0\u4e3a\u65e0\u5e8f\uff0cset\u53ea\u80fd\u901a\u8fc7iterator\u8bbf\u95ee\uff0c\u9664\u4e86vector\u548cstring\u4e4b\u5916\u7684\u5bb9\u5668\u90fd\u4e0d\u80fd\u901a\u8fc7\u4e0b\u6807\u8bbf\u95ee
    set<int>::iterator it;\nset<char>::iterator it;\n
    \u5e38\u7528\u51fd\u6570
    st.insert(X);\nst.find(X); // \u8fd4\u56deset\u4e2dvalue\u6240\u5bf9\u5e94\u7684\u8fed\u4ee3\u5668\uff0c\u4e5f\u5c31\u662fvalue\u7684\u6307\u9488\n// \u4f8b\nset<int>::iterator it = st.find(2);\ncout << *it << endl;\n// \u53ef\u4ee5\u76f4\u63a5\u5199\u6210\ncout << *(st.find(2)) << endl;\nst.erase(it); // \u5220\u9664\u67d0\u4e2a\u5730\u5740\u7684\u5143\u7d20\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(1)\nst.erase(X); // \u5220\u9664\u67d0\u4e2a\u5143\u7d20\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(N)\nst.erase(itBegin, itEnd);\nst.size();\n

    "},{"location":"CS/CPP/templates/#3-deque","title":"3. deque","text":"

    deque\u662f\u7531\u4e00\u6bb5\u5b9a\u91cf\u8fde\u7eed\u7a7a\u95f4\u6784\u6210\uff0c\u4e00\u65e6\u8981\u5728deque\u7684\u524d\u7aef\u548c\u5c3e\u7aef\u589e\u52a0\u7a7a\u95f4\uff0c\u4fbf\u914d\u7f6e\u4e00\u6bb5\u8fde\u7eed\u7a7a\u95f4\uff0c\u4e32\u5728\u6574\u4e2adeque\u7684\u5934\u90e8\u548c\u5c3e\u90e8.

    "},{"location":"CS/CPP/templates/#4-list","title":"4. list","text":""},{"location":"CS/CPP/templates/#5-mapunordered_map","title":"5. map/unordered_map","text":""},{"location":"CS/CPP/templates/#6-string","title":"6. string","text":"
    // init\n#include<string>\nstring str;\nstring str = \"Hello\";\ncin >> str;\ncout << str;\n// assignment\nchar cstr1[20];\nchar cstr2[20] = \"jaguar\";\nstring str1;\nstring str2 = \"panther\";\ncstr1 = cstr2; // illegal\nstr1 = str2; // legal\n// concatenation\nstring str3;\nstr3 = str1 + str2;\nstr1 += str2;\nstr1 += \"a string literal\";\n// constructors (Ctors)\nstring (const char *cp, int len);\nstring (const string& s2, int pos);\nstring (const string& s2, int pos, int len);\n// sub-string\nsubstr (int pos, int len);\n// modification\nassign (...);\ninsert (...);\ninsert (int pos, const string& s);\nerase (...);\nappend (...);\nreplace (...);\nreplace (int pos, int len, const string& s);\n...\n// search\nfind (const string& s);\n// File I/O\n#include <ifstream> // read from file\n#include <ofstream>  // write to file\n// write into file\nofstream File1(\"...\");\nFile1 << \"Hello world\" << std::enl;\n// read from file\nifstream File2(\"...\");\nstd::string str;\nFile2 >> str;\n
    "},{"location":"CS/CPP/templates/#_2","title":"\u7b97\u6cd5","text":"

    \u7b97\u6cd5\u90e8\u5206\u4e3b\u8981\u7531<algorithm> <numeric> <functional>\u7ec4\u6210 <algorithm>\u662f\u6700\u5927\u7684\u4e00\u4e2a <numeric>\u4f53\u79ef\u5f88\u5c0f\uff0c\u53ea\u5305\u62ec\u51e0\u4e2a\u5728\u5e8f\u5217\u4e0a\u8fdb\u884c\u7b80\u5355\u6570\u5b66\u8fd0\u7b97\u7684\u6a21\u677f\u51fd\u6570 <functional>\u5b9a\u4e49\u4e86\u4e00\u4e9b\u6a21\u677f\u7c7b\uff0c\u7528\u4ee5\u58f0\u660e\u51fd\u6570\u5bf9\u8c61

    "},{"location":"CS/CPP/templates/#iterator","title":"\u8fed\u4ee3\u5668 Iterator","text":"

    \u7528\u8fed\u4ee3\u5668\u53ef\u4ee5\u8bfb\u53d6\u5b83\u6307\u5411\u7684\u5143\u7d20\u3002\u8fed\u4ee3\u5668\u540d\u5c31\u8868\u793a\u8fed\u4ee3\u5668\u6307\u5411\u7684\u5143\u7d20\uff0c\u901a\u8fc7\u975e\u5e38\u91cf\u8fed\u4ee3\u5668\u8fd8\u80fd\u4fee\u6539\u5176\u6307\u5411\u7684\u5143\u7d20\u3002

    #include<iostream> #include<vector> using namespace std; int main() { vector<int> v; for (int n = 0; n < 5; ++n) v.push_back(n); vector<int>::iterator i; for (i = v.begin(); i != v.end(); i++) { cout << *i << \" \"; // *i \u662f i \u6307\u5411\u7684\u5143\u7d20 *i *= 2; \n} }\n

    "},{"location":"CS/CPP/templates/#stl_1","title":"\u7c7b\u5e93\u548cSTL

    STL\u662f\u8303\u578b\u7a0b\u5e8f\u8bbe\u8ba1\u7684\u4e00\u4e2a\u8303\u4f8b\uff0c\u542b\uff1a\u5bb9\u5668\uff08container\uff09\u3001\u8fed\u4ee3\u5668\uff08iterator\uff09\u3001\u7b97\u6cd5\uff08algorithm\uff09\u3001\u51fd\u6570\u5bf9\u8c61\uff08function object\uff09\u3002\u7c7b\u5e93\u662f\u7c7b\u7684\u96c6\u5408\uff0c\u662f\u4e00\u79cd\u9884\u5b9a\u4e49\u7684\u9762\u5411\u5bf9\u8c61\u7684\u7a0b\u5e8f\u5e93\u3002

    ","text":""},{"location":"CS/CPP/templates/#c","title":"C++\u7684\u6807\u51c6\u5e93","text":"

    using namespace std;

    "},{"location":"CS/CPP/templates/#stl_2","title":"STL\u4e2d\u7684\u5bb9\u5668\u7c7b","text":"

    \u5bb9\u5668\uff08container\uff09\u7c7b\u662f\u7528\u6765\u5bb9\u7eb3\u3001\u5305\u542b\u4e00\u7ec4\u5143\u7d20\u6216\u5143\u7d20\u96c6\u5408\u7684\u5bf9\u8c61\u7684\u3002STL\u4e2d\u5b9a\u4e49\u4e86\u591a\u79cd\u4e0d\u540c\u7c7b\u578b\u7684\u5bb9\u5668\uff0c\u4f8b\u5982

    "},{"location":"CS/CPP/templates/#vector","title":"\u5411\u91cf vector","text":"

    \u5b9a\u4e49

    vector<int> iv;\nvector<int> cv(5);\nvector<int> cv(5, 'x');\nvector<int> iv2(iv);\n

    \u4f7f\u7528

    #include<iostream>\n#include<vector>\nusing namespace std;\nint main()\n{\nvector<char> v;  // create zero-len vector\nint i;\n// put values into a vector\nfor (i = 0; i < 10; i++)\nv.push_back('A' + i);\n// can access vector contents using subsripting\nfor (i = 0; i < 10; i++)\ncout << v[i] << \" \";\ncout << endl;\n// access via iterator\nvector<char>::iterator p = v.begin();\nwhile(p != v.end())\n{\ncout << *p << \" \";\np++;\n}\nreturn 0;\n}\n
    "},{"location":"CS/CPP/templates/#list","title":"\u7ebf\u6027\u8868 list","text":"

    \u5b9a\u4e49\u4e86\u53cc\u5411\u7684\u7ebf\u6027\u8868\uff0c\u53c8\u53ef\u79f0\u4e3a\u53cc\u5411\u94fe\u8868\u3002list\u7c7b\u53ea\u652f\u6301\u987a\u5e8f\u8bbf\u95ee\u3002

    // sort a list\n#include<iostream>\n#include<list>\n#include<cstdlib>\nusing namespace std;\nint main()\n{\nint i;\nlist<char> lst;\n// create a list of random characters\nfor (i = 0; i < 10; i++)\nlist.push_back('A' + (rand()%26));\n}\n
    "},{"location":"CS/CPP/templates/#set","title":"\u96c6\u5408 set","text":"
    #include<set>\n#include<iostream>\n#include<string>\nint main()\n{\nstd::set<std::string> source;\nstd::string input;\nfor(int i=0;i<6;i++)\n{\nstd::cin>>input;\nsource.insert(input);\n}\nstd::set<std::string>::iterator at = source.begin();\nwhile(at != source.end())\nstd::cour << * at++ << std::endl;\n}\n
    "},{"location":"CS/CPP/templates/#multiset","title":"multiset","text":""},{"location":"CS/CPP/templates/#map","title":"\u6620\u5c04 map","text":""},{"location":"CS/CPP/templates/#queue","title":"\u961f\u5217 queue","text":""},{"location":"CS/CPP/templates/#stdstack","title":"std::stack","text":""},{"location":"CS/CPP/templates/#stdpair","title":"std::pair","text":""},{"location":"CS/CPP/templates/#string","title":"\u5b57\u7b26\u4e32string","text":""},{"location":"CS/CPP/templates/#_3","title":"\u7b97\u6cd5\u5e93 ` ","text":""},{"location":"CS/CPP/templates/#sort","title":"\u6392\u5e8f\u7b97\u6cd5sort","text":"
    #include<algorithm>\n#include<iostream>\n#include<string>\n#include<vector>\nusing namespace std;\nvoid load(vector<string>&);\nvoid print(vector<string>);\nconst int SIZE = 8;\nint main()\n{\nvector<string> v(SIZE);\nload(v);\nsort(v.begin(), v.end());  // \u6307\u5b9a\u6392\u5e8f\u7684\u8d77\u6b62\u4f4d\u7f6e\nprint(v);\nreturn 0;\n}\n// \u4f1a\u6309\u7167\u5b57\u6bcd\u5e8f\u6392\u5e8f\n
    "},{"location":"CS/CPP/templates/#_4","title":"\u8fed\u4ee3\u5668

    \u662f\u4e00\u79cd\u7c7b\u4f3c\u6307\u9488\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fed\u4ee3\u5668\u6765\u8bbf\u95ee\u5bb9\u5668\u4e2d\u7684\u5143\u7d20\u3002

    ","text":""},{"location":"CS/CPP/templates/#reverse-iterator","title":"\u53cd\u5411\u8fed\u4ee3\u5668 reverse iterator","text":"
    #include<list>\n#include<iostream>\nint main()\n{\nusing namespace std;\nlist<int> c1;\nlist<int>::iterator c1_Iter;\nlist<int>::reverse_iterator c1_rIter;\nc1_rIter = c1.rbegin(); // the last element\n}\n
    "},{"location":"CS/CPP/templates/#_5","title":"\u53c2\u8003\u8d44\u6599

    https://zhuanlan.zhihu.com/p/344558356 LJJ PPT

    ","text":""},{"location":"CS/OS/","title":"\u7d22\u5f15","text":"

    \u6211\u89c9\u5f97 x+i for i in [x, y, g] \u4e09\u4f4d\u7684\u7b14\u8bb0\u5bf9\u4e8e\u8fd9\u95e8\u8bfe\u7406\u8bba\u90e8\u5206\u7684\u4ecb\u7ecd\u5df2\u7ecf\u975e\u5e38\u5145\u5206\u4e86\u3002\u5927\u5bb6\u53ef\u4ee5\u5728\u6211 root \u7d22\u5f15\u9875\u6307\u5411\u7684 xy \u7b14\u8bb0\u627e\u5230\u6211\u8fd9\u91cc\u63d0\u5230\u7684\u4e09\u4efd\u7b14\u8bb0\u3002

    \u6211\u4ecd\u8981\u5199\u8fd9\u95e8\u8bfe\u7684\u5b9e\u9a8c\u90e8\u5206\u7684\u539f\u56e0\u662f\uff0c\u81ea\u5df1\u89c9\u5f97\u5b9e\u9a8c\u624b\u518c\u5199\u5f97\u4ecd\u6709\u4e00\u4e9b\u5bfc\u81f4\u4e0d\u592a\u597d\u7406\u89e3\u7684\u7f3a\u9677\uff0c\u6bd4\u5982\u7406\u8bba\u548c\u64cd\u4f5c\u5206\u6210\u4e0a\u4e0b\u4e24\u5927\u5757\u6765\u5199\uff0c\u5bfc\u81f4\u67e5\u8d77\u6765\u7684\u65f6\u5019\u50cf\u5728\u5403\u4e00\u76d8\u94a2\u4e1d\u7403\u7092\u610f\u5927\u5229\u9762\uff0c\u6bd4\u5982\u6709\u65f6\u5728\u8bf4\u64cd\u4f5c\u65f6\u4e0d\u5206\u5df2\u7ecf\u5b9e\u73b0\u597d\u7684/\u6211\u8981\u505a\u7684/linux\u4f1a\u505a\u4f46\u662f\u6211\u4eec\u4e0d\u5173\u5fc3\u7684\u3002

    \u6211\u7684\u9884\u671f\u662f\u628a\u8fd9\u4efd\u7b14\u8bb0\u5199\u6210\u4e00\u5757\u4e00\u5757\u7684\u4e1c\u897f\uff0c\u6bcf\u4e00\u5757\u662f\u4e00\u4e2a\u7406\u8bba+\u64cd\u4f5c+\u4e00\u4e2a\u80fd\u8dd1\u8d77\u6765\u7684\u6700\u5c0f\u5355\u5143\u3002\u73b0\u5b9e\u662f\u6211\u7684\u65f6\u95f4\u771f\u7684\u592a\u4e0d\u8db3\u4e86\uff0c\u611f\u89c9\u53ea\u6765\u5f97\u53ca\u53bb\u8865\u5145\u4e00\u4e9b\u5b9e\u9a8c\u624b\u518c\u91cc\u6ca1\u6709\u5199\u7684\u80cc\u666f\u6216\u8005\u662f\u6211\u81ea\u5df1\u64cd\u4f5c\u65f6\u7684\u4e00\u4e9b\u5fc3\u5f97\u6216\u603b\u7ed3\uff0c\u53ea\u80fd\u5f53\u5b9e\u9a8c\u624b\u518c\u7684\u8865\u5145\u6765\u770b\u3002\u7136\u540e\u672c\u6765\u8fd9\u91cc\u5e94\u5f53\u6709\u4e00\u53e5\u5e0c\u671b\u4ee5\u540e\u6709\u65f6\u95f4\u80fd\u5199\u5b8c\uff0c\u4f46\u662f\u6211\u4e5f\u4e0d\u60f3\u8fd9\u6837\u627f\u8bfa\u4e86\uff0c\u6211\u66f4\u613f\u610f\u8bf4\u4e00\u4e9b\u73b0\u5b9e\u7684\u6bd4\u5982\u6211\u4e0d\u4f1a\u518d\u66f4\u65b0\u8fd9\u4efd\u7b14\u8bb0\u4e86\uff0c\u4f46\u662f\u5e0c\u671b\u8bfb\u8005\u505a\u5b9e\u9a8c\u7684\u65f6\u5019\u53ef\u4ee5\u5e26\u7740\u4e0a\u8ff0\u63d0\u5230\u7684\u601d\u8def\u53bb\u6574\u7406\u81ea\u5df1\u7684\u601d\u7ef4\u548c\u5b9e\u9a8c\u62a5\u544a\u3002

    \u63a5\u4e0b\u6765\u8bf7\u70b9\u8fdb\u53e6\u4e00\u4e2a lab \u9875\u9762\u7ee7\u7eed\u9605\u8bfb\u3002

    "},{"location":"CS/OS/lab/","title":"OS lab","text":"

    \u76ee\u5f55\uff1a\u8fd9\u91cc\u4f1a\u5148\u8bb2\u4e00\u4e0b\u7528\u5230\u7684\u80cc\u666f\u77e5\u8bc6\u548c mac \u4e0b\u7684\u73af\u5883\u914d\u7f6e\u6280\u5de7\uff08\u56e0\u4e3a\u624b\u518c\u8bb2 mac \u4e0d\u591a\uff09\uff0c\u7136\u540e\u6328\u4e2a\u5b9e\u9a8c\u6211\u60f3\u8fdb\u884c\u4e00\u4e9b\u7efc\u8ff0\uff0c\u4e0d\u77e5\u9053\u7cbe\u529b\u80fd\u652f\u6491\u5199\u591a\u5c11\uff0c\u6700\u540e\u8865\u5145\u4e24\u4e2a\u6211\u5b9e\u9a8c\u4e2d\u603b\u9047\u5230\u7684\u4f46\u624b\u518c\u6ca1\u6d89\u53ca\u7684\u95ee\u9898\u3002\u81ea\u77e5\u5b66\u5f97\u4e0d\u597d\uff0c\u4e0d\u786e\u5b9a\u7684\u5730\u65b9\u6211\u4f1a\u6807\u51fa\u6765\u3002

    "},{"location":"CS/OS/lab/#overview","title":"overview","text":"

    Warning

    \u7ed3\u6784\u56fe TODO

    \u4e00\u4e2a\u6700\u540e\u505a\u51fa\u6765\u7684 lab \u7ed3\u6784\u56fe:

    "},{"location":"CS/OS/lab/#_1","title":"\u80cc\u666f\u77e5\u8bc6","text":"

    \u5148\u4ecb\u7ecd\u4e00\u4e0b\u6574\u4e2a\u5b9e\u9a8c\u548c\u5b9e\u9a8c\u73af\u5883\u7684\u5927\u80cc\u666f\u3002

    "},{"location":"CS/OS/lab/#os","title":"\u8ba1\u7b97\u673a\u4e0a\u7535\u5230OS\u8fd0\u884c\u7684\u8fc7\u7a0b","text":"

    \u5d4c\u5165\u5f0f\u7cfb\u7edf\uff08\u76f8\u6bd4\u8ba1\u7b97\u673a\u7cfb\u7edf\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u80fd\u5728\u7279\u5b9a\u786c\u4ef6\u4e0a\u8fd0\u884c\uff09\u7684\u542f\u52a8\u8fc7\u7a0b\u6bd4\u8f83\u7b80\u5355\uff0c\u7528\u5b83\u6765\u505a\u4f8b\u5b50\u8bb2\u89e3\uff0c\u8fc7\u7a0b\u662f\uff1a

    Hardware             RISC-V M Mode           RISC-V S Mode \n+------------+         +--------------+         +----------+\n|  Power On  |  ---->  |  Bootloader  |  ---->  |  Kernel  |\n+------------+         +--------------+         +----------+\n
    "},{"location":"CS/OS/lab/#sbiopensbi","title":"sbi\u548copensbi","text":"

    \u4ecb\u7ecd\u5b9e\u9a8c\u73af\u5883\u7528\u7684\u7b2c\u4e00\u4e2a\u5de5\u5177\uff1asbi (supervisor binary interface)\u662f s-mode \u7684 kernel \u548c m-mode \u6267\u884c\u73af\u5883\u4e4b\u95f4\u7684\u63a5\u53e3\u89c4\u8303

    opensbi\u662f\u4e00\u4e2ariscv sbi\u89c4\u8303\u7684\u5f00\u6e90\u5b9e\u73b0\uff0c\u603b\u4e4b\u610f\u601d\u662fopensbi\u662f\u4e00\u4e9b\u5bf9m-mode\u4e0b\u786c\u4ef6\u7684\u7edf\u4e00\u5b9a\u4e49\uff0c\u5728s-mode\u4e0b\u7684\u5185\u6838\u53ef\u4ee5\u6309\u7167\u8fd9\u4e9b\u89c4\u8303\u5bf9\u4e0d\u540c\u786c\u4ef6\u64cd\u4f5c\u3002

    \u6211\u4eecopensbi\u53ef\u4ee5\u4f5c\u4e3abootloader\u5b8c\u6210\u673a\u5668\u542f\u52a8\u65f6m-mode\u4e0b\u7684\u786c\u4ef6\u521d\u59cb\u5316\u548c\u5bc4\u5b58\u5668\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u5229\u7528opensbi\u5b8c\u6210\u5b57\u7b26\u6253\u5370\u4e4b\u7c7b\u7684\u64cd\u4f5c\u3002

    qemu\u4f1a\u628aopensbi\u8d77\u59cb\u5730\u5740\u52a0\u8f7d\u52300x80000000\u5904.

    opensbi\u521d\u59cb\u5316\u540e\u4f1a\u8df3\u8f6c\u52300x80200000\u5904\uff0c\u5373kernel\u7684\u8d77\u59cb\u5730\u5740\u3002\u6240\u4ee5\u8981\u7f16\u8bd1\u7684\u4ee3\u7801\u57280x80200000\u5904\u3002

    "},{"location":"CS/OS/lab/#_2","title":"\u7279\u6743\u6a21\u5f0f","text":"

    riscv\u6709\u4e09\u79cd\u7279\u6743\u6a21\u5f0f\uff1aUser, Supervisor, & Machine\u3002\u6574\u4e2a\u5b9e\u9a8c\u4e2d\u6211\u4eec\u4e00\u5f00\u59cb\u90fd\u8981\u5728 s-mode \u64cd\u4f5c\uff0c\u4e4b\u540e\u6162\u6162\u5b9e\u73b0 u-mode\u3002

    Level Encoding Name Abbreviation \u4ecb\u7ecd 0 00 User/Application U \u5bf9\u786c\u4ef6\u6a21\u5f0f\u7684\u62bd\u8c61\uff0c\u6709\u6700\u9ad8\u7ea7\u522b\u7684\u6743\u9650 1 01 Supervisor S \u5bf9\u5e94\u4e0e\u5185\u6838\u6001Kernel\u3002\u5f53\u7528\u6237\u9700\u8981\u5185\u6838\u8d44\u6e90\u65f6\uff0c\u5411\u5185\u6838\u7533\u8bf7\uff0c\u5e76\u5207\u6362\u5230\u5185\u6838\u6001\u8fdb\u884c\u5904\u7406 2 10 Reserved 3 11 Machine M \u7528\u6237\u6001\uff0c\u6700\u4f4e\u7ea7\u522b\u6743\u9650

    \u4e00\u822c\u6bcf\u79cd\u6a21\u5f0f\u53ef\u4ee5\u8fd0\u884c\u7684\u7a0b\u5e8f\u6709

    supported modes intended usage M simple embedded systems M, U secure embedded systems M, S, U systems running unix-like operating systems"},{"location":"CS/OS/lab/#_3","title":"\u73af\u5883\u914d\u7f6e","text":""},{"location":"CS/OS/lab/#docker","title":"Docker","text":"

    \u5728\u5b98\u7f51\u5b89\u88c5Docker\u3002\u4e4b\u540e\u9700\u8981\u6253\u5f00Docker app\uff0c\u767b\u9646\u540e\u624d\u80fd\u5728terminal\u4e2d\u4f7f\u7528docker\u547d\u4ee4\u3002

    $ sudo hdiutil attach Docker.dmg\n$ sudo /Volumes/Docker/Docker.app/Contents/MacOS/install\n$ sudo hdiutil detach /Volumes/Docker\n

    \u521b\u5efa\u5bb9\u5668

    docker pull ubuntu:22.04\ndocker run -it --name my_linux ubuntu:22.04 bash\n

    \u51fa\u73b0root@xxxxxxx:?# \u5373\u521b\u5efa\u6210\u529f\uff0c\u5176\u4e2dxxxxxxx\u4e00\u4e32\u662f\u5f53\u524d\u5bb9\u5668\u7684id\uff0c\u9700\u8981\u8bb0\u5f55\u4e0b\u6765\uff0c\u4e0b\u6b21\u53ef\u4ee5\u901a\u8fc7\u8be5id\u8fdb\u5165\u76f8\u540c\u5bb9\u5668\u3002

    \u5b89\u88c5\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u5305\uff0cqemu\uff0cgdb\uff0c\u8fd9\u51e0\u6b65\u9700\u8981\u5f00\u7740\u547d\u4ee4\u884c\u4ee3\u7406\uff0c\u622a\u56fe\u7565\u3002

    "},{"location":"CS/OS/lab/#docker_1","title":"\u806a\u660e\u5730\u4f7f\u7528docker","text":"

    \u8fd8\u662f\u6700\u597d\u914d\u7f6e\u4e00\u4e0b vscode \u91cc\u7684\u56fe\u5f62\u754c\u9762\u3002\u6b65\u9aa4\uff1a

    "},{"location":"CS/OS/lab/#_4","title":"\u65b9\u6cd5\u4ecb\u7ecd","text":"

    Warning

    TODO \u8fd9\u5757\u5e94\u8be5\u518d\u6269\u5199\u4e00\u4e0b\u7684

    "},{"location":"CS/OS/lab/#qemu-gdb","title":"qemu + gdb \u8c03\u8bd5","text":"

    \u9700\u8981\u8c03\u8bd5\u65f6\uff0c\u56e0\u4e3a\u9876\u5c42 makefile \u5e2e\u6211\u4eec\u5199\u597d\u4e86\u8c03\u8bd5\u547d\u4ee4\uff0c\u6211\u4eec\u7b2c\u4e00\u4e2a terminal \u53ea\u9700\u8981\u8f93\u5165 make debug\u3002 \u7136\u540e\u65b0\u5f00\u4e00\u4e2a terminal \u8f93\u5165 gdb-multiarch path/to/vmlinux \u5176\u4e2d vmlinux \u662f\u7f16\u8bd1\u597d\u7684\u6587\u4ef6\u3002

    gdb \u4f7f\u7528\u7684\u65b9\u6cd5/\u7a8d\u95e8

    \u663e\u793a\u6709\u5173\u7684 \u7b80\u5199 \u6307\u4ee4 \u663e\u793a\u6e90\u4ee3\u7801 layout src \u663e\u793a\u6c47\u7f16\u4ee3\u7801 layout asm \u9000\u51fa\u6c47\u7f16\u663e\u793a ctrl+x, A \u9000\u51fagdb quit \u6267\u884c\u6709\u5173\u7684 \u7b80\u5199 \u6307\u4ee4 \u5355\u6b65\u6267\u884c\uff0c\u8fd0\u884c\u7a0b\u5e8f\uff0c\u505c\u5728\u7b2c\u4e00\u6267\u884c\u8bed\u53e5 start \u65ad\u70b9\u540e\u7ee7\u7eed\u6267\u884c c continue \u5355\u6b65\u8c03\u8bd5\uff08\u9010c\u8bed\u8a00\u8bed\u53e5\uff0c\u51fd\u6570\u76f4\u63a5\u6267\u884c\uff09 n next \u6267\u884c\u5355\u6761\u6307\u4ee4 si step instruction \u91cd\u65b0\u5f00\u59cb\u8fd0\u884c\u6587\u4ef6\uff08run-text\uff1a\u52a0\u8f7d\u6587\u672c\u6587\u4ef6\uff0crun-bin\uff1a\u52a0\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6\uff09 r run \u7ed3\u675f\u5f53\u524d\u51fd\u6570\uff0c\u8fd4\u56de\u5230\u51fd\u6570\u8c03\u7528\u70b9 finish \u65ad\u70b9\u6709\u5173 \u7b80\u5199 \u6307\u4ee4 \u8bbe\u7f6e\u65ad\u70b9\u5728foo\u51fd\u6570 b foo break foo \u65ad\u5728\u67d0\u5730\u5740 b * 0x80200000 break * 0x80200000 \u67e5\u770b\u7b2cm\u4e2a-\u7b2cn\u4e2a\u65ad\u70b9 info breakpoints [LIST] \u67e5\u770b\u6240\u6709\u65ad\u70b9 info breakpoints \u5220\u9664N\u53f7\u65ad\u70b9 delete [N] \u5c55\u793a\u503c\u6709\u5173\u7684 \u7b80\u5199 \u6307\u4ee4 \u67e5\u770b\u51fd\u6570\u7684\u8c03\u7528\u7684\u6808\u5e27\u548c\u5c42\u7ea7\u5173\u7cfb bt backtrace \u5207\u6362\u51fd\u6570\u7684\u6808\u5e27 f frame \u6253\u5370\u503c\u53ca\u5730\u5740 p print \u67e5\u770b\u51fd\u6570\u5185\u90e8\u5c40\u90e8\u53d8\u91cf\u7684\u6570\u503c i ifo \u67e5\u770b\u5bc4\u5b58\u5668 ra \u7684\u503c i r ra \u8ffd\u8e2a\u67e5\u770b\u5177\u4f53\u53d8\u91cf\u503c display [] \u4ee5 16 \u8fdb\u5236\u6253\u5370\u00a0\u00a0\u5904\u5f00\u59cb\u7684 16 Bytes \u5185\u5bb9 x/4x \u663e\u793a\u6570\u7ec4 p *swapper_pg_dir@100 16\u8fdb\u5236\u663e\u793a\uff08x\u500d\u6570\u53ea\u80fd\u4e3a1\uff09 p/x swapper_pg_dir [start]@1

    \u8c03\u8bd5\u7684\u65f6\u5019\u9700\u8981\u770b\u4ec0\u4e48\u5462\uff1f

    \u8fd9\u662f\u6211\u521a\u4e0a\u624b\u8c03\u8bd5\u7684\u65f6\u5019\u611f\u5230\u56f0\u6270\u7684\u4e00\u4e2a\u95ee\u9898\u3002

    \u540e\u6765\u6211\u9010\u6e10\u60f3\u6e05\u695a\u7684\u662f\uff0c\u9996\u5148\u6211\u8ba4\u4e3a\u5982\u679c\u4e0d\u77e5\u9053\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\u8fd0\u884c\u7684\u6d41\u7a0b\uff08\u6bd4\u5982\u5148\u54ea\u4e2a\u51fd\u6570\u518d\u54ea\u4e2a\u51fd\u6570\uff09\uff0c\u662f\u4e0d\u9002\u5408\u5f00\u59cb\u8c03\u8bd5\u7684\uff0c\u5e94\u5f53\u56de\u53bb\u518d\u601d\u8003\u4e00\u904d lab \u7684\u7406\u8bba\uff0c\u8d77\u7801\u77e5\u9053\u81ea\u5df1\u7a0b\u5e8f\u7684\u5404\u79cd\u9884\u671f\u7ed3\u679c\u3002\u66b4\u8bba\u4e00\u70b9\u8bf4\u5176\u5b9e\u6211\u89c9\u5f97\u8c03\u8bd5\u65f6\u957f\u5927\u4e8e\u5f00\u53d1\u65f6\u957f\u90fd\u662f\u4e0d\u592a\u597d\u7684\uff0c\u66b4\u9732\u51fa\u80af\u5b9a\u54ea\u91cc\u7406\u8bba\u6ca1\u5543\u900f\u5c31\u5f00\u59cb\u52a8\u7b14\u4e86\u3002

    \u7136\u540e\u53ef\u4ee5\u7531\u5927\u5230\u5c0f\uff0c\u6bd4\u5982\u5148\u628a\u51e0\u4e2a\u65ad\u70b9\u6253\u5728\u731c\u6d4b\u53ef\u80fd\u51fa\u9519\u4e86\u7684\u51e0\u4e2a\u51fd\u6570\u4e0a\uff0c\u786e\u5b9a\u5177\u4f53\u5728\u54ea\u4e2a\u51fd\u6570\u51fa\u9519\u540e\u518d\u9010 c \u8bed\u8a00\u884c\u8fd0\u884c\uff0c\u786e\u5b9a\u662f\u54ea\u4e2a c \u8bed\u8a00\u884c\u51fa\u9519\u540e\u518d\u9010\u6c47\u7f16\u884c\u8fd0\u884c\uff0c\u5faa\u5e8f\u6e10\u8fdb\u627e\u5230\u5177\u4f53\u51fa\u9519\u7684\u6307\u4ee4\u3002\u5728\u9644\u8fd1\u6253\u5370\u6253\u5370\u51e0\u4e2a\u5bc4\u5b58\u5668\u7684\u503c\uff08\u53ef\u4ee5\u770b\u7684\u5bc4\u5b58\u5668\u6211\u4f1a\u5728\u4e0b\u4e00\u8282\u4ecb\u7ecd\uff09\uff0c\u7136\u540e\u5728\u6b64\u57fa\u7840\u4e0a\u601d\u8003\u9519\u8bef\u539f\u56e0\u3002

    "},{"location":"CS/OS/lab/#gdb","title":"\u806a\u660e\u5730\u4f7f\u7528 gdb","text":"

    gdb \u81ea\u5e26\u7684\u547d\u4ee4\u884c ui \u7f3a\u70b9\u4e3b\u8981\u5728\u4e8e\u4e0d\u80fd\u968f\u65f6\u663e\u793a\u5bc4\u5b58\u5668\u548c\u53d8\u91cf\u7684\u503c\uff0c\u8c03\u8bd5\u4f1a\u4e0d\u8212\u670d\u3002\u6709\u4e00\u4e9b\u66f4\u597d\u7684 ui \u5de5\u5177\u3002

    \u6211\u6ca1\u6709\u914d\u6240\u4ee5\u4e0d\u80fd\u63d0\u4f9b\u5f88\u597d\u7684\u6211\u7684\u63a8\u8350\uff0c\u8d34\u4e00\u4e9b\u522b\u4eba\u7684\u5e16\u5b50\u3002\u9664\u4e86\u4e0b\u9762\u5e16\u5b50\u91cc\u63d0\u5230\u7684\u51e0\u4e2a\uff0c\u8431\u8431\u8fd8\u63d0\u5230\u4e00\u4e2a gdbpeda\u3002

    \u63a8\u8350\u51e0\u4e2a\u597d\u7528\u7684GDB\u56fe\u5f62\u5316\u529f\u80fd\u589e\u5f3a\u63d2\u4ef6

    "},{"location":"CS/OS/lab/#lab0","title":"lab0","text":"

    \u6ca1\u96be\u5ea6\u4e0d\u7528\u8bb2

    "},{"location":"CS/OS/lab/#lab1","title":"lab1","text":""},{"location":"CS/OS/lab/#c-risc-v","title":"C & RISC-V \u5185\u8054\u6c47\u7f16","text":"

    Note

    \u8fd9\u5757\u6765\u81ea\u4e8e\u5bf9 lab1 \u6587\u6863\u7684\u6574\u7406\u3002\u5e0c\u671b\u6709\u6574\u7406\u5f97\u6bd4\u539f\u6587\u6863\u53ef\u8bfb\u4e00\u4e9b\u3002

    __asm__ volatile (\n\"instruction1\\n\"\n\"instruction2\\n\"\n......\n......\n\"instruction3\\n\"\n: [out1] \"=r\" (v1),[out2] \"=r\" (v2)\n: [in1] \"r\" (v1), [in2] \"r\" (v2)\n: \"memory\"\n);\n

    \u5176\u4e2d\uff0c\u4e09\u4e2a\u00a0:\u00a0\u5c06\u6c47\u7f16\u90e8\u5206\u5206\u6210\u4e86\u56db\u90e8\u5206\u3002\u8fd9\u56db\u90e8\u5206\u4e2d\u540e\u4e09\u90e8\u5206\u4e0d\u662f\u5fc5\u987b\u7684\uff1a

    \u8fd9\u6bb5\u6682\u65f6\u7528\u4e0d\u7740\u6211\u4e0d\u5199\u4e86\uff0c\u8d34\u4e00\u6bb5lab1\u4e2d\u7684\u539f\u6587\u7ed9\u7684\u793a\u4f8b\u3002e.g. 1

    unsigned long long s_example(unsigned long long type,unsigned long long arg0) {\nunsigned long long ret_val;\n__asm__ volatile (\n\"mv x10, %[type]\\n\"\n\"mv x11, %[arg0]\\n\"\n\"mv %[ret_val], x12\"\n: [ret_val] \"=r\" (ret_val)\n: [type] \"r\" (type), [arg0] \"r\" (arg0)\n: \"memory\"\n);\nreturn ret_val;\n}\n

    e.g. 1. \u4e2d\u6307\u4ee4\u90e8\u5206\uff0c%[type]\u3001%[arg0]\u4ee5\u53ca%[ret_val]\u4ee3\u8868\u7740\u7279\u5b9a\u7684\u5bc4\u5b58\u5668\u6216\u662f\u5185\u5b58\u3002\u8f93\u5165\u8f93\u51fa\u90e8\u5206\u4e2d\uff0c[type] \"r\" (type)\u4ee3\u8868\u7740\u5c06\u00a0()\u00a0\u4e2d\u7684\u53d8\u91cf\u00a0type\u00a0\u653e\u5165\u5bc4\u5b58\u5668\u4e2d\uff08\"r\"\u00a0\u6307\u653e\u5165\u5bc4\u5b58\u5668\uff0c\u5982\u679c\u662f\u00a0\"m\"\u00a0\u5219\u4e3a\u653e\u5165\u5185\u5b58\uff09\uff0c\u5e76\u4e14\u7ed1\u5b9a\u5230\u00a0[]\u00a0\u4e2d\u547d\u540d\u7684\u7b26\u53f7\u4e2d\u53bb\u3002[ret_val] \"=r\" (ret_val)\u00a0\u4ee3\u8868\u7740\u5c06\u6c47\u7f16\u6307\u4ee4\u4e2d\u00a0%[ret_val]\u00a0\u7684\u503c\u66f4\u65b0\u5230\u53d8\u91cf\u00a0ret_val \u4e2d\u3002

    e.g. 2

    #define write_csr(reg, val) ({\n__asm__ volatile (\"csrw \" #reg \", %0\" :: \"r\"(val)); })\n

    e.g. 2. \u5b9a\u4e49\u4e86\u4e00\u4e2a\u5b8f\uff0c\u5176\u4e2d\u00a0%0\u00a0\u4ee3\u8868\u7740\u8f93\u51fa\u8f93\u5165\u90e8\u5206\u7684\u7b2c\u4e00\u4e2a\u7b26\u53f7\uff0c\u5373\u00a0val\u3002 #reg\u00a0\u662fc\u8bed\u8a00\u7684\u4e00\u4e2a\u7279\u6b8a\u5b8f\u5b9a\u4e49\u8bed\u6cd5\uff0c\u76f8\u5f53\u4e8e\u5c06reg\u8fdb\u884c\u5b8f\u66ff\u6362\u5e76\u7528\u53cc\u5f15\u53f7\u5305\u88f9\u8d77\u6765\u3002\u4f8b\u5982\u00a0write_csr(sstatus,val)\u00a0\u7ecf\u5b8f\u5c55\u5f00\u4f1a\u5f97\u5230\uff1a

    ({\n__asm__ volatile (\"csrw \" \"sstatus\" \", %0\" :: \"r\"(val)); })\n

    \u6b64\u5916\uff0c\u8fd9\u4e2a\u793a\u4f8b\u4e2d\u7684\u00a0({...})\u00a0\u8fd8\u6d89\u53ca\u4e86\u4e00\u4e2a GNU \u5bf9 C \u7684\u6269\u5c55\uff0c\u53ef\u4ee5\u53c2\u8003\u00a0Statements and Declarations in Expressions\u3002\u590d\u5408\u8bed\u53e5\u4e2d\u7684\u6700\u540e\u4e00\u9879\u5e94\u8be5\u662f\u4e00\u4e2a\u8868\u8fbe\u5f0f\uff0c\u540e\u8ddf\u4e00\u4e2a\u5206\u53f7\u00a0;\u3002\u8be5\u5b50\u8868\u8fbe\u5f0f\u7684\u503c\u7528\u4f5c\u6574\u4e2a\u8bed\u53e5\u7684\u503c\uff0c\u53ef\u4ee5\u7528\u6765\u5b9e\u73b0\u7c7b\u4f3c\u201c\u8fd4\u56de\u503c\u201d\u7684\u6548\u679c\u3002

    "},{"location":"CS/OS/lab/#_5","title":"\u7f16\u8bd1\u7684\u77e5\u8bc6","text":"

    Note

    \u8fd9\u5757\u6765\u81ea\u4e8e\u5bf9 lab1 \u6587\u6863\u7684\u6574\u7406\u3002\u5e0c\u671b\u6709\u6574\u7406\u5f97\u6bd4\u539f\u6587\u6863\u53ef\u8bfb\u4e00\u4e9b\u3002

    `vmlinux.lds`` \u662f GNU ld\uff0c\u4e00\u79cd\u94fe\u63a5\u5668\uff0c\u5c06 .o \u6587\u4ef6\u548c\u5e93\u6587\u4ef6\u8fde\u63a5\u8d77\u6765\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002ld\u4f7f\u7528\u94fe\u63a5\u811a\u672clinker script\u63a7\u5236\u3002\u8fd9\u4e2a\u6587\u4ef6\u91cc\u6709\u5199\uff1a

    \u6211\u4eec\u9605\u8bfb\u4e00\u4e0b\u8fd9\u4e2a\u94fe\u63a5\u5668\u6587\u4ef6\uff0c\u5bf9\u4e4b\u540e\u7684\u5b9e\u9a8c\u5e2e\u52a9\u633a\u5927\u3002

    \u9996\u5148\u53ef\u4ee5\u7c97\u7565\u89c2\u5bdf\u5230\uff0ckernel \u7a7a\u95f4\u91cc\u662f\u5206\u6bb5(secition)\u7684\uff0c\u4e3b\u8981\u7684section\u6709\uff1a

    \u6bb5\u540d \u4e3b\u8981\u4f5c\u7528 .text \u901a\u5e38\u5b58\u653e\u7a0b\u5e8f\u6267\u884c\u4ee3\u7801 .rodata \u901a\u5e38\u5b58\u653e\u5e38\u91cf\u7b49\u53ea\u8bfb\u6570\u636e .data \u901a\u5e38\u5b58\u653e\u5df2\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf \u9759\u6001\u53d8\u91cf .bss \u901a\u5e38\u5b58\u653e\u672a\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf \u9759\u6001\u53d8\u91cf

    \u518d\u7ec6\u81f4\u4e00\u70b9\u53bb\u89c2\u5bdf\u91cc\u9762\u7684\u7b26\u53f7\u3002

    \u7f16\u8bd1\u51fa\u7684\u6587\u4ef6\u91cc\uff1a

    "},{"location":"CS/OS/lab/#risc-v","title":"RISC-V \u65f6\u949f\u4e2d\u65ad","text":"

    \u64cd\u4f5c\u7cfb\u7edf\u5728\u542f\u52a8\u540e\u7531\u4e8b\u4ef6(event)\u9a71\u52a8\uff0c\u6211\u4eec\u5c06\u5f15\u5165\u4e00\u79cd\u4e8b\u4ef6trap\uff0ctrap\u7ed9\u4e86os\u4e0e\u8f6f\u786c\u4ef6\u4ea4\u4e92\u7684\u80fd\u529b\u3002\u5728boot\u9636\u6bb5opensbi\u5b9e\u73b0\u4e86M\u6001\u7684trap\u5904\u7406\u3002\u6211\u4eec\u5b9e\u73b0\u7684\u662fs\u6001\u7684trap\u5904\u7406\u3002

    \u5e76\u4e14\u6211\u4eec\u660e\u786e\u4e00\u4e0b Interrupt, Exception \u548c Trap \u7684\u533a\u522b (from riscv unprivileged spec)\uff1a

    \u5b9e\u9a8c\u624b\u518c\u5219\u7ed9\u4e86\u4e0b\u8868\uff0c\u867d\u7136\u91cc\u9762\u6ca1\u6709\u8bb2\u5230 trap\uff0c\u4f46\u662f\u8fd9\u4e2a\u5bf9\u4e8e interrupt \u548c exception \u7684\u89e3\u91ca\u66f4\u6e05\u695a\u3002

    Interrupt Exception hardware generated software generated Asynchronous external requests (generated by e.g. keyboard or printer) synchronous internal requests for services based upon abnormal events (generated by e.g. illegal instructions, illegal address, overflow, etc.) normal events abnormal events

    \u7406\u89e3\u4e86\u4e0a\u8ff0\u4e24\u4e2a\u6982\u5ff5\u540e\u53ef\u4ee5\u628a trap \u5f53\u4f5c\u4e00\u79cd\u7edf\u79f0\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a trap = interrupt + exception\u3002\u6211\u4eec\u540e\u7eed\u5b9e\u73b0\u7684 trap_handler() \u65e2\u8981\u5904\u7406\u4e2d\u65ad\u4e5f\u8981\u5904\u7406\u5f02\u5e38\u3002

    \u8981\u5b9e\u73b0\u7684\u4e2d\u65ad\u7684\u6d41\u7a0b\u5982\u4e0b\uff0c\u53ef\u4ee5\u53c2\u7167\u8fd9\u4e2a\u5b8c\u6210 do_timer() switch_to() schedule() \u7b49\u51fd\u6570\uff1a

    "},{"location":"CS/OS/lab/#riscv","title":"RISCV \u5bc4\u5b58\u5668","text":"

    \u56de\u5fc6\u5185\u5b58\u7ed3\u6784\uff08\u5982\u679c\u4f60\u660e\u786e\u77e5\u9053\u5bc4\u5b58\u5668\u662f\u4ec0\u4e48\u5c31\u4e0d\u7528\u56de\u5fc6\u4e86\uff09\uff0c\u53ef\u89c1\u5bc4\u5b58\u5668\u5e76\u4e0d\u5728\u8fd0\u884c\u5185\u5b58\u91cc\uff1a

    \u5c0f/\u5feb <---------------> \u5927/\u6162\n[\u5bc4\u5b58\u5668] - [cache] - [\u5185\u5b58] - [\u5916\u5b58]\n

    riscv\u670932\u4e2a\u901a\u7528\u5bc4\u5b58\u5668 + \u5f88\u591a\u63a7\u5236\u72b6\u6001\u5bc4\u5b58\u5668 (control and status registers (CSRs))\u3002riscv \u7ed9\u6bcf\u4e2a\u5bc4\u5b58\u5668\u6709\u4e2a\u5143\u4fe1\u606f\uff0c\u8fd9\u4e2a\u5143\u4fe1\u606f\u5171\u7528 12-bit \u6765\u5b58\u50a8\u5373 csr[11:0]\uff0c\u6240\u4ee5\u4e00\u5171\u652f\u6301 4096 \u4e2a\u5bc4\u5b58\u5668\u3002\u5177\u4f53\u800c\u8a00\uff0ccsr[11:0] \u8fd9\u4e2a\u6570\u636e\u7ed3\u6784\u6bcf\u4e2a\u4f4d\u7684\u610f\u4e49\u5206\u914d\u5982\u4e0b\uff1a

    \u4f4d\u6570 11:10 9:8 7:4 \u957f\u5ea6 2 2 4 \u4f5c\u7528 11=read-only\uff0cother=read/write\uff1f \u80fd\u8bbf\u95ee\u8be5csr\u7684\u6700\u4f4e\u7684\u6743\u9650\u6a21\u5f0f \u6211\u731c\u662f\u4fdd\u7559\u7ed9\u6bcf\u4e2acsr\u7279\u5b9a\u7684

    \u9996\u5148\uff0c\u901a\u7528\u5bc4\u5b58\u5668\u6709\u5982\u4e0b\u8fd9\u4e9b\uff1a

    \u5728\u7f16\u5199\u6c47\u7f16\u4ee3\u7801\u7684\u65f6\u5019\u4e00\u822c\u4f7f\u7528\u5bc4\u5b58\u5668\u7684abi\u7684\u540d\u5b57\u800c\u4e0d\u662f\u5bc4\u5b58\u5668\u7684\u7f16\u53f7

    \u800c\u4e0b\u9762\u8981\u5355\u72ec\u8bb2\u4e00\u4e0b csr\u3002

    sstatus (supervisor status register)

    The sstatus register is an SXLEN(\u4ee3\u886832\u621664)-bit read/write register formatted as follows. \u6211\u4eec\u7528\u7684\u662f64\u4f4d\u3002

    \u4e5f\u5c31\u662f\u8bf4\u8fd9\u4e2a\u5bc4\u5b58\u5668\u628a\u5f88\u591a\u4e8b\u4ef6\u7684\u72b6\u6001\u90fd\u75280\u62161\u8868\u793a\uff0c\u62fc\u5230\u4e86\u540c\u4e00\u4e2a\u5bc4\u5b58\u5668\u91cc\u3002

    \u4f4d\u6570 \u540d\u79f0 \u7f6e1\u8868\u793a \u7f6e0\u8868\u793a 1 SIE \u54cd\u5e94\u6240\u6709\u7684S\u6001trap \u7981\u7528\u6240\u6709S\u6001trap 5 SPIE \u5728trap\u53d1\u751f\u524d\u7684SIE=1 \u5728trap\u53d1\u751f\u524d\u7684SIE=0 8 SPP \u5f53\u4e2d\u65ad\u53d1\u751f\u5b8c\u7684\u65f6\u5019\uff0c\u8fd4\u56de\u5230S-mode \u5f53\u4e2d\u65ad\u53d1\u751f\u5b8c\u7684\u65f6\u5019\uff0c\u8fd4\u56de\u5230U-mode

    \u624b\u518c\u91cc\u8fd8\u4ecb\u7ecd\u7684\u4f4d\u6709

    sie (supervisor interrupt enable register)

    \u5982\u679c\u5f00\u542f\u4e86sstatus[SIE]\uff0c\u5c31\u4f1a\u6839\u636esie\u4e2d\u7684\u6bd4\u7279\u4f4d\uff0c\u51b3\u5b9a\u662f\u5426\u5904\u7406interrupt

    Bits sip.SEIP and sie.SEIE are the interrupt-pending and interrupt-enable bits for supervisor- level external interrupts. If implemented, SEIP is read-only in sip, and is set and cleared by the execution environment, typically through a platform-specific interrupt controller. Bits sip.STIP and sie.STIE are the interrupt-pending and interrupt-enable bits for supervisor- level timer interrupts. If implemented, STIP is read-only in sip, and is set and cleared by the execution environment. Bits sip.SSIP and sie.SSIE are the interrupt-pending and interrupt-enable bits for supervisor- level software interrupts. If implemented, SSIP is writable in sip and may also be set to 1 by a platform-specific interrupt controller.

    stvec (supervisor trap vector base address register)

    \u4e2d\u65ad\u5411\u91cf\u8868\u57fa\u5740.

    WARL\u662f\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f\u7684\u5730\u5740

    MODE\u662f

    Value mode \u63cf\u8ff0 0 Direct \u6a21\u5f0f \u9002\u7528\u4e8e\u7cfb\u7edf\u4e2d\u53ea\u6709\u4e00\u4e2a\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f, \u5176\u6307\u5411\u4e2d\u65ad\u5904\u7406\u5165\u53e3\u51fd\u6570 \uff08 \u672c\u5b9e\u9a8c\u4e2d\u6211\u4eec\u6240\u7528\u7684\u6a21\u5f0f \uff09 1 Vectored\u6a21\u5f0f \u6307\u5411\u4e2d\u65ad\u5411\u91cf\u8868\uff0c \u9002\u7528\u4e8e\u7cfb\u7edf\u4e2d\u6709\u591a\u4e2a\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f \u22652 \u4fdd\u7559

    sscratch (supervisor scratch register)

    Typically, sscratch is used to hold a pointer to the hart-local supervisor context while the hart is executing user mode. At the beginning of a trap handler, sscratch is swapped with a user register to provide an initial working register.

    \u5728\u672c\u6b21\u5b9e\u9a8c\u4e2d\uff0c\u6211\u4eec\u62ffsscratch\u8bb0\u5f55s-mode\u7684stack pointer\uff0c\u5728trap\u53d1\u751f\u7684\u65f6\u5019\u4e0eu-mode stack pointer\u4ea4\u6362\uff08\u597d\u50cf\u662f\u6765\u7740\u5fd8\u4e86TODO\u4e00\u4f1a\u6838\u5b9e\uff09

    sepc (supervisor exception program counter)

    \u4f1a\u8bb0\u5f55 trap \u5904\u7406\u8fc7\u540e\u7684\u8fd4\u56de\u5730\u5740\u3002

    scause (supervisor cause register)

    \u4f1a\u8bb0\u5f55 trap \u53d1\u751f\u7684\u539f\u56e0\uff0c\u8fd8\u4f1a\u8bb0\u5f55\u8be5 trap \u662f\u00a0Interrupt\u00a0\u8fd8\u662f\u00a0Exception\u3002\u539f\u56e0\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a

    stval (supervisor trap value register)

    The stval register can optionally also be used to return the faulting instruction bits on an illegal instruction exception (sepc points to the faulting instruction in memory). If stval is written with a nonzero value when an illegal-instruction exception occurs, then stval will contain the shortest of:

    \u0088 the actual faulting instruction \u0088 the first ILEN bits of the faulting instruction \u0088 the first SXLEN bits of the faulting instruction

    The value loaded into stval on an illegal-instruction exception is right-justified and all unused upper bits are cleared to zero.

    satp (supervisor address translation and protection register)

    \u8bb0\u5f55\u6700\u9ad8\u7ea7\u9875\u8868\u7684\u7269\u7406\u5730\u5740\u3002MODE\u4f4d=8\u65f6\uff0c\u4f7f\u7528Sv39\u6a21\u5f0f\u865a\u62df\u5730\u5740\uff08\u672c\u5b9e\u9a8c\uff09

    \u4ee5\u4e0b\u662f\u65f6\u949f\u4e2d\u65ad\u76f8\u5173\u7684\u5bc4\u5b58\u5668\uff1a

    mtime

    \u8ba1\u65f6\u5668\uff0c\u4ee5\u6052\u5b9a\u9891\u7387\u81ea\u589e\uff08\u6211\u8bb0\u5f97\u5728\u672c\u5b9e\u9a8c\u91cc\u662f\u591a\u5c11\u5206\u4e4b\u4e00\u79d2\uff09

    mtimecmp\uff08machine timer register\uff09

    \u4e0b\u4e00\u6b21\u65f6\u949f\u4e2d\u65ad\u7684\u4e2d\u65ad\u70b9

    mcounteren\uff08counter enable register\uff09

    \uff08\u672c\u5b9e\u9a8c\u4e2d\u4e0d\u7528\u7ba1\uff0c\u4f46\u662f\u8bf4\u660e\u4e00\u4e0b\uff1a\uff09mtime\u672c\u6765\u662fm\u6001\u7684\u5bc4\u5b58\u5668\uff0c\u5728s\u6001\u4e0d\u80fd\u8bfb\u5199\uff0c\u4f46\u662fopensbi\u5df2\u7ecf\u8bbe\u7f6e\u8fc7\u53ef\u4ee5\u8bfb\u5199m\u6001

    "},{"location":"CS/OS/lab/#_6","title":"\u5bc4\u5b58\u5668\u64cd\u4f5c","text":"

    \u64cd\u4f5ccsr\u5bc4\u5b58\u5668\u7684riscv\u6307\u4ee4\u96c6 TODO\u5f85\u6574\u7406

    func scr rs1 rd

    \u5316\u7528\u4e00\u4e2a\u6682\u65f6\u4e0d\u60f3\u53bb\u627e\u6765\u6e90\u7684 CSDN \u5e16\u5b50\u7684\u603b\u7ed3\uff1a

    "},{"location":"CS/OS/lab/#lab2","title":"lab2","text":""},{"location":"CS/OS/lab/#_7","title":"\u7ebf\u7a0b","text":"

    \u672c\u5b9e\u9a8c\u5efa\u7acb\u7684\u7ebf\u7a0b\u90fd\u662f\u5185\u6838\u6001\u7ebf\u7a0b\u3002\u4e00\u4e2a\u4f9d\u636e\u5c31\u662f\u67d0\u4e2a\u7ebf\u7a0b trap \u540e\u4e0d\u4f1a\u963b\u585e\u5176\u5b83\u7ebf\u7a0b\u3002

    \u7ebf\u7a0b\u7684 task_struct \u53ef\u4ee5\u7406\u89e3\u4e3a\u7406\u8bba\u8bfe\u4e0a\u8bb2\u7684 PCB (\u662f\u4e0d\u662f\u8be5\u53eb TCB\uff1f)\u3002\u91cc\u9762\u7684\u4e1c\u897f\u4f1a\u968f\u7740\u9010\u4e2a lab \u6dfb\u52a0\u8fdb\u53bb\uff0c\u6700\u7ec8\u4f1a\u6709\u4ee5\u4e0b\u4e1c\u897f\uff1a

    Warning

    TODO \u4ee5\u4e0b\u5185\u5bb9\u9700\u8981\u518d\u68c0\u67e5\uff0c\u5ffd\u7136\u5206\u4e0d\u6e05\u6bcf\u4e2a\u7ebf\u7a0b\u603b\u5171\u662f\u5f00\u4e86\u4e00\u4e2a\u8fd8\u662f\u4e24\u4e2a\u5185\u5b58\u7a7a\u95f4

    \u7ebf\u7a0b\u5185\u5b58\u7a7a\u95f4\u7ed3\u6784\u5982\u4e0b\u3002

    \u5185\u6838\u865a\u62df\u5b58\u50a8\u5668 \u7528\u6237\u4e0d\u53ef\u89c1\u7684\u5b58\u50a8\u5668 0xc000 0000 \u7528\u6237\u6808 \u2190 sp 0x4000 0000 \u5171\u4eab\u5e93\u7684\u5b58\u50a8\u5668\u6620\u5c04\u533a\u57df \u8fd0\u884c\u65f6\u5806\uff08\u7531malloc\u521b\u5efa\uff09 \u2190 brk \u8bfb\u5199\u6bb5 .data .bss \u4ece\u53ef\u6267\u884c\u6587\u4ef6\u52a0\u8f7d \u53ea\u8bfb\u6bb5 .init .text .rodata \u4ece\u53ef\u6267\u884c\u6587\u4ef6\u52a0\u8f7d 0x0804 8000 \u672a\u7528\u7684 \u4ece\u53ef\u6267\u884c\u6587\u4ef6\u52a0\u8f7d"},{"location":"CS/OS/lab/#lab3","title":"lab3","text":"

    \u5230\u672c\u5b9e\u9a8c\u7ed3\u675f\u65f6\uff0c\u6211\u4eec\u7684\u7a0b\u5e8f\u5c06\u8981\u5b9e\u73b0\u8fd9\u6837\u4e00\u4e2a\u4ece\u542f\u52a8\u5230\u5f00\u542f\u6620\u5c04\u7684\u8fc7\u7a0b\uff08\u4e5f\u5bf9\u5e94 head.S \u5f00\u5934\u7684\u4e00\u5806\u51fd\u6570\u8c03\u7528\u6d41\u7a0b\uff09\uff1a

    "},{"location":"CS/OS/lab/#virtual-memory","title":"virtual memory","text":"

    lab2\u4e2d\u6211\u4eec\u505a\u7684\u90fd\u662f\u5185\u6838\u7ebf\u7a0b\uff0c\u53ef\u4ee5\u5171\u4eab\u8fd0\u884c\u7a7a\u95f4\uff0c\u5373\u8fd0\u884c\u4e0d\u540c\u7ebf\u7a0b\u5bf9\u5185\u8bad\u7684\u4fee\u6539\u662f\u76f8\u4e92\u53ef\u89c1\u7684\u3002\u5982\u679c\u9700\u8981\u7ebf\u7a0b\u76f8\u4e92\u9694\u79bb\u5c31\u9700\u8981\u5f15\u5165\u865a\u62df\u5185\u5b58\uff0c\u65b9\u4fbf\u591a\u7ebf\u7a0b\u9ad8\u6548\u5171\u4eab\u5185\u5b58\u3002\u5982\u679c\u5f88\u865a\u5730\u53bb\u8bb2\u865a\u62df\u5185\u5b58\u7684\u4f5c\u7528\uff1a

    \u6211\u4eec\u8981\u5b9e\u73b0\u7684\u865a\u62df\u5185\u5b58\u5e03\u5c40\uff0c\u9996\u5148\u7528\u4e00\u4e2a\u622a\u56fe\u6765\u7406\u89e3\uff1a

    \u4f4e\u5730\u5740<-                                       ->\u9ad8\u5730\u5740\n\nstart_address             end_address\n    0x0                  0x3fffffffff\n     \u2502                        \u2502\n\u250c\u2500\u2500\u2500\u2500\u2518                  \u250c\u2500\u2500\u2500\u2500\u2500\u2518\n\u2193        256G           \u2193                                \n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502      User Space       \u2502    ...   \u2502  Kernel Space  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                                   \u2191      256G      \u2191\n                      \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                \u2502 \n                      \u2502                             \u2502\n              0xffffffc000000000           0xffffffffffffffff\n                start_address                  end_address\n

    \u7136\u540e\u5fc5\u987b\u8981\u641e\u660e\u767d\uff1a\u865a\u62df\u5185\u5b58\u4ece\u6765\u6ca1\u6709\u88ab\u771f\u6b63\u5f00\u8f9f\u8fc7\uff0c\u88ab\u771f\u6b63\u5f00\u8f9f\u7684\u53ea\u6709\u7269\u7406\u5185\u5b58\u3002\u6211\u4eec\u5728\u7a0b\u5e8f\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\u5f00\u7684\u53d8\u91cf\u548c alloc \u7684 page\uff0c\u90fd\u662f\u5f00\u5728 kernel \u7684\u6808\u6216\u8005\u5806\u4e0a\uff08.data\u548c.bss\u6bb5\uff09\uff0c\u56e0\u4e3a\u67e5\u5730\u5740\u65f6\u53ef\u4ee5\u67e5\u5230\u5b83\u4eec\u7684\u7269\u7406\u5730\u5740\u3002\u800c\u5404\u79cd csr \u5728 cpu \u91cc\uff0c\u4e0d\u4f1a\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u3002\u800c\u672c\u6b21\u5b9e\u9a8c\u6240\u8bb2\u7684\u201c\u5f00\u542f\u865a\u62df\u5185\u5b58\u201d\uff0c\u672c\u8d28\u4e0a\u53ea\u662f\u8bbe\u8ba1\u4e00\u4e2a\u865a\u62df\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8f6c\u6362\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u653e\u5728\u9875\u8868\u91cc\u3002

    "},{"location":"CS/OS/lab/#sv39","title":"Sv39 \u7684\u9875\u8868\u9879","text":"

    \u7406\u89e3\u4e00\u4e0b\u9875\u8868\u9879\uff08pte\uff09\u3002\u5b83\u7684\u4f4e\u4f4d\uff1a

    "},{"location":"CS/OS/lab/#_8","title":"\u5730\u5740\u7ffb\u8bd1\u8fc7\u7a0b","text":"

    create_mapping() \u51fd\u6570\u904d\u5386\u6574\u4e2a\u6620\u5c04\u5927\u5c0f\uff0c\u4f9d\u6b21\u6309\u4e8c\u7ea7\u9875\u8868\uff08\u5373\u6839\u9875\u8868\u7684\u4e0b\u4e00\u7ea7\uff09\u2192\u4e09\u7ea7\u9875\u8868\u2192\u7269\u7406\u9875\uff0c\u68c0\u67e5\u9875\u8868\u9879\u7684V bit\u770b\u9875\u8868\u9879\u662f\u5426\u5b58\u5728\uff0c\u4e0d\u5b58\u5728\u5219\u7528kalloc() \u5206\u914d\u4e00\u9875\u4f5c\u4e3a\u9875\u8868\u76ee\u5f55\uff1b\u5b58\u5728\u5219\u5728\u9875\u8868\u9879\u4e2d\u8bb0\u5f55\u9875\u8868\u7684\u7269\u7406\u5730\u5740\u3002

    pte : [ PPN2: 53-28 ][ PPN1: 27-19 ][ PPN0: 18-10 ][ perm: 9-0 ]

    vm_addr: [ VPN2: 38-30 ][ VPN1: 29-21 ][ VPN0:20-12 ][ offset: 11-0 ]

    \u56e0\u4e3a\u67e5\u8be2\u4e09\u7ea7\u9875\u8868\u7684\u6d41\u7a0b\u4e3a\uff1a

    \u6240\u4ee5\u53cd\u63a8\u8bbe\u7f6e\u7684\u6d41\u7a0b\u4e3a\uff1a

    "},{"location":"CS/OS/lab/#heads-todo-va2pa_offset","title":"\u4e3a\u4ec0\u4e48\u5728 head.S \u91cc\u4e00\u5f00\u59cb\u8981\u7ed9\u9875\u8868\u9879\u5730\u5740 (TODO\u574f\u4e86\u4e0d\u8bb0\u5f97\u662f\u4e0d\u662f\u5b83\u4e86) \u51cf\u53bb\u4e00\u4e2a VA2PA_offset","text":"

    \u5728 2023 \u5e74\u7248\u7684\u5b9e\u9a8c\u4e2d\uff0cvmlinux.lds \u4e2d\u8bbe\u7f6e\u4e86\u5c06\u7f16\u8bd1\u51fa\u7684\u7b26\u53f7\u8868\u90fd\u7528\u865a\u62df\u5730\u5740\u6765\u8868\u793a\uff0c\u65b9\u4fbf\u8c03\u8bd5\u3002\u4e5f\u5373\u7a0b\u5e8f\u8fd0\u884c\u5230\u6b64\u5904\u8bfb\u5230\u7684\u9875\u8868\u9879\u5730\u5740\u662f\u865a\u62df\u5730\u5740\u3002\u663e\u7136\uff0c\u5728 setup_vm() \u4e4b\u524d\uff0c\u865a\u62df\u5185\u5b58\u8fd8\u6ca1\u6709\u88ab\u5f00\u542f\uff0c\u6240\u4ee5\u8981\u51cf\u6389\u4e00\u4e2a\u504f\u79fb\u91cf\u4f7f\u5176\u80fd\u8bfb\u5230\u9875\u8868\u9879\u7684\u7269\u7406\u5730\u5740\u3002\u5728 relocate: \u5904\u7406\u504f\u79fb\u4e4b\u540e\u5c31\u4e0d\u7528\u7ba1\u4e86\u3002

    "},{"location":"CS/OS/lab/#lab4","title":"lab4","text":""},{"location":"CS/OS/lab/#_9","title":"\u66f4\u65b0\u540e\u7684\u865a\u62df\u5185\u5b58\u5e03\u5c40","text":"

    \u6211\u4eec\u56de\u5fc6 lab3 \u91cc\u865a\u62df\u5730\u5740\u53ea\u7528\u4e86\u9ad8\u4f4d\uff0c\u4f4e\u4f4d\u6ca1\u6709\u7528\uff0c\u5728\u672c\u5b9e\u9a8c\u6211\u4eec\u8981\u5c06\u4f4e\u4f4d 0x0-0x4000000 \u5206\u7ed9\u7528\u6237\u8fdb\u7a0b\u3002\u800c\u7528\u6237\u8fdb\u7a0b\u7684\u4ee3\u7801\u5b9e\u9645\u5728\u7269\u7406\u5730\u5740\u4e0a\u5206\u914d\u51fa\u6765\u7684\u67d0\u4e2a\u5730\u65b9\u3002\u603b\u4e4b\uff0c\u8981\u5b9e\u73b0\u4ee5\u4e0b\u7684\u5185\u5b58\u5e03\u5c40\uff1a

                   PHY_START   new allocated memory            allocated space end                              PHY_END\n                   \u2502         \u2502                                \u2502                                                 \u2502\n                   \u25bc         \u25bc                                \u25bc                                                 \u25bc\n       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n PA    \u2502           \u2502         \u2502 uapp (copied from _sramdisk)   \u2502                                                 \u2502\n       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                             \u25b2                                \u25b2\n       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                                \u2502\n       \u2502            (map)                                     \u2502\n       \u2502                        \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n       \u2502                        \u2502\n       \u2502                        \u2502\n       \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n VA    \u2502           UAPP         \u2502                                                                   \u2502u mode stack\u2502\n       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n       \u25b2                                                                                                         \u25b2\n       \u2502                                                                                                         \u2502\n\n   USER_START                                                                                                USER_END\n
    "},{"location":"CS/OS/lab/#riscv_1","title":"riscv\u5904\u7406\u5668\u652f\u6301\u7684\u6a21\u5f0f","text":"

    lab3\u521b\u5efa\u7684\u90fd\u662f\u5185\u6838\u7ebf\u7a0b \u516c\u7528\u4e86\u5730\u5740\u7a7a\u95f4\uff08\u9875\u8868swapper_pg_dir\uff09\u3002\u8981\u5f15\u5165\u7528\u6237\u6001\u8fdb\u7a0b\u9700\u8981\u505a\uff1a

    \u5177\u4f53\u5728\u6211\u4eec\u7684\u5b9e\u9a8c\u64cd\u4f5c\u4e2d\uff0c\u5b9e\u73b0\u7528\u6237\u6001\u548c\u5185\u6838\u6001\u5207\u6362\u7684\u65b9\u6cd5\u662f\uff1asstatus[SUM] \u548c PTE[U]

    Warning

    \u60f3\u5199\u4e00\u4e0b\u5728\u6c47\u7f16\u4ee3\u7801\u91cc\u7684\u64cd\u4f5c\uff0c\u5fd8\u5e72\u51c0\u4e86\uff0c\u6574\u4f53\u601d\u8def\u662f\u8fd9\u6837\u7684\uff0c\u4f46\u4e00\u4e9b\u7ec6\u8282\u5f85\u6838\u5b9e

    \u5e76\u4e14\u5728\u6c47\u7f16\u4ee3\u7801\u91cc\u9700\u8981\u5b9e\u73b0\u4e00\u7cfb\u5217 csr \u8bfb\u5199\u64cd\u4f5c\uff1a

    "},{"location":"CS/OS/lab/#buddy-system","title":"buddy system","text":"

    \u4e00\u79cd\u7269\u7406\u5185\u5b58\u7ba1\u7406\u7b97\u6cd5\uff0c\u7a7a\u95f2\u7a7a\u95f4\u9996\u5148\u88ab\u770b\u6210 2^N \u4e2a\u7269\u7406\u9875\u7684\u5927\u7a7a\u95f4\uff0c\u5f53\u4e00\u4e2a\u5927\u5c0f\u4e3a m \u7684\u9875\u8bf7\u6c42\u5185\u5b58\u5206\u914d\u65f6\uff0c\u4e0d\u505c\u628a\u7a7a\u95f4 /2 \u5212\u5206\uff0c\u6700\u540e\u627e\u5230\u6700\u63a5\u8fd1m\u76842\u7684\u6b21\u65b9\u7684\u4e00\u4e2a\u7a7a\u95f4\u5927\u5c0f\u5206\u7ed9 m\u3002\u5f53\u5757\u91ca\u653e\u65f6\uff0c\u5206\u914d\u5668\u5c31\u4f1a\u627e\u5230\u5176\u5b83\u7a7a\u95f2\u7684\u4f19\u4f34\u5757\u53bb\u5408\u5e76\u3002\u5b83\u7684\u5b9e\u73b0\u5728\u8fd9\u4e2a\u6587\u7ae0\u91cc\u8bb2\u5f97\u66f4\u597d Lab 6\uff1aRISC-V \u52a8\u6001\u5185\u5b58\u5206\u914d\u4e0e\u7f3a\u9875\u5f02\u5e38\u5904\u7406 - \u77e5\u4e4e (zhihu.com)\u3002

    "},{"location":"CS/OS/lab/#elf","title":"elf \u6587\u4ef6","text":"

    \u4e00\u4e2a elf \u6587\u4ef6\u50cf\u4e00\u4e2a\u5c01\u88c5\u590d\u6742\u7248\u7684\u4e8c\u8fdb\u5236\u7528\u6237\u7a0b\u5e8f\u3002\u7528\u62bd\u8c61\u7684\u753b\u56fe\u7ed9\u5b83\u7684\u7ed3\u6784\u505a\u4e00\u4e2a\u6bd4\u55bb\uff08\u5bf9\u4e0d\u8d77\u592a\u62bd\u8c61\u4e86\uff09\uff1a

    Elf_Ehdr     ehdr->e_phoff\n\u2b07\ufe0f            \u2b07\ufe0f\n[            [type: ???][type: LOAD][type: ???] ]\n

    \u5c31\u662f elf \u6587\u4ef6\u91cc\u6563\u843d\u7740\u51e0\u4e2a\u5c0f\u6bb5\uff0c\u5176\u4e2d\u4e00\u4e2a\u7c7b\u578b\u4e3a LOAD \u7684\u6bb5\u662f\u9700\u8981\u590d\u5236\u5230\u7ebf\u7a0b\u4ee3\u7801\u6bb5\u7684\uff0c\u4f46\u4e0d\u4e00\u5b9a\u590d\u5236\u5230\u7ebf\u7a0b\u5934\u7684\u8d77\u59cb\u5730\u5740 0x0\uff0cp_vaddr \u4f1a\u544a\u8bc9\u4f60\u8fd9\u6bb5\u4ee3\u7801\u5e0c\u671b\u88ab\u590d\u5236\u5230\u54ea\u91cc\u53bb\u3002e_entry \u4e5f\u8d34\u5fc3\u544a\u8bc9\u4f60\u7b2c\u4e00\u6761\u4ee3\u7801\u6307\u4ee4\u7684\u8d77\u59cb\u5730\u5740\u5728\u54ea\u3002\u603b\u4e4b\uff0c\u4f60\u9700\u8981\u5148\u901a\u8fc7\u4e00\u4e9b\u504f\u79fb\u91cf\u5728 Elf64_Ehdr \u8fd9\u4e2a\u6307\u9488\u91cc\u627e\u5230\u7b2c\u4e00\u4e2a segment\uff0c\u7136\u540e\u4ee5\u4e00\u4e2a Elf63_phdr \u7684\u5927\u5c0f\u4e3a\u5355\u4f4d\uff0c\u6328\u4e2a\u53bb\u5bfb\u627e\u4e00\u4e2a\u7c7b\u578b\u4e3a LOAD \u7684 segment\u3002\u7b49\u627e\u5230\u4e86\u5c31\u53ef\u4ee5\u62f7\u8d1d\u4e86\u3002

    \u5982\u679c\u4f60\u6309\u7167\u4e00\u5806\u6307\u9488\u7684\u5199\u6cd5\u88ab\u641e\u5f97\u6655\u5934\u8f6c\u5411\uff0c\u751a\u81f3\u53ea\u662f\u5148\u7528 readelf -h \u67e5\u770b\u4e00\u4e0b elf \u6587\u4ef6\u91cc\u5404\u4e2a\u4e1c\u897f\u7684\u5730\u5740\uff08\u67e5\u770b\u540e\u53ef\u4ee5\u53d1\u73b0\u4e0e\u5b9e\u9a8c\u6307\u5bfc\u4e2d\u7ed9\u7684\u4f8b\u5b50\u5c31\u662f\u540c\u4e00\u4e2a\u6587\u4ef6\uff09\uff0c\u7136\u540e\u76f4\u63a5\u628a\u6574\u4e2a uapp \u7a0b\u5e8f\u5168\u90e8\u62f7\u5230\u8fdb\u7a0b\u91cc\u6765\uff0c\u76f4\u63a5\u628a __dummy \u8fd4\u56de\u5730\u5740\u6307\u5230\u4f60\u5728\u6587\u4ef6\u91cc\u8bfb\u51fa\u6765\u7684\u90a3\u4e2a\u4ee3\u7801\u8d77\u59cb\u5730\u5740\uff0c\u751a\u81f3\u90fd\u80fd\u8dd1\u3002\u5728\u8dd1\u8d77\u6765\u4e4b\u540e\uff0c\u6839\u636e\u4f60\u7684\u7406\u89e3\u4e00\u70b9\u4e00\u70b9\u628a\u8bbe\u7f6e\u6307\u9488\u7684\u4ee3\u7801\u6309\u7167\u542b\u4e49\u66ff\u6362\u4e0a\uff0c\u6211\u611f\u89c9\u8fd9\u6837\u53cd\u7740\u505a\u4e5f\u884c\u3002

    "},{"location":"CS/OS/lab/#lab5","title":"lab5","text":"

    Warning

    \u4e0b\u9762\u51e0\u4e2a\u5b9e\u9a8c\u6211\u5199\u5f97\u6709\u70b9\u7b80\u7565\uff0c\u5c0f\u90e8\u5206\u56e0\u4e3a\u6211\u4e0d\u8bb0\u5f97\u4e86\uff0c\u5927\u90e8\u5206\u56e0\u4e3a\u6211\u81ea\u6211\u611f\u89c9\u6ca1\u6709\u5403\u900f\u8fd9\u4e2a\u5b9e\u9a8c\uff0c\u4e0d\u73ed\u95e8\u5f04\u65a7\u4e86\u3002\u4f46\u662f\u8fd9\u4e2a\u5730\u65b9\u53d1\u81ea\u5185\u5fc3\u5730\u60f3\u7559\u4e2a TODO \u5e0c\u671b\u80fd\u6709\u673a\u4f1a\u8865\u5b8c\u3002

    \u672c\u5b9e\u9a8c\u4e0e lab4 \u5185\u5b58\u5206\u914d\u7684\u533a\u522b\u662f\uff0c\u4e3a\u4e86\u9632\u6b62\u7269\u7406\u5185\u5b58\u4e0d\u8db3\uff0c\u5728 task \u521d\u59cb\u5316\u8bf7\u6c42\u7a7a\u95f4\u65f6\uff0c\u5148\u4e0d\u5206\u914d\u7269\u7406\u5185\u5b58\uff0c\u800c\u662f\u7528 do_mmap() \u5148\u628a task \u7684\u8bf7\u6c42\u7684\u6240\u6709\u53c2\u6570\u8bb0\u5f55\u4e0b\u6765\uff0c\u7b49 task \u771f\u6b63\u53bb\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u5fc5\u7136\u4f1a\u89e6\u53d1 page fault\uff0c\u7136\u540e\u5728 page fault handler \u91cc\u6839\u636e\u8bb0\u5f55\u7684\u53c2\u6570\uff0c\u518d\u5206\u914d\u7269\u7406\u5185\u5b58\u3002

    "},{"location":"CS/OS/lab/#lab6","title":"lab6","text":"

    \u5b9e\u9a8c\u4e3b\u8981\u76ee\u6807\u662f\u5b9e\u73b0\u521b\u5efa\u5b50\u8fdb\u7a0b\u7684\u903b\u8f91\uff0c\u5373\u5728\u7528\u6237\u7a0b\u5e8f\u8c03\u7528fork()\u51fd\u6570\uff0c\u4ea7\u751f220\u53f7\u7cfb\u7edf\u8c03\u7528\u7684\u65f6\u5019\uff0c\u5728sys_clone()\u8fd9\u4e2a\u51fd\u6570\u91cc\u521b\u5efa\u5b50\u8fdb\u7a0b\uff0c\u5e76\u4f7f\u5176\u52a0\u5165\u88ab\u8c03\u7528\u7684task\u961f\u5217\u3002

    "},{"location":"CS/OS/lab/#lab7","title":"lab7","text":"

    Warning

    lab7 \u6211\u53ea\u5b8c\u6210\u4e86\u5360 60% \u7684\u7b2c\u4e00\u90e8\u5206\uff0c\u4f46\u5176\u5b9e\u5de5\u4f5c\u91cf\u6bd4\u8f83\u5927\u7684\u8fd8\u5728\u7b2c\u4e8c\u90e8\u5206\u3002\u6211\u8fd9\u91cc\u53ea\u80fd\u603b\u7ed3\u7b2c\u4e00\u90e8\u5206\u4e86\u3002

    \u672c\u5b9e\u9a8c\u6bcf\u4e2atask\u90fd\u6709\u4e00\u4e2a\u7ed3\u6784\u4f53\u53bb\u7ef4\u62a4\u5df2\u7ecf\u6253\u5f00\u7684\u6587\u4ef6\u8868\u3002\u672c\u5b9e\u9a8c\u9996\u5148\u4fee\u6539task struct\uff0c\u5728\u6bcf\u4e2atask struct\u4e2d\u6dfb\u52a0\u4e86\u4e00\u4e2a\u9875(struct file* \u578b)\u53bb\u7ef4\u62a4\u8fd9\u4e2a\u6587\u4ef6\u8868\u3002

    \u6bcf\u4e2a\u6587\u4ef6\u8868\u6709\u4e00\u4e9b\u51fd\u6570\u6307\u9488\uff0c\u5206\u522b\u6307\u5411\u5bf9\u6587\u4ef6\u7684\u8bfb\u5199\u64cd\u4f5c\u51fd\u6570\u3002\u9996\u5148\u9700\u8981\u5b9e\u73b0\u8fd9\u4e9b\u51fd\u6570\uff0c\u5982 stdout_write() \u548c stdin_read() \u7b49\u3002

    \u5f53\u7528\u6237\u7a0b\u5e8f\u4ea7\u751f\u6587\u4ef6\u8bfb\u5199\u7684 system call \u65f6\uff0ctrap_handler() \u4e2d\u9700\u8981\u5b9e\u73b0\u5bf9\u8fd9\u4e9b system call \u7684\u5904\u7406\u51fd\u6570\u3002\u5177\u4f53\u64cd\u4f5c\u5c31\u662f\u6355\u83b7\uff0c\u7136\u540e\u4ec0\u4e48\u4e5f\u4e0d\u505a\uff0c\u76f4\u63a5\u628a\u53c2\u6570\u4ea4\u7ed9\u4e0a\u8ff0\u5b9e\u73b0\u7684\u6587\u4ef6\u8bfb\u5199\u51fd\u6570\u6765\u64cd\u4f5c\u3002

    "},{"location":"CS/OS/lab/#_10","title":"\u5e38\u89c1\u95ee\u9898\u4e4b\u8865\u5145\u53c8\u540d\u6211\u4e4b\u603b\u662f\u9047\u89c1\u95ee\u9898","text":"

    Q1: \u8fd0\u884c\u53d1\u73b0\u7a0b\u5e8f\u5728\u51e0\u4e2a\u521d\u59cb\u5316\u51fd\u6570\u4e4b\u95f4\u6765\u56de\u8df3\u8dc3\uff0c\u6bd4\u5982\u5df2\u7ecf\u5230\u4e86 set_up_vm_final()\uff0c\u53c8\u8df3\u56de set_up_vm()\uff0c\u518d\u5f80\u4e0b\u8fd0\u884c\u5c31\u5728\u8fd9\u51e0\u4e2a\u51fd\u6570\u4e4b\u95f4\u5faa\u73af\u3002\u8fdb\u5165 gdb \u8c03\u8bd5\uff0c\u5219\u53d1\u73b0\u53d1\u751f\u8df3\u8f6c\u7684\u5730\u65b9\u5e76\u6ca1\u6709\u4efb\u4f55 branch \u6216\u8005 call \u8bed\u53e5\u6307\u5411\u8df3\u5f80\u7684\u5730\u5740\uff0c\u4f46\u662f\u80fd\u89c2\u5bdf\u5230\u51fa\u73b0\u8df3\u8f6c\u7684\u5730\u65b9\uff0c\u5f80\u5f80\u662f\u8fdb\u4e86 memset() \u6216\u8005 memcopy() \u51fd\u6570\u3002

    A1: \u6574\u4e2a\u5b9e\u9a8c\u8fc7\u7a0b\u4e2d\u6211\u9047\u5230\u4e86\u4e09\u56db\u6b21\uff0c\u4e00\u5f00\u59cb\u89c9\u5f97\u662f\u4ee5\u5947\u602a\u7684\u65b9\u5f0f\u89e3\u51b3\u4e86\uff08\u6bd4\u5982\uff0c\u7a81\u7136\u53d1\u73b0\u81ea\u5df1\u5728\u521d\u59cb\u5316\u8fdb\u7a0b\uff0c\u5f15\u5165\u5916\u90e8\u9875\u8868\u65f6\u7528\u5230\u7684\u4ee3\u7801\u662f extern unsigned long *swapper_pg_dir;\uff0c\u800c\u4e0d\u662f extern unsigned long swapper_pg_dir[512] __attribute__((__aligned__(0x1000)));\uff0c\u5373\uff0c\u7f3a\u5c11\u4e86\u4e00\u4e2a\u5730\u5740\u5bf9\u9f50\u3002\u540c\u5b66\u6307\u51fa\u5982\u679c\u6ca1\u6709\u5bf9\u9f50\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u9875\u8868\u8fb9\u7f18\u7684\u4e00\u4e9b\u6570\u636e\u7684\u4e22\u5931\u635f\u574f\u3002\uff09\uff0c\u540e\u6765\u6162\u6162\u53d1\u73b0\u89c4\u5f8b\u662f\uff1a\u53d1\u751f\u8fd9\u6837\u8df3\u8f6c\u7684\u6307\u4ee4\uff0c\u90fd\u5728\u5c1d\u8bd5\u5f80 0x80000000 \u8fd9\u4e2a\u7269\u7406\u5730\u5740\u4ee5\u4e0b\u7684\u7269\u7406\u5730\u5740\u5199\u4e1c\u897f\u3002\u6211\u4eec\u6ce8\u610f\u5230 qemu \u63d0\u4f9b\u7ed9\u6211\u4eec\u7684\u7269\u7406\u5730\u5740\u90fd\u662f 0x80000000 \u4ee5\u4e0a\u7684\u5730\u5740\uff0c\u867d\u7136\u6ca1\u6709\u8003\u8bc1\uff0c\u4f46\u662f\u5408\u7406\u731c\u6d4b\u5176\u4e0b\u7684\u5730\u5740\u662f qemu \u81ea\u5df1\u7684\u4ee3\u7801\u533a\uff0c\u652f\u6301 qemu \u81ea\u5df1\u7684\u8fd0\u884c\u903b\u8f91\u3002\u5982\u679c\u4e0d\u5c0f\u5fc3\u5199\u5230\u4e86\u8fd9\u4e2a\u5730\u65b9\uff0c\u5f53\u7136\u53ef\u80fd\u53d1\u751f\u4e0d\u80fd\u89e3\u91ca\u7684 qemu \u884c\u4e3a\u3002

    \u6240\u4ee5\u5982\u679c\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u884c\u7684\u4e00\u6b65\u4e00\u6b65\u68c0\u67e5\u65b9\u6cd5\u662f\uff1a

    \u603b\u4e4b\uff0c\u6839\u672c\u76ee\u6807\u662f\u53bb\u770b\u4e00\u4e0b\u6709\u6ca1\u6709\u5f80\u7269\u7406\u5730\u5740 0x80000000 \u4ee5\u4e0b\u7684\u5730\u65b9\u5199\u4e1c\u897f\u3002

    Q2: \u8fd0\u884c\u7a0b\u5e8f\u5230\u4e00\u534a\u5361\u4f4f\uff0c\u6ca1\u6709\u4efb\u4f55\u8f93\u51fa\u4e86\uff0c\u8c03\u8bd5\u53d1\u73b0\u6700\u540e\u662f\u5728 __dummy \u7684 sret \u540e\u5361\u4f4f\u4e86\u3002

    A2: \u53ef\u4ee5\u5148\u5b9e\u73b0\u4e00\u4e2a\u6f02\u4eae\u70b9\u7684 trap_handler() \u5e2e\u52a9\u8c03\u8bd5\u3002\u8fd9\u70b9\u5728 lab7 \u7684\u6307\u5bfc\u91cc\u624d\u6709\u63d0\u793a\u5230\uff0c\u4e0d\u8fc7\u6211\u89c9\u5f97\u5e94\u8be5\u65e9\u70b9\u5b9e\u73b0\u8d77\u6765\u3002\u6bd4\u5982\uff1a

    void trap_handler(uint64 scause, uint64 sepc, struct pt_regs* regs) {  // a0, a1, a2\nuint64 stval = csr_read(stval);\n// printk(\"[S] Trap @sepc = %#llx, @scause = %#llx, @stval = %#llx\\n\", sepc, scause, stval);\nint done = 0;\n/* Interrupt */\nif ((scause >> 63) && (scause & 0x7FFFFFFFFFFFFFFF) == 5) {\nclock_set_next_event();\nprintk(\"[S] Supervisor Timer Intterupt\\n\");\ndo_timer();\n} /* Exception */\nelse {\n/* instrution addr misaligned */\nif (scause == 0) {}\n/* Instruction access fault */\nelse if (scause == 1) {}\n/* Illegal instruction */\nelse if (scause == 2) {}\n/* breakpoint */\nelse if (scause == 3) {}\n/* load addr misaligned */\nelse if (scause == 4) {}\n/* load access fault */\nelse if (scause == 5) {}\n/* store/amo addr misaligned */\nelse if (scause == 6) {}\n/* store/amo access fault */\nelse if (scause == 7) {}\n/* ecall U-mode */\nelse if (scause == 8) {\nif (sys_call_num == SYS_WRITE) {\n// ...\n} else if (sys_call_num == SYS_GETPID) {\n// ...\n} else if (sys_call_num == SYS_CLONE) {\n// ...\n}\nregs->sepc += 4; // pc + 4\n} /* ecall S-mode */\nelse if (scause == 9) {}\n/* Instruction page fault */\n/* Load page fault */\n/* Store/amo page fault */\nelse if (scause == 12 || scause == 13 || scause == 15) {\ndone = do_page_fault(scause, regs);\n} else {\nprintk(\"[S] Unhandled exception with scause = %d, sepc = %lx\\n\", scause, sepc);\nwhile (1);\n}\n}\n// if (!done) while(1);\n}\n
    \u603b\u4e4b\uff0c\u5efa\u8bae\u5bf9 trap_handler() \u505a\u7684\u6539\u8fdb\u6709\u4e24\u4ef6

    \u5982\u679c\u786e\u5b9e\u662f\u5faa\u73af trap \u5bfc\u81f4\u7684\u7a0b\u5e8f\u5361\u4f4f\uff0c\u90a3\u4e48\u6309\u6253\u5370\u7684\u4fe1\u606f\u53bb\u601d\u8003\u5c31\u53ef\u4ee5\u4e86\u3002\u5982\u679c\u8fd8\u662f\u4ec0\u4e48\u8f93\u51fa\u90fd\u6ca1\u6709\uff08\u6211\u8bb0\u5f97\u4e5f\u6709\u8fd9\u79cd\u60c5\u51b5\uff09\uff0c\u6211\u4e0d\u8bb0\u5f97\u662f\u4ec0\u4e48\u539f\u56e0\u4e86\uff0c\u4f46\u662f\u8d77\u7801\u5e2e\u4f60\u6392\u9664\u4e86\u53d1\u751f\u4e86 trap \u7684\u53ef\u80fd\u6027\uff0c\u4f60\u53ef\u4ee5\u5728\u6b64\u57fa\u7840\u4e0a\u7ee7\u7eed\u601d\u8003\u662f\u4e3a\u4ec0\u4e48\u3002

    "},{"location":"DL/","title":"\u7d22\u5f15","text":"

    \u672c\u7ae0\u8282\u5305\u62ec\u6df1\u5ea6\u5b66\u4e60\u7406\u8bba+\u5de5\u7a0b\u7b14\u8bb0\uff0c\u5df2\u5b8c\u6210\u4ee5\u4e0b\u5185\u5bb9 - NLP\u5b66\u4e60\u548c\u5de5\u7a0b\u7b14\u8bb0

    \u8fd9\u4e2a\u7d22\u5f15\u6ca1\u5199\u5b8c

    \u800c\u4e14\u6211\u4e5f\u4e0d\u8bb0\u5f97\u4e3a\u4ec0\u4e48\u4e0b\u9762\u653e\u4e86\u8fd9\u5f20\u56fe\u4e86

    "},{"location":"DL/NLPTheory/explainable_nlp/","title":"Explainable NLP","text":"

    TODO

    "},{"location":"DL/NLPTheory/explainable_nlp/#survey","title":"Survey","text":""},{"location":"DL/NLPTheory/explainable_nlp/#a-survey-of-the-state-of-explainable-ai-for-natural-language-processing","title":"A Survey of the State of Explainable AI for Natural Language Processing","text":"

    This survey thoroughly explains the state of explainable NLP. The Introduction discusses two distinguishing criteria for explanability models (1) whether the explanation is for each prediction individually or the model\u2019s prediction process as a whole, and (2) determining whether generating the explanation requires post-processing or not. In Categorization of Explanations, this paper categorizes the explanation models into local (provides information or justification for the model's prediction on a specific input) vs. global (provides similar justification by revealing how the model's predictive process works, independently of any particular input), and self-explaining (also directly interpretable, generates the explanation at the same time as the prediction, e.g. decision trees, rule-based models, and feature saliency models like attention models) vs. post-hoc (an additional operation is performed after the predictions are made). This section also states that the different categories of models can overlap. In section Aspects of Explanations, this paper introduces three types of explanation techniques: (1) explainability techniques (feature importance, surrogate model, example-driven, provenance-based, declarative induction), (2) operations to enable explainability (first-derivation saliency, layer-wise relevance propagation, and input perturbations, attention, LSTM gating signals, explainability-aware architecture design) and (3) visualization techniques (saliency, raw declarative representations, natural language explanation). The section Evaluation introduces several evaluating metrices.

    "},{"location":"DL/NLPTheory/explainable_nlp/#opinion-papers","title":"Opinion Papers","text":""},{"location":"DL/NLPTheory/explainable_nlp/#climbing-towards-nlu-on-meaning-form-and-understanding-in-the-age-of-data-2020","title":"Climbing towards NLU: On Meaning, Form, and Understanding in the Age of Data (2020)","text":"

    This paper argues that the modern NLP models trained on form has no abilities in understanding natural languages based on both the science and philosophy theories. It is structured as follows. In section Large LMs: Hype and analysis, this paper samples example pieces from news and academic literature that exaggerate the understanding abilities in using words including \"understand\"\"comprehension\"\"recall factual knowledge\", and argues that the current LMs have the ability no other than learning the surface linguistic forms of language rather than understanding them. In section What is meaning?, this paper clarifies the meaning of language as the communicative intent that a parole intends to express, and distinguishes the concept \"meaning\" and \"truth\" as the truth is the meaning that is \"grounded\" to the real world. In section The octopus test, this paper detailedly tells a thought experiment of a super intelligent octopus who can mimic the human response by never receiving the knowledge of the grounded real world of the language meaning, by which this paper argues that it might be that how the language receiver decodes the communicative intends affects the conventional meaning of language. In section More constrained thought experiments, two more thought experiments are provided, training the JAVA and training the English LMs without providing the executing methods the communicative intends, and the paper argues that such tasks are impossible. In section Human language acquisition, this paper supports its idea by providing the example of human children's acquiring knowledge is not only grounded on the world image, but also in the interaction with other people. In section Distributional semantics, this paper argues that in NLP, two methods based on the instincts above are training distributional models on corpora augmented with perceptual data, and looking to interaction data (according to Wittgenstein's \"meaning in use\").

    "},{"location":"DL/NLPTheory/explainable_nlp/#information-theory-based-compositional-distributional-semantics-2021","title":"Information Theory-based Compositional Distributional Semantics (2021)","text":"

    According to the abstract, the contribution of this paper can be concluded as proposing the notion of Information Theory-based Compositional Distributional Semantics (ICDS): (i) We first establish formal properties for embedding, composition, and similarity functions based on Shannon\u2019s Information Theory; (ii) we analyze the existing approaches under this prism, checking whether or not they comply with the established desirable properties; (iii) we propose two parameterizable composition and similarity functions that generalize traditional approaches while fulfilling the formal properties; and finally (iv) we perform an empirical study on several textual similarity datasets that include sentences with a high and low lexical overlap, and on the similarity between words and their description. In section Introduction, the author introduces Frege's concepts of compositionality and contextuality, which respectively refers to that \"the meaning of the whole is a function of the meaning of its parts and the syntactic way in which they are combined\", and that \"the meaning of words and utterances is determined by their context\". This section also introduces the main concern of lacking systematicity by the linguists to the NLP, where systematicity is defined as \"A system is said to exhibit systematicity if, whenever it can process a sentence, it can process systematic variants, where systematic variation is understood in terms of permuting constituents or (more strongly) substituting constituents of the same grammatical category.\" Thus, this section introduces that this paper aims to propose a novel system called Information Theory-based Compositional Distributional Semantics (ICDS). In section Related Work, the author introduces a set of properties in selective proper text representation paradigms which includes \"systematicity\", \"usage context\", \"continuity\", and \"information measurbility\", and introduces a series of previous work under this standard. In section Theoretical Framework, this paper first establishes a geometric interpretation of ICDS, that \"The direction of an embedding represents the pragmatic meaning, and the vector norm of embedding represents how much information the literal utterance provides about its meaning in the pragmatic context\", and then proposes the concept of ICDS as \"there are minimal linguistic units whose semantics are determined by their use and whose amount of information is determined by their specificity. On the other hand, the systematicity of language can be captured by compositional mechanisms while preserving the amount of information of the composite utterance\". Section Formal Definition and Properties formally defines the concepts involved in ICDS, where (\\(\\pi\\),\\(\\delta\\), \\(\\bigodot\\)) stand for \"embedding\", \"semantic similarity\", and \"composition function\" respectively. This section points out the embedding function properties (information measurability and angular isometry), composition function properties (composition neutral element, composition norm monotonicity, and sensitivity to stricture), and similarity function properties (angular distance simialrity monotonicity, orthogonal embedding similarity monotonicity, and equidistant embedding simialrity monotonicity). In section Function Analysis and Generalization, this research evaluates several current embedding vector with the proposed framework, while in section Experiment, the semantic representation abilities of several prevailing LLMs including BERT and GPT are evaluated.

    "},{"location":"DL/NLPTheory/explainable_nlp/#contrastive-explanations-for-model-interpretability-2021","title":"Contrastive Explanations for Model Interpretability (2021)","text":"

    This paper proposes a data augmentation method to generate counterexample on the bases of NLI datasets, and proves that by training on patterns \"why A rather than B\" with contrastive learning methods, the model performs better than the previous NLI baselines.

    "},{"location":"DL/NLPTheory/explainable_nlp/#using-counterfactual-contrast-to-improve-compositional-generalization-for-multi-step-quantitative-reasoning-2023","title":"Using counterfactual contrast to improve compositional generalization for multi-step quantitative reasoning (2023)","text":""},{"location":"DL/NLPTheory/mwp/","title":"Math Word Problems","text":""},{"location":"DL/NLPTheory/mwp/#an-introduction-to-math-word-problems","title":"An Introduction to Math Word Problems","text":"

    The math word problem (MWP) aims to solve simple primary school math problems (in plain-text format) with deep learning methods. The problems usually consists of numbers no larger than 100 and only 5 operators (+, -, *, / and =). This blog is structured as follows. The Dataset part will introduce two main types, one indicating the locations of variables, and the other simply embedding the math formula within the natural language texts. The Methods parts will introduce several prevailing methods in solving this task, including both the models and workflows that improves the accuracy of models.

    "},{"location":"DL/NLPTheory/mwp/#surveys","title":"Surveys","text":""},{"location":"DL/NLPTheory/mwp/#the-gap-of-semantic-parsing-a-survey-on-automatic-math-word-problem-solvers-2019","title":"The Gap of Semantic Parsing: A Survey on Automatic Math Word Problem Solvers (2019)","text":"

    This survey provides a comprehensive introduction to the MWP datasets and methods prior to 2019. This survey defines three stages of MWP solving, the Rule-based matching stage (1960-2010), Semantic parsing, feature engineering and statistical learning stage (2011-2017), and Deep learning and reinforcement learning stage (2017-2019).

    "},{"location":"DL/NLPTheory/mwp/#towards-tractable-mathematical-reasoning-challenges-strategies-and-opportunities-for-solving-math-word-problems-2021","title":"Towards Tractable Mathematical Reasoning: Challenges, Strategies, and Opportunities for Solving Math Word Problems (2021)","text":"

    This survey introduces the contemporary MWP datasets til 2021, and methods including rule-based, and neural network encoder-decoder structures. Specifically, this paper concludes three strategies for math word solving, (i) direct answer generation, (ii) expression tree generation for inferring answers, and (iii) template retrieval for answer computation. Considering the type of problem solving method, this paper concludes two classes. The first class is non-neural approaches (rule-base or pattern matching approaches, semantic parsing, and statistical machine learning approaches), within which a particular strategy of applying domain knowledge in classifying the problems (e.g. into change, part-whole and compare classes). The second class is neural approaches, including intuitions of (i) predicting the answer directly (ii) generating a set of equations or mathematical expressions and inferring answers from the by executing them (iii) retrieving the templates from a pool of templates derived from training data and augmenting numerical quantities to compute the answer. These neural approaches generally follow encoder-decoder architectures, which fall in four types (i) seq-to-seq (ii) Transformer-to-tree (iii) seq-to-tree (iv) graph-to-tree. Among the four methods, the tree-structured decoder attend both parents and siblings to generate the next token, while the bottom-up representation of sub-tree of a sibling could further help to derive better outcomes. The graph-based encoder aims to learn different types of relationships among the constituents of MWPs. This section also mentions that \"Data augmentation is a popular preprocessing technique to increase the size of training data\" (reverse operation-based augmentation techniques, different traversal orders of expression trees, and weak supervision). In section Math Reasoning in Neural Approaches, this paper mentions several further topics under math reasoning, interpretability and explainability, infusing explicit and definitive knowledge, and reinforcement learning.

    "},{"location":"DL/NLPTheory/mwp/#datasets","title":"Datasets","text":""},{"location":"DL/NLPTheory/mwp/#mawps-a-math-word-problem-repository-2016","title":"MAWPS: A Math Word Problem Repository (2016)","text":"

    sroy9/mawps: Code for MAWPS: A Math Word Problem Repository (github.com) The data format is as follows.

    [\n{\n\"iIndex\": 1,\n\"sQuestion\": \"Joan found 70.0 seashells on the beach. She gave Sam some of her seashells . She has 27.0 seashells . How many seashells did she give to Sam ?\",\n\"lEquations\": [\"X=(70.0-27.0)\"],\n\"lSolutions\": [43.0]\n},\n]\n

    "},{"location":"DL/NLPTheory/mwp/#math23k-deep-neural-solver-for-math-word-problems-2017","title":"Math23k: Deep Neural Solver for Math Word Problems (2017)","text":"

    Deep Neural Solver for Math Word Problems (aclanthology.org) This dataset is in Chinese.

    Problem: Dan have 2 pens, Jessica have 4 pens. How many pens do they have in total ? \nEquation: x = 4+2 \nSolution: 6\n

    "},{"location":"DL/NLPTheory/mwp/#mathqa-2019","title":"MathQA (2019)","text":"

    MathQA-Dataset (math-qa.github.io) This paper proposes a math dataset which enhances the AQuA dataset by providing fully-specified operational programs. This dataset has a diverse range of operators.

    "},{"location":"DL/NLPTheory/mwp/#math-2021","title":"MATH (2021)","text":"

    arxiv.org/pdf/2103.03874.pdf MATH is a LaTeX format dataset, with its answer highlighted in a square block.

    "},{"location":"DL/NLPTheory/mwp/#svmap","title":"SVMAP","text":"

    arkilpatel/SVAMP: NAACL 2021: Are NLP Models really able to Solve Simple Math Word Problems? (github.com) This dataset does not distinguish the data with the texts. An example data is as follows.

    "},{"location":"DL/NLPTheory/mwp/#gsm8k-grade-school-math-2021","title":"GSM8k: grade school math (2021)","text":"

    Collected by OpenAI, this dataset consists of math problems in natural language descriptions, with the math formulas highlighted with special notes.The numbers are not explicitly highlighted with special symbols. Several examples of the data format are as follows.

    "},{"location":"DL/NLPTheory/mwp/#draw","title":"DRAW","text":"

    Providing 1000 grounded word problems.

    "},{"location":"DL/NLPTheory/mwp/#algebra","title":"Algebra","text":""},{"location":"DL/NLPTheory/mwp/#asdiv","title":"AsDiv","text":""},{"location":"DL/NLPTheory/mwp/#multiarith","title":"MultiArith","text":""},{"location":"DL/NLPTheory/mwp/#singleeq","title":"SingleEq","text":""},{"location":"DL/NLPTheory/mwp/#methods","title":"Methods","text":""},{"location":"DL/NLPTheory/mwp/#models","title":"Models","text":"

    Prior to 2017, the models for solving MWP are mainly concerning with neural networks. After Transformer has been released in 2017, attention-based models have been thriving. The novel models based on Transformer are mainly modifying the encoder and decoder structures, among which there are graph-encoder and tree-decoders.

    "},{"location":"DL/NLPTheory/mwp/#graph-to-tree-learning-for-solving-math-word-problems-2020","title":"Graph-to-Tree Learning for Solving Math Word Problems (2020)","text":"

    This paper proposes a attention-based model Graph2Tree, consisting of graph-based encoder and a tree-based decoder. The math word problems are constructed into Quantity Comparison Graph.

    "},{"location":"DL/NLPTheory/mwp/#math-word-problem-solving-with-explicit-numerical-values-2021","title":"Math Word Problem Solving with Explicit Numerical Values (2021)","text":"

    A novel approach called NumS2T is proposed to solve MWP. NumS2T is constructed with (a) an attention-based seq2seq model to generate its math expressions, (b) a numerical value encoder to obtain the number-aware problem state which are then concatenated with the problem hidden state in (a) to obtain number-aware problem representation, and (c) a numerical properties prediction mechanism for comparing the paired numerical values, determining the category of each numeral and measuring whether they should appear in the target expression.!

    "},{"location":"DL/NLPTheory/mwp/#learning-to-reason-deductively-math-word-problem-solving-as-complex-relation-extraction-2022","title":"Learning to Reason Deductively: Math Word Problem Solving as Complex Relation Extraction (2022)","text":"

    This paper proposes a novel approach

    "},{"location":"DL/NLPTheory/mwp/#workflows","title":"Workflows","text":"

    Most of the recent works follow the method of knowledge distilling, which means to generate high quality data with LLMs and then train a small model with the generated (and sometimes then augmented) data. The workflow of such tasks mainly assembles that of the following paper.

    "},{"location":"DL/NLPTheory/mwp/#large-language-models-are-reasoning-teachers","title":"Large Language Models Are Reasoning Teachers","text":"

    This paper proposes a knowledge distilling method in solving math reasoning problems.

    "},{"location":"DL/NLPTheory/mwp/#solving-math-word-problems-via-cooperative-reasoning-induced-language-models-acl-2023","title":"Solving Math Word Problems via Cooperative Reasoning induced Language Models (ACL 2023)","text":"

    This paper develops a cooperative reasoning-induced PLM for solving MWPs called Cooperative Reasoning (CoRe), with a generator to generate reasoning paths and a verifier to supervise the evaluation.

    "},{"location":"DL/NLPTheory/mwp/#scaling-relationship-on-learning-mathematical-reasoning-with-large-language-models-2023","title":"Scaling Relationship on Learning Mathematical Reasoning with Large Language Models (2023)","text":"

    This paper mainly focus on the following two questions: (i) Which is a better performance indicator of LLMs? (pre-training loss amount/model size) (ii) How to improve small model's performance by data augmentation? To answer the second question, this paper proposes a novel methods in data augmentation in the LLM data generation step which is called Rejection Finetuning (RFT). The algorithm of sampling data in RFT mainly adopts the thought of rejection sampling, which is expressed in the following pseudo-code. This paper assumes such an algorithm will yield as many as possible diverse reasoning paths. The workflow of the RFT method is illustrated as follows, where the SFT stands for supervised finetuning. With the novel method RFT, small models such as Llama-7b yields an accuracy of at most 49.7% on GSM8k, 14% higher than the previous SOTA method SFT.

    "},{"location":"DL/NLPTheory/mwp/#pal","title":"PAL","text":"

    This work is a prompt engineering work.

    Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? \nA: Roger started with 5 tennis balls. tennis_balls = 5 2 cans of 3 tennis balls each is bought_balls = 2 * 3 tennis balls. The answer is answer = tennis_balls + bought_balls \nQ: The bakers at the Beverly Hills Bakery baked 200 loaves of bread on Monday morning. They sold 93 loaves in the morning and 39 loaves in the afternoon. A grocery store returned 6 unsold loaves. How many loaves of bread did they have left?\n

    A: The bakers started with 200 loaves loaves_baked = 200 They sold 93 in the morning and 39 in the afternoon loaves_sold_morning = 93 loaves_sold_afternoon = 39 The grocery store returned 6 loaves. loaves_returned = 6 The answer is answer = loaves_baked - loaves_sold_morning - loaves_sold_afternoon + loaves_returned\n
    "},{"location":"DL/NLPTheory/mwp/#preview","title":"Preview","text":""},{"location":"Ling/","title":"\u7d22\u5f15","text":"

    \u672c\u4e13\u680f\u5305\u542b\u8bed\u8a00\u5b66\u7b14\u8bb0\uff0c\u76ee\u524d\u5df2\u5b8c\u6210\u4ee5\u4e0b\u5185\u5bb9

    "},{"location":"Ling/pol_en_todo/","title":"TODO","text":"

    Aug. 25th. 2023

    This talk aims both to provide an introduction to the subject Philosophy of Language (a similar subject with semantics and pragmatics, according to its definition; PoL hereafter), and give a summary on the recent ongoing discussion on the linguistics concepts in NLP (e.g. \"meaning\", \"understanding\", \"reasoning\", \"grounding\").

    "},{"location":"Ling/pol_en_todo/#a-preview-of-this-talk","title":"A Preview of This Talk","text":"

    1st 40min: History of philosophy of language 2nd 40min: Recent papers and discussions on PoL topics in NLP 3rd 10min: Discussion on take-away

    "},{"location":"Ling/pol_en_todo/#the-location-of-pol-on-the-academic-coordinate","title":"The Location of PoL on the Academic Coordinate","text":"

    Before we start this talk, we will first provide a brief definition of the term Philosophy of Language in our talk here. The PoL concerns mainly the two following questions, (i) The relationship between the natural language and the world, (ii) The relationship between the human languages and their meaning. Chen (2003) believes that the PoL and the linguistics are two different subjects. He suggests that the linguistics is the study of language rules and patterns and the application of them, while the PoL pays more attention on the more abstract and essential features of the human language (e.g. its relation to the cognition). The author of this talk believes, according to the definition of PoL, it is a subject that closely involves the semantics and pragmatics branches in linguistics. However the PoL and linguistics overlap or not, it is commonly believed that the subject PoL was born in the 1920s, when the linguistic turn was put on stage in the European philosophy.

    "},{"location":"Ling/pol_en_todo/#history-of-pol","title":"History of PoL","text":"

    Now we will dive into the history of PoL. This section is parted \"person by person\". It is noticed that \"person-by-person\" is a common structure of most of the philosophy history, as most of the philosophy progresses are propelled by giants instead of the common people.

    "},{"location":"Ling/pol_en_todo/#gottfried-wilhelm-leibniz","title":"Gottfried Wilhelm Leibniz","text":"

    The main contribution of Leibniz is

    "},{"location":"Ling/pol_en_todo/#ferdinand-de-saussure","title":"Ferdinand de Saussure","text":""},{"location":"Ling/pol_en_todo/#friedrich-ludwig-gottlob-frege","title":"Friedrich Ludwig Gottlob Frege","text":""},{"location":"Ling/pol_en_todo/#bertrand-russell","title":"Bertrand Russell","text":"

    Bertrand Russell is a pure logician.

    "},{"location":"Ling/pol_en_todo/#ludwig-wittgenstein","title":"Ludwig Wittgenstein","text":""},{"location":"Ling/pol_en_todo/#noam-chomsky","title":"Noam Chomsky","text":""},{"location":"Ling/pol_zh/","title":"Philosophy of Language \u8bed\u8a00\u54f2\u5b66","text":"

    Nov. 9th. 2022

    "},{"location":"Ling/pol_zh/#talk","title":"\u8fd9\u6b21talk\u4f1a\u8bb2\u4ec0\u4e48","text":"

    \u2705\u00a0\u4ecb\u7ecd\u8bed\u8a00\u54f2\u5b66\u7684\u601d\u6f6e\u6d41\u53d8\u5386\u7a0b\uff0c\u4ecb\u7ecd\u8bed\u8a00\u4e0a\u7684\u5b9e\u9a8c\u601d\u60f3\u5b9e\u9a8c\uff0c\u8ba8\u8bba\u4e00\u4e9b\u8bed\u8a00\u5b66\u3001\u8ba4\u77e5\u3001\u903b\u8f91\u548c\u54f2\u5b66\u7684\u5173\u8054

    "},{"location":"Ling/pol_zh/#pol","title":"PoL","text":"

    \u8bed\u8a00\u54f2\u5b66\u7684\u57fa\u672c\u95ee\u9898\uff1a 1. \u8bed\u8a00\u548c\u4e16\u754c\u7684\u5173\u7cfb 2. \u8bed\u8a00\u6216\u8bed\u8bcd\u7684\u610f\u4e49\u95ee\u9898

    \u8bed\u8a00\u54f2\u5b66\u548c\u8bed\u8a00\u5b66 \u8bed\u8a00\u5b66\u548c\u8bed\u8a00\u54f2\u5b66\u7684\u8054\u7cfb\u7d27\u5bc6\uff0c\u4f46\u662f\u662f\u4e24\u95e8\u5b66\u79d1\u3002

    20\u4e16\u7eaa\u54f2\u5b66\u4e0a\u53d1\u751f\u4e86\u8bed\u8a00\u8f6c\u5411\uff0c\u8fd9\u4e5f\u662f\u73b0\u4ee3\u8bed\u8a00\u5b66\u5f62\u6210\u7684\u65f6\u5019\u3002

    \u8bed\u8a00\u5b66\u662f\u5bf9\u8bed\u8a00\u89c4\u5f8b\u548c\u8fd9\u4e9b\u89c4\u5f8b\u7684\u5e94\u7528\u7684\u7814\u7a76\uff0c\u8bed\u8a00\u54f2\u5b66\u66f4\u5173\u5fc3\u8bed\u8a00\u66f4\u672c\u8d28\u66f4\u62bd\u8c61\u7684\u610f\u4e49\u3002

    "},{"location":"Ling/pol_zh/#history-of-pol","title":"History of PoL","text":"

    \u83b1\u5e03\u5c3c\u8328\uff1a\u63d0\u51fa\u903b\u8f91\u8bed\u8a00\uff0c\u7b80\u5386\u4eba\u5de5\u8bed\u8a00\u7684\u52aa\u529b

    \u5f3a\u8c03\u81ea\u7136\u8bed\u8a00\u4f9d\u8d56\u4e8e\u77e5\u8bc6\uff0c\u56e0\u6b64\u5206\u6709\u77e5\u89c9\u7684\u6a21\u7cca\u3001\u6b67\u4e49\u7b49\u79cd\u79cd\u7f3a\u9677\u3002\u81ea\u7136\u8bed\u8a00\u4e0d\u662f\u63cf\u8ff0\u5ba2\u89c2\u4e8b\u7269\u7684\u6700\u4f73\u5de5\u5177\uff0c\u4e3a\u4e86\u63a2\u7a76\u771f\u7406\uff0c\u5fc5\u987b\u5efa\u7acb\u4e00\u4e2a\u7531\u666e\u904d\u7b26\u53f7\u7ec4\u6210\u7684\u66f4\u4e3a\u6e05\u695a\u7684\u7b26\u53f7\u4f53\u7cfb\u3002\u8fd9\u79cd\u52aa\u529b\u5728\u6570\u5b66\u65b9\u9762\u662f\u5353\u6709\u6210\u6548\u7684\uff0c\u6bd4\u5982\u5fae\u79ef\u5206\u7b26\u53f7\u3002

    \u7d22\u7eea\u5c14\uff1a \u7d22\u7eea\u5c14\u6700\u5927\u7684\u5f71\u54cd\u662f\u300a\u666e\u901a\u8bed\u8a00\u5b66\u300b\u3002\u6211\u4eec\u4e00\u822c\u8ba4\u4e3a\u7d22\u7eea\u5c14\u662f\u4e00\u4f4d\u8bed\u8a00\u5b66\u5bb6\uff0c\u4f46\u662f\u4ed6\u5728\u8fd9\u672c\u4e66\u4e2d\u63d0\u51fa\u7684\u201c\u80fd\u6307\u201d\u4e0e\u201c\u6240\u6307\u201d\u7406\u8bba\uff0c\u662f\u54f2\u5b66\u91cc\u7684\u7b26\u53f7\u5b66\u7684\u5f00\u7aef\u3002

    \u8bed\u8a00\u662f\u7528\u58f0\u97f3\u8868\u8fbe\u601d\u60f3\u7684\u7b26\u53f7\u7cfb\u7edf\uff0c\u7b26\u53f7\u662f\u7528\u4ee5\u8868\u793a\u8005\u548c\u88ab\u8868\u793a\u8005\u7684\u7ed3\u5408\u3002

    \u6211\u4eec\u4f1a\u8bf4\uff0c\u58f0\u97f3\u672c\u8eab\u4e0d\u80fd\u65bd\u6307\uff0c\u53ea\u6709\u5904\u5728\u67d0\u79cd\u7279\u5b9a\u5173\u7cfb\u4e2d\uff08\u8bed\u8a00\u5b9a\u4e49\u4e86\u58f0\u97f3\u548c\u5b9e\u4f53\u4e4b\u95f4\u7684\u5173\u7cfb\uff09\uff0c\u58f0\u97f3\u624d\u6709\u4e86\u610f\u4e49\u3002

    \u4efb\u610f\u6027\u539f\u5219\u662f\uff0c\u5982\u6b64\u8fd9\u822c\u7684\u65bd\u6307\u548c\u5982\u6b64\u8fd9\u822c\u7684\u6240\u6307\u7ed3\u5408\u800c\u6210\u7684\u4e00\u4e2a\u7b26\u53f7\uff0c\u662f\u4efb\u610f\u7684\u3002eg. \u989c\u8272\u4e0e\u989c\u8272\u8bcd\u7684\u8054\u7ed3\u662f\u4efb\u610f\u7684\uff0c\u989c\u8272\u7684\u754c\u9650\u4e0e\u989c\u8272\u8bcd\u7684\u8054\u7ed3\u4e5f\u662f\u4efb\u610f\u7684\u3002

    \"\u7eff\"\u4e0d\u4ec5\u548c\u7eff\u989c\u8272\u76f8\u8fde\uff0c\u800c\u4e14\u548c\u201c\u84dd\u201d\u201c\u9752\u201d\u7b49\u8bed\u8bcd\u76f8\u8fde\u3002\n\u5982\u679c\u6ca1\u6709\u201c\u84dd\u201d\u201c\u9752\u201d\uff0c\u6211\u4eec\u5c31\u4e0d\u80fd\u77e5\u9053\u201c\u7eff\u201d\u6240\u754c\u5b9a\u7684\u989c\u8272\u8303\u56f4\u3002\n\n\u201c\u4e03\u8272\u5f69\u8679\u201d\n\u65e5\u8bed\u4e0d\u533a\u5206\u201c\u84dd\u201d\u548c\u201c\u7eff\u201d\uff0c\u53ea\u6709\u4e00\u4e2a\u5355\u8bcd\u201c\u9752\u201d\uff08aoi\uff09\uff0c\u65e5\u8bed\u6bcd\u8bed\u8005\u5728\u9274\u522b\u84dd\u8272\u548c\u7eff\u8272\u65f6\u53cd\u5e94\u65f6\u9ad8\u4e8e\u82f1\u8bed\u6bcd\u8bed\u8005\u3002\n\u4e00\u79cd\u5317\u6b27\u8bed\u8a00\u6709\u4e03\u79cd\u84dd\u8272\u7684\u540d\u79f0\u3002\n

    \u6211\u4eec\u4e60\u60ef\u628a\u8bed\u8bcd\u548c\u60c5\u5883\u7684\u8054\u7cfb\u79f0\u4f5c\u7eb5\u5750\u6807\u6216\u8bed\u5883\u5750\u6807\uff0c\u628a\u8bed\u8bcd\u4e4b\u95f4\u7684\u8054\u7cfb\u79f0\u4f5c\u6a2a\u5750\u6807\u548c\u903b\u8f91\u5750\u6807\u3002

    eg. \u5b8c\u5f62\u586b\u7a7a\u9898

    eg. \u6570\u636e\u5e93\u5173\u7cfb\u6a21\u578b\u7684\u5c5e\u6027\u3001\u5143\u7ec4

    \u975e\u5e38\u6709\u8da3\uff0c\u7d22\u7eea\u5c14\u5199\u8fd9\u672c\u8bed\u8a00\u5b66\u6559\u6750\u65f6\uff0c\u4e16\u754c\u4e0a\u5e76\u6ca1\u6709\u7b26\u53f7\u5b66\u8fd9\u4e2a\u5b66\u79d1\u3002\u5728\u4ed6\u63d0\u51fa\u201c\u80fd\u6307\u201d\u201d\u6240\u6307\u201c\u8fd9\u4e2a\u6982\u5ff5\u540e\uff0c\u7b26\u53f7\u5b66\u5728\u4ed6\u201d\u80fd\u6307\u201c\u5728\u201d\u6240\u6307\u201c\u7684\u94fe\u6761\u4e0a\u6ed1\u52a8\u8fd9\u4e00\u8bba\u65ad\u7684\u57fa\u7840\u4e0a\u8bde\u751f\uff0c\u5e76\u81f3\u4eca\u6210\u4e3a\u6cd5\u56fd\u54f2\u5b66\u7684\u4e00\u4e2a\u91cd\u8981\u95ee\u9898\u3002

    \u5f17\u96f7\u683c\uff1a

    \u5f17\u96f7\u683c\u662f\u516c\u8ba4\u7684\u5206\u6790\u54f2\u5b66\u3001\u8bed\u8a00\u54f2\u5b66\u548c\u73b0\u4ee3\u6570\u7406\u903b\u8f91\u7684\u5f00\u521b\u8005\u3002

    \u300a\u6982\u5ff5\u6587\u5b57\uff1a\u4e00\u79cd\u6a21\u4eff\u7b97\u672f\u8bed\u8a00\u6784\u9020\u7684\u7eaf\u601d\u7ef4\u7684\u5f62\u5f0f\u8bed\u8a00\u300b\u4e3b\u8981\u5de5\u4f5c\u662f\uff0c\u8bbe\u8ba1\u4e86\u4e00\u5957\u4eba\u5de5\u7b26\u53f7\u7cfb\u7edf\uff0c\u6392\u9664\u4e86\u81ea\u7136\u8bed\u8a00\u4e2d\u4fee\u8f9e\u4e4b\u7c7b\u7684\u4e1c\u897f\uff0c\u4e13\u6ce8\u4e8e\u6982\u5ff5\u672c\u8eab\u548c\u6982\u5ff5\u4e4b\u95f4\u7684\u8054\u7cfb\uff0c\u56e0\u6b64\uff0c\u5b83\u5c06\u6392\u9664\u81ea\u7136\u8bed\u8a00\u7684\u6a21\u7cca\u6027\u548c\u4e0d\u786e\u5b9a\u6027\u3002\u7528\u8fd9\u5957\u7b26\u53f7\u7cfb\u7edf\u6765\u91cd\u65b0\u8868\u8ff0\u7b97\u672f\u7684\u57fa\u672c\u6982\u5ff5\u548c\u63a8\u7406\u89c4\u5219\uff0c\u660e\u786e\u6240\u6709\u63a8\u7406\u7684\u524d\u63d0\uff0c\u4fdd\u8bc1\u4e00\u4e2a\u8bc1\u660e\u4e2d\u5404\u4e2a\u547d\u9898\u95f4\u7684\u6240\u6709\u63a8\u7406\u89c4\u5219\uff0c\u4f7f\u63a8\u7406\u4e0d\u518d\u57fa\u4e8e\u76f4\u89c9\uff0c\u4e5f\u6ca1\u6709\u8df3\u8dc3\u548c\u8131\u8282\u3002

    \u5bf9\u8bed\u8a00\u54f2\u5b66\u5f71\u54cd\u6700\u6df1\u7684\u662f\u4ed6\u5728\u300a\u7b97\u672f\u57fa\u7840\u300b\u4e2d\u63d0\u51fa\u7684\u4e09\u6761\u8457\u540d\u539f\u5219\uff1a

    1. \u59cb\u7ec8\u628a\u5fc3\u7406\u7684\u4e1c\u897f\u548c\u903b\u8f91\u7684\u4e1c\u897f\u3001\u4e3b\u89c2\u7684\u4e1c\u897f\u548c\u5ba2\u89c2\u7684\u4e1c\u897f\u4e25\u683c\u533a\u5206\u5f00\u3002\u8fd9\u4e00\u6761\u53cd\u5bf9\u5f53\u65f6\u751a\u4e3a\u6d41\u884c\u7684\u5fc3\u7406\u4e3b\u4e49\u3002\u5f17\u96f7\u683c\u4e3b\u5f20\u903b\u8f91\u5b66\u5bb6\u7814\u7a76\u7684\u662f\u8bed\u8a00\u8868\u8fbe\u5f0f\u3002\u8bed\u8a00\u8868\u8fbe\u5f0f\u662f\u53ef\u4ee5\u516c\u5f00\u8003\u5bdf\u7684\uff0c\u610f\u4e49\u7814\u7a76\u5e94\u5f53\u57fa\u4e8e\u8fd9\u4e9b\u8868\u8fbe\u5f0f\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u4e8e\u5bf9\u5fc3\u7406\u8fc7\u7a0b\u7684\u81c6\u6d4b\u3002
    2. \u7edd\u4e0d\u5b64\u7acb\u5730\u5bfb\u95ee\u4e00\u4e2a\u8bcd\u7684\u610f\u4e49\uff0c\u800c\u53ea\u5728\u4e00\u4e2a\u547d\u9898\u7684\u4e0a\u4e0b\u6587\u4e2d\u5bfb\u95ee\u8bcd\u7684\u610f\u601d\u3002\u88ab\u79f0\u4e3a\u8bed\u5883\u539f\u5219\u548c\u4e0a\u4e0b\u6587\u539f\u5219\uff0c\u6307\u51fa\u8bed\u4e49\u7814\u7a76\u7684\u6700\u5c0f\u5355\u4f4d\u8d77\u7801\u662f\u53e5\u5b50\uff0c\u4e0d\u662f\u8bcd\uff0c\u4e0d\u662f\u8868\u5c42\u8bed\u6cd5\u3002\u6211\u4eec\u6ce8\u610f\u5230\u8fd9\u4e00\u6761\u4e0e\u7b2c\u4e00\u6761\u76f8\u5173\uff0c\u56e0\u4e3a\u5982\u679c\u7814\u7a76\u8bcd\uff0c\u8bcd\u4f9d\u8d56\u7684\u5fc5\u7136\u662f\u610f\u4e49\u5728\u5fc3\u7406\u8fc7\u7a0b\u4e2d\u7684\u6620\u5c04\uff0c\u800c\u7814\u7a76\u53e5\u5b50\uff0c\u6211\u4eec\u4f1a\u628a\u8bed\u8bcd\u5728\u53e5\u5b50\u4e2d\u7684\u8054\u7cfb\u5f53\u4f5c\u610f\u4e49\u3002
    3. \u7edd\u4e0d\u5fd8\u8bb0\u6982\u5ff5\u548c\u5bf9\u8c61\u7684\u533a\u522b\u3002

    \u4e24\u4e2a\u601d\u7ef4\u5b9e\u9a8c\uff1a

    1. \u6307\u79f0\u76f8\u540c\u800c\u610f\u4e49\u4e0d\u540c\u7684\u8bcd

      \u201c\u542f\u660e\u661f\u201d\u548c\u201c\u957f\u5e9a\u661f\u201d\u662f\u540c\u4e00\u9897\u884c\u661f\u2014\u2014\u2014\u2014\u91d1\u661f\u3002\n\u4f46\u662f\u4e24\u4e2a\u540d\u8bcd\u7684\u610f\u4e49\u4e0d\u540c\uff0c\u5927\u591a\u6570\u65f6\u5019\u4e0d\u80fd\u66ff\u6362\u3002\n\u201c\u4ed6\u5929\u8fd8\u6ca1\u4eae\u5c31\u8d77\u8eab\uff0c\u8fce\u7740\u542f\u660e\u661f\u5411\u4e1c\u8d70\u53bb\u3002\u201d\n

    2. \u51fd\u5f0f\u7406\u8bba

      \uff08 \uff09\u662f\u4e2d\u56fd\u7684\u9996\u90fd\n\uff08 \uff09= \"\u4f26\u6566\"\u3001\"\u5317\u4eac\"\n\u53ea\u6709\u586b\u5165\u5317\u4eac\u7684\u65f6\u5019\u624d\u662f\u771f\u547d\u9898\n

    \u7f57\u7d20\uff1a\u903b\u8f91

    \u6df1\u5165\u4e13\u540d\u548c\u901a\u540d\u3001\u6096\u8bba\u3001\u6392\u4e2d\u5f8b\u3002

    \u7ef4\u7279\u6839\u65af\u5766\uff1a

    \u524d\u671f\u601d\u60f3\u300a\u903b\u8f91\u54f2\u5b66\u8bba\u300b

    \u201c\u4e16\u754c\u662f\u4e8b\u5b9e\u7684\u7efc\u5408\u201d\uff1a\u201c\u53f8\u9a6c\u5149\u662f\u5510\u671d\u4eba\u201d\u7b26\u5408\u903b\u8f91\uff0c\u4f46\u4e0d\u7b26\u5408\u4e8b\u5b9e\u3002

    \u56fe\u50cf\u8bba

    \u8bed\u8a00\u662f\u547d\u9898\u7684\u603b\u548c\u800c\u4e0d\u662f\u540d\u79f0\u7684\u603b\u548c\u3002

    \u4eba\u5728\u4ea4\u6d41\u601d\u60f3/\u547d\u9898\u65f6\uff0c\u4ea4\u6d41\u7684\u662f\u8111\u4e2d\u7684\u56fe\u50cf\u3002

    \u4ed6\u7684\u524d\u671f\u601d\u60f3\u542f\u53d1\u4e86\u7ef4\u4e5f\u7eb3\u5b66\u6d3e\uff1a\u4eba\u5de5\u8bed\u8a00\uff0c\u903b\u8f91\u8bed\u8a00

    \u5341\u4e5d\u4e16\u7eaa\u672b\u4ee5\u6765\u4eba\u5de5\u8bed\u8a00\u7684\u5c1d\u8bd5\uff1a\u201c\u4e16\u754c\u8bed\uff08Esperanto\uff09\u201d\uff0c\u4e18\u5409\u5c14\u63a8\u5d07\u7684\u57fa\u672c\u82f1\u8bed\uff0c\u81ea\u7136\u8bed\u8a00\u4e2d\u5bf9\u201c\u5973\u4eba\u201d\u201c\u5973\u6027\u201d\u201c\u5973\u58eb\u201d\u201c\u5987\u5973\u201d\u8fd9\u6837\u7684\u6307\u79f0\u7684\u89c4\u8303\u5c1d\u8bd5\u3002

    \u540e\u671f\u601d\u60f3\u300a\u54f2\u5b66\u7814\u7a76\u300b

    \u8bed\u8a00\u6e38\u620f\uff08Sprachspiel\uff09

    \u8bed\u8a00\u7684\u529f\u80fd\u7684\u672c\u8d28\uff1a\u4e00\u65b9\u558a\u51fa\u8bed\u8bcd\uff0c\u53e6\u4e00\u65b9\u4f9d\u7167\u8fd9\u4e9b\u8bed\u8bcd\u6765\u884c\u52a8\u3002

    \u8001\u5e08\u6307\u7740\u77f3\u5934\u8bf4\u201c\u77f3\u5934\u201d\uff0c\u5b66\u751f\u8ddf\u7740\u8bf4\u201c\u77f3\u5934\u201d\u3002\n
    \u4e22\u624b\u7ee2\u65f6\u5531\u7740\u201c\u8f7b\u8f7b\u5730\u653e\u5728\u5c0f\u670b\u53cb\u7684\u8eab\u540e\u201d\uff0c\u628a\u624b\u7ee2\u653e\u5728\u5c0f\u670b\u53cb\u7684\u8eab\u540e\n

    \u4e0e\u524d\u671f\u56fe\u50cf\u7406\u8bba\u7684\u5bf9\u6bd4\uff1a\u5728\u56fe\u50cf\u7406\u8bba\u4e2d\uff0c\u8bed\u8a00\u4ece\u6839\u672c\u4e0a\u662f\u4e00\u79cd\u53cd\u6620\uff1b\u5728\u8bed\u8a00\u6e38\u620f\u8bf4\u4e2d\uff0c\u8bed\u8a00\u9996\u5148\u662f\u4e00\u79cd\u6d3b\u52a8\u3002

    \u610f\u4e49\u6765\u6e90\u4e8e\u4f7f\u7528\u3002

    \u6211\u4eec\u5173\u5fc3\u201c\u9524\u5b50\u201d\u662f\u4ec0\u4e48\u65f6\uff0c\n\u5173\u5fc3\u7684\u662f\u201c\u4f7f\u7528\u4e00\u628a\u9524\u5b50\u201d\uff0c\n\u800c\u4e0d\u662f\u201c\u9524\u5b50\u610f\u5473\u7740\u2026\u2026\u201d\n\u4e8b\u5b9e\u4e0a\uff0c\u6211\u4eec\u4e5f\u6b63\u662f\u4ece\u201c\u4f7f\u7528\u4e00\u628a\u9524\u5b50\u201d\u6765\u5b9a\u4e49\u9524\u5b50\n
    \u5982\u4f55\u533a\u5206\u201c\u4f7f\u7528\u201d\u201c\u6709\u7528\u201d\u201c\u5229\u7528\u201d\uff1f\n\u5728\u4e00\u4e9b\u60c5\u5883\u4e2d\u80fd\u7528\uff0c\u5728\u4e00\u4e9b\u60c5\u5883\u4e2d\u4e0d\u80fd\u7528\u3002\n

    \u8bed\u8a00\u6e38\u620f\u7684\u7c7b\u522b

    \u5bb6\u65cf\u76f8\u4f3c\u7406\u8bba\uff08Familien\u00e4hnlichkeiten\uff09

    \u201c\u4e00\u4e2a\u5bb6\u65cf\u7684\u6709\u4e9b\u6210\u5458\u6709\u4e00\u6837\u7684\u9f3b\u5b50\uff0c\u53e6\u4e00\u4e9b\u6709\u4e00\u6837\u7684\u7709\u6bdb\uff0c\u8fd8\u6709\u4e00\u4e9b\u6709\u4e00\u6837\u7684\u6b65\u6001\uff1b\u8fd9\u4e9b\u76f8\u4f3c\u4e4b\u5904\u4ea4\u53c9\u91cd\u53e0\u3002\u201c

    \u5185\u6db5\uff1a\u4e00\u4e2a\u6982\u5ff5\u7684\u5b9a\u4e49

    \u5916\u5ef6\uff1a\u4e00\u4e2a\u6982\u5ff5\u5305\u542b\u7684\u4e0b\u5c5e\u6982\u5ff5\u7684\u8303\u56f4

    \u901a\u540d\u7684\u4e0b\u5c5e\u8bcd\uff0c\u5404\u79cd\u4e13\u540d\u4e4b\u95f4\u5e76\u6ca1\u6709\u4e25\u683c\u7684\u754c\u9650\uff0c\u4e00\u4e2a\u76f8\u4f3c\u53e6\u4e00\u4e2a\uff0c\u5206\u4eab\u4e0d\u540c\u7684\u5171\u540c\u7279\u5f81\u3002

    \u751f\u6d3b\u5f62\u5f0f\uff08Lebens Form\uff09\uff1a\u5e38\u8bc6\u7684\u91cd\u8981\u6027

    \u201c\u626b\u5e1a\u5728\u90a3\u91cc\u201d\u5df2\u7ecf\u8db3\u591f\u6e05\u6670\u3002\n\u201c\u626b\u5e1a\u628a\u548c\u626b\u5e1a\u5934\u5728\u90a3\u91cc\u201d\uff0c\u867d\u7136\u5206\u6790\u5f97\u66f4\u6e05\u695a\uff0c\u4f46\u5728\u4ea4\u9645\u4e2d\u8ba9\u4eba\u8d39\u89e3\u3002\n

    \u4eff\u4f5b\u6211\u4eec\u53ea\u8981\u66f4\u591a\u8bf4\u4e00\u70b9\uff0c\u591a\u5206\u6790\u4e00\u70b9\uff0c\u4e8b\u60c5\u5c31\u4f1a\u66f4\u6e05\u695a\uff0c\u4eff\u4f5b\u6ca1\u6709\u4e00\u53e5\u8bdd\u672c\u8eab\u5c31\u662f\u8db3\u591f\u6e05\u695a\u7684\u3002

    "},{"location":"Ling/pol_zh/#conclusion-of-agreements","title":"Conclusion of Agreements","text":"
    1. \u8bed\u8a00\u7684\u610f\u4e49\u4f9d\u8d56\u4e8e\u7b26\u53f7\u4e0e\u7b26\u53f7\u4e4b\u95f4\u76f8\u4e92\u5b9a\u4e49\uff0c\u4e0e\u771f\u5b9e\u4e16\u754c\u7684\u5bf9\u8c61\u6ca1\u6709\u7edd\u5bf9\u7684\u4e00\u4e00\u5bf9\u5e94\u5173\u7cfb\u3002
    2. \u8bed\u8a00\u7684\u529f\u80fd\u5728\u4e8e\u53d1\u51fa\u548c\u5b8c\u6210\u547d\u4ee4\u3002
    3. \u81ea\u7136\u8bed\u8a00\u771f\u5b9e\u73b0\u8c61\u6bd4\u4eba\u9020\u8bed\u8a00\u89c4\u5219/\u903b\u8f91\u8868\u8fbe\u5f0f\u66f4\u80fd\u53cd\u5e94\u4eba\u8111\u7684\u8ba4\u77e5\u3001\u66f4\u503c\u5f97\u7814\u7a76\u3002
    "},{"location":"Ling/pol_zh/#history-of-nlp","title":"History of NLP","text":"
    1. \u57fa\u4e8e\u89c4\u5219\u7684 \u2192 \u7ef4\u7279\u6839\u65af\u5766\u524d\u671f\u53ca\u4ee5\u524d\u7684\u7eaf\u903b\u8f91\u8bed\u8a00\uff0c\u4eba\u9020\u8bed\u8a00\u3002
    2. \u57fa\u4e8e\u7edf\u8ba1\u7684\u548c\u6df1\u5ea6\u5b66\u4e60 \u2192 \u7ef4\u7279\u6839\u65af\u5766\u540e\u671f\u7684\u8bed\u8a00\u610f\u4e49\u5728\u4f7f\u7528\u4e2d\u3002
    3. \u548c\u7ed3\u5408\u8bed\u8a00\u5b66\u3001\u8ba4\u77e5\u77e5\u8bc6 \u2192 \u4e54\u59c6\u65af\u57fa\u7684\u8bed\u8a00\u7684\u610f\u4e49\u5728\u521b\u9020\u4e2d\u3002
    "},{"location":"Ling/pol_zh/#pol_1","title":"PoL\u7684\u5176\u5b83\u95ee\u9898","text":"

    \u963f\u4f69\u5c14\u603b\u7ed3\u897f\u65b9\u54f2\u5b66\u7684\u53d1\u5c55\uff1a

    \u53e4\u4ee3\u54f2\u5b66\u6ce8\u91cd\u7684\u662f\u672c\u4f53\u8bba\uff0c\u4ece\u8fd1\u4ee3\u5f00\u59cb\uff0c\u54f2\u5b66\u6ce8\u91cd\u7684\u662f\u8ba4\u8bc6\u8bba\uff0c\u523020\u4e16\u7eaa\uff0c\u54f2\u5b66\u6ce8\u91cd\u7684\u662f\u8bed\u8a00\u3002

    \u672c\u4f53\u8bba\u7684\u95ee\u9898\uff1a\u4ec0\u4e48\u4e1c\u897f\u5b58\u5728\uff0c\u4ec0\u4e48\u662f\u5b9e\u5728\u7684\u57fa\u672c\u5b58\u5728\u5f62\u5f0f\u3002

    \u8ba4\u8bc6\u8bba\u7684\u95ee\u9898\uff1a\u54ea\u4e9b\u4e1c\u897f\u662f\u6211\u4eec\u80fd\u8ba4\u8bc6\u7684\uff0c\u6211\u4eec\u662f\u600e\u6837\u8ba4\u8bc6\u8fd9\u4e9b\u4e1c\u897f\u7684\u3002

    \u8bed\u8a00\u7684\u95ee\u9898\uff1a\u6211\u4eec\u5728\u4f55\u79cd\u610f\u4e49\u4e0a\u80fd\u591f\u8ba4\u8bc6\u5b58\u5728\u2014\u2014\u800c\u610f\u4e49\u7684\u9996\u8981\u8f7d\u4f53\u662f\u8bed\u8a00\u3002\u2192 Linguistic Turn

    PoL\u7684\u5176\u5b83topic\uff1a 1. \u6307\u79f0\u4e0e\u5b9e\u4f53\uff0c\u8bed\u8a00\u4e0e\u610f\u4e49\u7684\u5173\u7cfb 2. \u901a\u540d\u4e0e\u4e13\u540d\uff0c\u8bcd\u4e49\u7684\u8303\u56f4 3. \u771f\u7406\u7406\u8bba 4. \u300a\u6211\u4eec\u8d56\u4ee5\u751f\u5b58\u7684\u9690\u55bb\u300b\uff1a\u9690\u55bb\u65e0\u5904\u4e0d\u5728\uff0c\u4e0d\u4ec5\u5b9a\u4e49\u4e2d\u7684\u201cxx\u662fxx\u201d\u662f\u9690\u55bb\uff0c\u6709\u65f6\u5355\u4e2a\u8bcd\u5c31\u662f\u4e00\u4e2a\u9690\u55bb\u3002

    \u52a8\u8bcd\u662f\u9690\u55bb

    \u65f6\u95f4\u5728\u6d41\u901d\u3002\n

    \u4ecb\u8bcd\u662f\u9690\u55bb

    I\u2019m feeling up today.\nHe is down.\n\u9ad8\u5174\u4e3a\u4e0a\uff0c\u60b2\u4f24\u4e3a\u4e0b\u3002\nWake up.\nHe fell asleep.\n\u6709\u610f\u8bc6\u4e3a\u4e0a\uff0c\u65e0\u610f\u8bc6\u4e3a\u4e0b\u3002\nHe fell ill.\nShe dropped dead.\n\u5065\u5eb7\u548c\u751f\u547d\u4e3a\u4e0a\uff0c\u75be\u75c5\u548c\u6b7b\u4ea1\u4e3a\u4e0b\u3002\nI have controlled over her.\nHe fell from power.\n\u63a7\u5236\u6216\u5f3a\u8feb\u4e3a\u4e0a\uff0c\u88ab\u63a7\u5236\u6216\u88ab\u5f3a\u8feb\u4e3a\u4e0b\u3002\nMy income rose last year.\nThe number of errors is low.\n\u66f4\u591a\u4e3a\u4e0a\uff0c\u66f4\u5c11\u4e3a\u4e0b\u3002\n

    \u4e54\u59c6\u65af\u57fa\uff1a

    \u7ed3\u6784\u4e3b\u4e49\u8bed\u8a00\u5b66\u5230\u8f6c\u6362\u751f\u6210\u8bed\u6cd5\u3002

    1. \u8bed\u8a00\u80fd\u529b/\u8bed\u8a00\u8868\u73b0\uff1a\u8bed\u8a00\u80fd\u529b\u662f\u4eba\u5148\u5929\u5177\u6709\u7684\u72ec\u7acb\u80fd\u529b\uff0c\u5b83\u901a\u8fc7\u5b66\u4e60\u67d0\u79cd\u6216\u67d0\u4e9b\u7279\u5b9a\u8bed\u8a00\u5c55\u73b0\u51fa\u6765\u3002
    2. \u6df1\u5c42\u7ed3\u6784/\u8868\u5c42\u7ed3\u6784\uff1a\u6df1\u5c42\u7ed3\u6784\u901a\u8fc7\u8f6c\u6362\u89c4\u5219\u751f\u6210\u8868\u5c42\u7ed3\u6784\u3002

    \u8bed\u8a00\u5b66\u7684\u5de5\u4f5c\u4e0d\u5e94\u5f53\u662f\u641c\u96c6\u8bed\u8a00\u7d20\u6750\u52a0\u4ee5\u5f52\u7eb3\uff0c\u800c\u662f\u8981\u89e3\u91ca\u8bed\u8a00\u7684\u521b\u9020\u6027\u3002

    CNF

    S -> AB\nA -> AA | a\nB -> b | e\n

    \u8f6c\u6362\u751f\u6210\u8bed\u6cd5\u89c4\u5219 \\(\\Sigma = \\{NP, Vp, T, N, Npsing, NPpl, Aux, V, C, M, En, S, Past, Af\\}\\)

    S -> NP + VP\nVP -> Verb + NP\nNP -> Det + N\nVerb -> Aux + V\nDet -> the, a...\nN -> man, ball...\nAux -> will, can...\nV -> hit, see...\n

    \u4f20\u7edf\uff08\u6210\u5206\uff09\u8bed\u6cd5\u89c4\u5219

    1. \u4e3b + \u8c13\n2. \u4e3b + \u8c13 + \u5bbe\n3. \u4e3b + \u7cfb + \u8868\n4. \u4e3b + \u8c13 + \u5bbe + \u53cc\u5bbe\n5. \u4e3b + \u8c13 + \u5bbe + \u5bbe\u8865\n6. \u4e3b + \u8c13 + \u5e76\u5217\u5bbe\n\n...\n

    \u300a\u53e5\u6cd5\u7ed3\u6784\u300b\uff081957\uff09\u6838\u5fc3\u53e5\u548c\u8f6c\u6362\u6982\u5ff5\u3002

    \u751f\u6210\u6b65\u9aa4 1. \u751f\u6210\u6838\u5fc3\u53e5\u3002

    S -> X1 | X2 | ... Xn\n

    1. \u8f6c\u6362\u7ed3\u6784\uff08\u66ff\u6362\u3001\u7701\u7565\u3001\u6dfb\u52a0\u3001\u6362\u4f4d\uff09\u3002

      X1 -> Y1Z1 | ...\n...\n

    2. \u6dfb\u52a0\u5f62\u6001\u97f3\u4f4d\u89c4\u5219\u3002

      Z1 -> W1\n...\nZn -> Wn\n

    \u8f6c\u6362\uff1a\u6574\u4e2a\u8f6c\u6362\u751f\u6210\u8fc7\u7a0b\u53ef\u4ee5\u5206\u4e3a\u4e09\u4e2a\u6b65\u9aa4

    1. \u901a\u8fc7\u77ed\u8bed\u7ed3\u6784\u6539\u5199\u89c4\u5219\uff0c\u5f97\u5230\u8868\u8fbe\u5f0f\\(R_c\\)\uff0c\\(R_c\\)\u7531\u975e\u7ec8\u7aef\u8bed\u7c7b\u7b26\u53f7\u7ec4\u6210\uff0c\u662f\u6df1\u5c42\u7ed3\u6784\u3002
    2. \u901a\u8fc7\u8bcd\u6c47\u63d2\u5165\u89c4\u5219\u5f97\u5230\u8868\u8fbe\u5f0f\\(R_1\\)\uff0c\\(R_1\\)\u7531\u7ec8\u7aef\u8bed\u7c7b\u7b26\u53f7\u7ec4\u6210\uff0c\u4f46\u4ecd\u662f\u6df1\u5c42\u7ed3\u6784\u3002
    3. \u901a\u8fc7\u8f6c\u6362\u89c4\u5219\u5f97\u5230\u8868\u8fbe\u5f0f\\(R_1\\)\uff0c\\(R_1\\)\u5f53\u7136\u8fd8\u662f\u7531\u975e\u7ec8\u7aef\u8bed\u7c7b\u7b26\u53f7\u7ec4\u6210\uff0c\u4f46\u5b83\u662f\u8868\u5c42\u7ed3\u6784\u3002

    \u6df1\u5c42\u7ed3\u6784\u548c\u8868\u5c42\u7ed3\u6784

    \u4e54\u59c6\u65af\u57fa\u8bed\u6cd5\u4f53\u7cfb\u4e2d\uff0c\u6307\u53e5\u5b50\u751f\u6210\u8fc7\u7a0b\u4e2d\u7279\u5b9a\u9636\u6bb5\u6240\u91c7\u7528\u7684\u4e00\u79cd\u7279\u6b8a\u64cd\u4f5c\u624b\u6bb5\u6216\u89c4\u5219\u3002\u6df1\u5c42\u7ed3\u6784\u662f\u5b83\u7684\u8f93\u5165\uff0c\u8868\u5c42\u7ed3\u6784\u662f\u5b83\u7684\u8f93\u51fa\u3002

    \u6709\u7684\u53e5\u5b50\u8868\u5c42\u7ed3\u6784\u4e0d\u540c\uff0c\u6df1\u5c42\u7ed3\u6784\u76f8\u4f3c\u3002\u901a\u8fc7\u8f6c\u6362\u64cd\u4f5c\u53ef\u4ee5\u76f8\u4e92\u8f6c\u5316\u3002

    \u6709\u7684\u53e5\u5b50\u6df1\u5c42\u7ed3\u6784\u4e0d\u540c\uff0c\u8868\u5c42\u7ed3\u6784\u76f8\u4f3c\u3002\u901a\u8fc7\u8f6c\u6362\u64cd\u4f5c\u4e0d\u80fd\u76f8\u4e92\u8f6c\u5316\u3002

    \u4e3a\u4ec0\u4e48\u4eca\u5929\u6211\u4eec\u8981\u8c08\u8bed\u8a00\u54f2\u5b66\uff1f

    \u9648\u5609\u6620\u8001\u5e08\uff1a\u79d1\u5b66\u662f\u4e00\u4e2a\u4e25\u5bc6\u7684\u6574\u6d01\u7684\u4f53\u7cfb\uff0c\u539f\u56e0\u662f\u5b83\u628a\u6240\u6709\u6df7\u6c8c\u7684\u65e0\u6cd5\u89e3\u51b3\u7684\u95ee\u9898\u629b\u5728\u4e86\u8fd9\u4e2a\u4f53\u7cfb\u4e4b\u5916\u3002[\u300a\u8d70\u51fa\u552f\u4e00\u771f\u7406\u89c2\u300b\uff0c2020]

    \u6240\u4ee5\u54f2\u5b66\u7684\u95ee\u9898\u662f\u7814\u7a76\u88ab\u79d1\u5b66\u6254\u51fa\u53bb\u7684\u6df7\u6c8c\u3002

    \u8bed\u8a00\u54f2\u5b66\u5c31\u50cf\u201c\u5165\u4fb5\u7684\u5b9e\u5728\u754c\u201d\uff0c\u201c\u8fb9\u754c\u7684\u6d4b\u8bd5\u70b9\u201d\u3002

    "},{"location":"Ling/pol_zh/#recommended-reading","title":"Recommended Reading","text":"

    \u300a\u8bed\u8a00\u54f2\u5b66\u300b\u9648\u5609\u6620

    \u300a\u666e\u901a\u8bed\u8a00\u5b66\u300b\u7d22\u7eea\u5c14

    \u300a\u903b\u8f91\u54f2\u5b66\u8bba\u300b\u7ef4\u7279\u6839\u65af\u5766

    \u300a\u54f2\u5b66\u7814\u7a76\u300b\u7ef4\u7279\u6839\u65af\u5766

    \u300a\u6211\u4eec\u8d56\u4ee5\u751f\u5b58\u7684\u9690\u55bb\u300b\u4e54\u6cbb\u00b7\u83b1\u8003\u592b

    \u300a\u5fc3\u667a\u3001\u8bed\u8a00\u548c\u673a\u5668\u300b\u5f90\u82f1\u747e

    "},{"location":"Ling/pol_zh/#_1","title":"\u8ba8\u8bba","text":"

    \u662f\u5426\u6240\u6709\u6ca1\u6709\u7528\u8bed\u8a00\u8868\u8fbe\u7684\u77e5\u8bc6\uff0c\u90fd\u53ef\u4ee5\u88ab\u7528\u8bed\u8a00\u8868\u8fbe\uff1f\uff08not NP or NP-hard\uff09

    \u53ea\u5b66\u4e60\u8bed\u8a00\u662f\u5426\u80fd\u6a21\u62df\u4eba\u7684\u667a\u80fd\u6c34\u5e73\uff1f

    \u6a21\u578b\u662f\u5426\u9700\u8981\u5e94\u5bf9\u6240\u6709\u7684\u5f02\u5e38\u60c5\u51b5/\u673a\u5668\u8bed\u8a00\u7684\u76ee\u6807\u672c\u8eab\u8981\u4e0e\u4eba\u7c7b\u8bed\u8a00\u6709\u6240\u533a\u522b

    "},{"location":"Ling/Pragmatics/ca_da/","title":"Research Methods: Conversation Analysis and Discourse Analysis","text":""},{"location":"Ling/Pragmatics/ca_da/#discourse-analysis","title":"Discourse Analysis","text":"

    Some discourse analysis are taught in linguistic departments (Johnstone, 2018)

    Foucault (1972, 1980) use 'discourse' to refer to the ways of talking and thinking constitute ideologies (set of interrelated ideas) and serve to circulate power in society, and in the sense involved patterns of belief and habitual actions as well as patterns of language.

    Johnstone, Barbara. 2018. Discourse Analysis (3rd ed.). UK: Wiley-Blackwell.

    "},{"location":"Ling/Pragmatics/ca_da/#conversational-analysis","title":"Conversational Analysis","text":"

    Definition

    Conversation analysis is the study of interactional activities. The object being studied involves at least two persons.

    Unit

    conversation > sequence > adjacency pair > turn

    types of adjacency pairs

    turn-taking feature

    One involved in a conversation is supposed to give floor to the other party (parties) at a proper point of time. to keep the balance between the time one spends talking and the time the others spend talking.

    pre-sequence

    insertion sequence

    A: Are you coming tonight?\nB: Can I bring a guest?\nA: Male or female?\nB: What difference does that make?\nA: An issue of balance.\nB: Female.\nA: Sure.\nB: Yeah, I\u2019ll be there.\n

    preference organization

    first part second part preferred dispreferred assessment agree disagree invitation accept refuse offer accept decline proposal agree disagree request acccept refuse"},{"location":"Ling/Pragmatics/intro/","title":"Introduction and Concepts","text":""},{"location":"Ling/Pragmatics/intro/#what-is-pragmatics","title":"What is Pragmatics","text":""},{"location":"Ling/Pragmatics/intro/#how-pragmatics-differ-from-other-linguistics-branches","title":"How pragmatics differ from other linguistics branches?","text":"

    Charles W. Morris (1901-1979) American semiotician and philosopher. supervised by Charles S. Pierce. In his Foundations of the Theory of Signs (1938), Morris proposed that semiotics should have three divisions:

    syntax  -------------> semantics -------------> pragmatics\n              \u2b06\ufe0f\u00a0                        \u2b06\ufe0f\u00a0           \n                        decoding              use in context\n

    During the course of everyday communication, human beings as social animals convey more than the literal, propositional meaning (i.e. we don\u2019t always mean what we say literally).

    There is more to the literal meaning of a sentence when we consider the sentence in relation to the context, i.e., the situation of uttering the sentence.

    Sentence that cannot be considered in isolation \u2192 utterance

    Pragmatics looks beyond truth-conditional meanings, and explores non-literal, implicit, context-related meanings.

    Thus both semantics and pragmatics deal with meaning, yet there is a division of labour: semantics deals with meaning in context.

    "},{"location":"Ling/Pragmatics/intro/#levels","title":"Levels","text":""},{"location":"Ling/Pragmatics/intro/#context-deixis-and-reference","title":"Context, Deixis and Reference \u8bed\u5883\uff0c\u6307\u793a\u4e0e\u6307\u79f0","text":""},{"location":"Ling/Pragmatics/intro/#deixis","title":"Deixis","text":"

    Definition

    Deixis and context: Deictic does not have concrete meanings. Deictic words depend on context for meaning.

    Types of deixis

    defined in relation to the deictic center (person, time, place, discourse, social)

    The deictic cycle. Harman, 1990.

    "},{"location":"Ling/Pragmatics/intro/#reference","title":"Reference","text":"

    Definition: The act of using a word/phrase to pick out something in the world.

    Types of referring expressions (\u6307\u793a\u8bed)

    Choice of referring expressions: based on the speaker\u2019s assumption about what the listener knows.

    Conditions for successful reference: must be collaborative

    "},{"location":"Ling/Pragmatics/intro/#presupposition","title":"Presupposition","text":"

    Differences between semantic and pragmatic presuppositions

    for pragmatic presupposition

    cancellation of presuppositions

    Presuppositions are cancellable or defeasible by changing the words to alter the previous proposition.

    F: \u6709\u4e9b\u4eba\u517b\u732b\u4e86\n~F: \u6709\u4e9b\u4eba\u6ca1\u517b\u732b\n

    projection problem

    presupposition may not survive when simple sentences are projected into complex ones.

    Mary didnt manage to find a job.\nMary didnt manage to find a job. In fact, she didnt even try.\n
    Mike didnt date Mary again.\nMike didnt date Mary gain, if indeed he ever did.\n

    presupposition triggers (\u89e6\u53d1\u8bed): how to determine speakers\u2019 presupposition in the course of verbal communication?

    "},{"location":"Ling/Pragmatics/intro/#conversational-implicature","title":"Conversational Implicature","text":"

    Implicature

    Grice\u2019s theory of conversational implicature, Logic and Conversation.

    An outline of a systematic theory of language use, which can account for the way people read between the lines when understanding everyday language.

    meaning of a sentence

    Grice\u2019s new terms

    Grice draws a distinction

    - Smith doesn't seem to have a girlfriend these days.\n\n- He has been paying a lot of visits to New York lately.\n\n=> entailment: he visits New York recently\n=> implicature: Smith may be having a girlfriend in New York.\n

    features

    Grice\u2019s cooperative principle

    common purpose/common direction: Conversational partners normally recognize a common purpose or a common direction in their conversation.

    common objectives (~= joint project): At any point of a conversation, certain \u201cconversational moves\u201d are judged suitable or unsuitable for accomplishing their common objectives.

    How the cooperative principle is applied:

    How to follow the maxims:

    How to break the maxims:

    The cooperative maxims are guidelines instead of rules. They can be creatively infringed/violated.

    The Horn scales & scalar implicature

    When any form on a scale (most, some, always, often, must, may\u2026) is used or asserted, the negative of all forms higher on the scale is implicated.

    types of implicature

    graph TD\nimplicatures --> conventional/lexical\nimplicatures --> conversational\nconversational --> generalized\nconversational --> particularized\n
    "},{"location":"Ling/Pragmatics/intro/#lexical-pragmatics","title":"Lexical Pragmatics","text":"

    Criticism of relevance theory

    To calculate the processing cost,

    Lexical pragmatics

    pragmatic enrichment

    graph TD\n\npragmatic_enrichment --> pragmatic_narrowing\npragmatic_enrichment --> pragmatic_broadening\npragmatic_broadening --> approximation\npragmatic_broadening --> metaphorical_extension\n
    "},{"location":"Ling/Pragmatics/socio/","title":"Sociopragmatics","text":"

    \u8fd9\u5757\u5185\u5bb9\u4f3c\u4e4e\u6ca1\u6709\u8bb2\u5f88\u591a\u4e1c\u897f. \u7c98\u4e00\u70b9ppt\u539f\u8bdd

    Intercultural Pragmatics

    Intercultural Pragmatics has the potential to help establish a \u201charmonious\u201d interaction and relationship between people from different cultures.

    IP aims to study how to deal with the differences arising from cross-cultural communication and how they may affect the universality of pragmatic principles (theory of speech acts, co-

    operative principle, politeness principle, etc.)

    intercultural pragmatics\u2019 two way perspective

    sociopragmatics

    "},{"location":"Ling/Pragmatics/theories/","title":"Theories and Hypothesis","text":""},{"location":"Ling/Pragmatics/theories/#speech-act-theory","title":"Speech Act Theory \u8a00\u8bed\u884c\u4e3a\u7406\u8bba","text":"

    Speech action definition:

    Speech act theory:

    A speech act = locutionary act + illocutionary act + perlocutionary act

    Illocutionary force \u8bed\u529b: communicative purposes or social functions

    Classification of speech act

    Funtion-based classification system:

    by John Searle, UCB philosopher

    Structure-based classification system:

    "},{"location":"Ling/Pragmatics/theories/#politeness-theory","title":"Politeness Theory","text":"

    Development of Gricean theory

    Definition of politeness theory

    Conversationalists work together, each trying to maintain his/her own face and the face of his/her counterpart.

    type of face

    Acts involved

    Leech\u2019s six Politeness Principle: extension of Gricean theory

    (Note that the term \u2018neo-Gricean\u2019 is most often used to describe the works of Laurence Horn, Stephen Levinson, etc. not other theories e.g. relevance theory)

    "},{"location":"Ling/Pragmatics/theories/#relevance-theory","title":"Relevance Theory","text":"

    Only preserving the maxim of relation in Gricean theory

    Definition of relevance theory

    its investigates how aspects of meaning are generated in context and in relation to the speakers intentions.

    R(relevance) = E(#contextual effects)/C(cost of efforts in obtaining E)

    Relevance is higher when cognitive effects are higher, but it is lower when more processing efforts is required.

    Two aspects of relevance principle

    Application of RT

    "},{"location":"Ling/Semantics/","title":"Index","text":""},{"location":"Ling/Semantics/#contents","title":"Contents","text":"

    1 - Definition Clearification

    This chapter provides a brief introduction to the terminologies involved in semantics.\n

    2 - Logics & Formal Semantics

    This chapter first introduces the semiotics in formal semantics (which adopts a similar system with that in the logics). It then discusses about the semantics in two perspectives: the propositional logic and the predicate logic. It also introduces several basic rules in logic inference.\n

    3 - Scope Ambiguity

    This chapter discusses on the unsolved questions in scope ambiguity.\n
    "},{"location":"Ling/Semantics/#grading","title":"Grading","text":"

    mid-term: 35%

    final: 50%

    participation: 15%

    "},{"location":"Ling/Semantics/#two-tests","title":"Two tests","text":"

    Two tests will be given during the term, one in the middle and one at the end of the term, covering all the material covered up to that point in the course. The tests will be a combination of various types of questions, including true/false and short essay.

    "},{"location":"Ling/Semantics/#final-review-for-fun","title":"Final Review & For Fun","text":"

    The following parts are written in preparation for the final review but I upload it as well for you to read for fun.

    "},{"location":"Ling/Semantics/#noble-semanticians","title":"Noble Semanticians","text":"Name Field Contribution Live Nation Institution Fun facts Noam Chomsky mainly in syntax generative grammar, transformational grammar, government and binding theory, minimalist program, productivity of language, recursivity of language 1928- USA MIT Most prominent linguist alive Ferdinand de Saussure linguist and semiotician founder of semiotics. concepts: sign, signifier vs. signified, diachronic vs. synchronic, language vs. parole, paradigmatic vs. syntagmatic 1857-1913 Switzerland University of Geneva, Switzerland Charles Sanders Peirce philosopher, mathematician, logician founder of semiotics. concepts: index, icon, symbol. 1839-1914 Milford Pennsylvania JHU Michel Br\u00e9al comparative grammar coined the term \u201csemantics\u201d, diachronic focus 1832-1915 born in Rheinlan (Germany), studied in Paris and Berlin in Paris Leonard Bloomfield structural linguistics structural linguistics, language as a self-regulating system, behaviorism(stimulus-response testing) 1887-1949 Yale University reject introspection Aristotle polymath term logic, initiator of western scientific tradition 384-322 BC Stagira, Greece tutor of Alexander the Great Gottlob Freg philosopher, logician, mathematician predicate logic, sense(sentence\u2019s proposition) vs. reference (its truth value) 1848-1925 German University of Jena extreme right-wing views Peter Geach philosopher, professor of logic donkey sentence (1962) 1916-2013 England Oxford Richard Montegue semanticist Montegue grammar: syntax and semantics go together 1930-1971 student of Alfred Tarski, gay man, killed in his apartment, four influential papers Gareth Evans philosopher philosophy of mind, work on reference, e-type anaphora 1946-1980 England Oxford Irene Heim semanticist definite and indefinite pronouns 1954- German, Munich MIT, phd 1982 advisor: Barbara Partee Hans Kamp philosopher and linguist discourse representation theory (DRT) 1954- Dutch Bertrand Russell philosopher, logician logic, philosophy of mathematician 1872-1970 Wales, Britain Cambridge Henri\u00ebtte de Swart linguist tense and aspect, negation, bare nominals and indefinite noun phrases. She has also investigated the role of semantics in language evolution, and was involved in the development of bidirectional optimality theory. 1961- Dutch director of Netherlands Graduate School of Linguistics and Utrecht Institute of Linguistics"},{"location":"Ling/Semantics/#example-questions","title":"Example questions","text":"

    What is a donkey pronoun?

    A donkey sentence is such that an expected existential is interpreted as universal taking wide scope.\n

    What is a discourse pronoun:

    outside the scope of existing quantifier\ne.g. No student studies semantics. He is outside.\n

    The scope of a quantifier is always bound in the clause it appears.

     True\n

    What is quantifier raising?

    Chmosky and May.\nLF, \n

    What are De Morgan\u2019s laws?

    ~(p or q) <=> (~p) and (~q)\n~(p and q) <=> (~p) or (~q)\n

    What are conditional laws

    p -> q <=> ~p or q\n

    When is the indefinite \u201ca\u201d not an existential quantifier?

    1. donkey sentence\n2. generic noun phrase. A woman is difficult to please. \\forall x(Wx -> Dx)\n3. John is a plumber.pj\n

    2 readings: Some boy smiled at Jane and some boy kissed Molly.

    \\exist x(Bx and Sx,j and Kx,m)\n\\exist x(Bx and Sx,j) and \\forall y(By and Ky,m)\n

    2 Types of Recursion

    embedding and coordination\n
    "},{"location":"Ling/Semantics/ambiguity/","title":"Scope Ambiguity","text":""},{"location":"Ling/Semantics/ambiguity/#scope-ambiguity","title":"Scope Ambiguity","text":""},{"location":"Ling/Semantics/ambiguity/#scope-and-anaphora","title":"Scope and Anaphora","text":"

    antecedent vs. postcedent

    anaphor vs. cataphor

    Predicate logic is suited to capture natural language meaning

    allow recursion = recursivity

    two sources of recursion

    some boy kissed every girl.\n\nEvery girl was kissed by some boy.\n
    Someone mentioned tehy called everyone.\n\n\\forall x: Px\\forall y(M(x, Cxy))\n

    linear order: negative polarity item

    graph TD\n  DS -.Transformation.-> SS\n    SS -.send off.-> PF\n    SS -.send off.-> LF\n    PF -.acoustic representation.-> SS\n    LF -.semantic interpretation.-> SS\n

    Transformation:

    CALLOUT: annotation, connotation and denotation

    "},{"location":"Ling/Semantics/ambiguity/#solution-for-scope-ambiguity","title":"Solution for scope ambiguity","text":"

    Quantifier-raising - NC RM - syntactic structure comes before the semantic structure - The movement we make in SS to remove ambiguity in DS is called quantifier-raising. - take the quantifier to the higher position to show the scope

    Quantifier-in - Montague grammar - The derivational illustration is called quantifier-in. - each predicate take an argument once a time

    Quantifier storage - Cooper storage - semantic ambiguity not represented in syntactic structure - semantic representation in which scope ambiguities are obtained without special syntactic rules

    "},{"location":"Ling/Semantics/ambiguity/#quantifier-in","title":"Quantifier-in","text":"

    interrogative: asking a question

    which woman does every man love?\n

    which scopes over every.

    "},{"location":"Ling/Semantics/ambiguity/#scope-ambiguity_1","title":"Scope ambiguity","text":"

    e.g. some boy did not laugh.

    \\exist x (Boy(x) and ~Laugh(x))\n~\\exist x (Boy(x) and Laugh(x))\n

    some boy kissed no girl.

    \\exist x (Boy(x) and ~\\exist y (Girl(y) and Kiss(x, y)))\n~\\exist y (Girl(y) and \\exist x (Boy(x) and Kiss(x, y))): there was no girl kissed by a boy\n

    every boy kissed no girl.

    \\forall x (Boy(x) and ~\\forall y(Girl(y) and Kiss(x, y)))\n

    "},{"location":"Ling/Semantics/ambiguity/#deictic","title":"Deictic","text":"

    No boy said he was hungry.

    No boy was present. He was outside instead.: \u201che\u201d is trying to refer to \u201dno boy\u201d but outside the scope.

    pronoun \\(\\sub\\) anaphora

    "},{"location":"Ling/Semantics/ambiguity/#discourse-anaphora","title":"Discourse Anaphora","text":"

    e.g.

    Every student was present and she was interested.\n

    every: scopes over \u201cEvery student was present\u201d

    every: an indefinite quantifier. \u201cshe\u201d\u2019s antecedent is not clear

    \u201cshe\u201d is hardly bound by the antecedent. \u201cshe\u201d is free * ungrammatical: \u4e0d\u5408\u8bed\u6cd5\u7684, syntactic

    "},{"location":"Ling/Semantics/ambiguity/#infelicitous-semantic-fit-the-context","title":"infelicitous: \u4e0d\u5408\u9002\u7684, semantic, fit the context","text":"

    So we may conclude the following rules for e-type anaphora. BUT this part has NOT been verified with any authority. Do NOT take them as given truths during exams.

    e.g. No boy thinks that he has a chance.

    ~\\exist x(Boy(x) and Think(x, Has-a-chance(x)))\n

    A particular boy said he wanted to kiss every girl. He then did it.

    \\exist !x(Bx and  W(x, K(x, \\forall y(Gy -> K(x, y))))) and K(x, y)\n

    "},{"location":"Ling/Semantics/ambiguity/#donkey-anaphora","title":"Donkey anaphora","text":"

    if a farmer owns a donkey, he beats it.

    * \\exist x (Fx and \\exist y (Dy and O(x, y))) -> B(x, y)\n\\forall x \\forall y (Fx and Dy and O(x, y) -> B(x, y))\n

    = every farmer who owns a donkey beats it.

    \\exist x(Fx and \\exist y (Dy and O(x, y)) -> B(x, y))  // y is free\n

    \u2757\u2757\u2757

    A donkey sentence is such that an expected existential is interpreted as universal taking wide scope.

    donkey pronoun can be: it, him, they (can also be plural forms)

    \u201ca\u201d: generic indefinite

    A woman is a difficult thing to please.\n

    [Every farmer [who owns a donkey] beats it.]

    universal wide scope: it scopes more over the relative clause

    The problem - Existential with narrow scope - interpreted as universal with wide scope - in conditional clauses - in restriction of every

    Conclusion - the machinery of predicate logic is broken - cannot capture meaning of natural language

    If a student tries, she passes the exam.

    (\\exist x(Sx and Tx)) -> Py   ; y is free\n\\exist x((Sx and Tx)) -> Py)\n

    interpretation

    \\forall x((Sx and Tx) -> px)\n

    Solutions for donkey anaphora:

    Reference: Unselective Binding

    "},{"location":"Ling/Semantics/ambiguity/#chapter-6-in-short-discoursedonkey-anaphora","title":"Chapter 6 in short: Discourse/Donkey Anaphora","text":"

    (\u52a0\u7c97\u7684\u662fDonkey anaphora\u548cE-type anaphora\u7684\u533a\u522b)

    Discourse: basic unit of interpretation

    Anaphoric relations in sentence and discourse - E-type anaphora: pronoun outside the scope of binder, not bound, content of pronoun reconstructed, reconstruction based on context - in separate sentences

        ```\n    A student came in. *She*(the student came in) had a question about the exam.\n    ```\n\n- in the same sentence but outside the scope\n    ```\n    If a student likes Copenhagen, *she*(for every case we examine, the student in question who likes Copenhagen) is happy.\n    ```\n\n- problem of compound: antecedent must appear as a noun?\n    ```\n    Bill owns a cat. Max takes care of it.\n    Bill is a cat-owner. # Max takes care of it.\n    ```\n

    Anaphora resolution - TODO

    "},{"location":"Ling/Semantics/definitions/","title":"Definition Clarification","text":""},{"location":"Ling/Semantics/definitions/#what-is-semantics","title":"What is semantics?","text":""},{"location":"Ling/Semantics/definitions/#the-topics-involving","title":"The topics involving:","text":""},{"location":"Ling/Semantics/definitions/#meaning-capturing-metalanguage-tools","title":"Meaning capturing: metalanguage tools","text":""},{"location":"Ling/Semantics/definitions/#ways-to-capture-meaning-henriette-de-swart","title":"Ways to capture meaning: (Henri\u00ebtte de Swart)","text":""},{"location":"Ling/Semantics/definitions/#predicatepredicate-calculusfirst-order-predicate-logic","title":"Predicate/Predicate Calculus/First-order Predicate Logic","text":""},{"location":"Ling/Semantics/definitions/#map-of-linguistics-theory","title":"Map of Linguistics Theory","text":"
    graph TD\n  Language_Ability --> Competence\n  Language_Ability --> Performance\n  Competence --> Grammar\n  Competence --> Lexicon\n  Grammar --> Semantics\n  Grammar --> Phonology\n  Grammar --> Syntax\n  Grammar --> Pragmantics\n
    "},{"location":"Ling/Semantics/definitions/#semantics-syntax","title":"Semantics & Syntax","text":""},{"location":"Ling/Semantics/definitions/#syntax-needs-semantics","title":"Syntax needs semantics","text":""},{"location":"Ling/Semantics/definitions/#semantics-needs-syntax","title":"Semantics needs Syntax","text":""},{"location":"Ling/Semantics/definitions/#semantics-pragmatics","title":"Semantics & Pragmatics","text":""},{"location":"Ling/Semantics/definitions/#context-and-deixis","title":"Context and Deixis","text":""},{"location":"Ling/Semantics/definitions/#deixis-needs-context","title":"Deixis needs context","text":"

    Deixis is how objects, events and situations relate to the here and now of the speakers. It shows that utterance meaning cannot be fully determined by sentence meaning.

    (Last week) (I) play(ed) tennis with Chris.\n
    "},{"location":"Ling/Semantics/definitions/#deictic-vs-anaphoric-use-of-pronouns","title":"Deictic vs. Anaphoric use of pronouns","text":"

    Deictic: pointing context Anaphoric: linguistic expression context. pronoun resolution: antecedent - pronoun

    \ud83d\udcad index - indices (higher register) / indexes \ud83d\udcad Desiderata (high-register way to say Goal, desideratum. sl.)"},{"location":"Ling/Semantics/definitions/#map-of-semantics-taxomony","title":"Map of Semantics / Taxomony","text":"

    Semantics - lexical semantics - meaning of lexical items - smaller unites - mainly words - morphemes - compositional semantics - meaning of larger units - phrases and sentences - word combination

    "},{"location":"Ling/Semantics/definitions/#utterance-sentence-proposition","title":"Utterance / Sentence / Proposition","text":""},{"location":"Ling/Semantics/definitions/#lexical-semantics","title":"lexical semantics","text":"
    abiguity: bank, punch, pitcher\nsynonymy: beautiful-lovely, antonymy: male-female\nhyponymy: set -> superset\ntaxonomy: set -> subset\nsymmetric relation: marry. mutually entail each other\nconverse relation: send, sell\nmeronomy: 
    "},{"location":"Ling/Semantics/definitions/#1-homonymy","title":"1) homonymy","text":""},{"location":"Ling/Semantics/definitions/#2-polysemy","title":"2) polysemy","text":""},{"location":"Ling/Semantics/definitions/#3-synonymy","title":"3) synonymy","text":""},{"location":"Ling/Semantics/definitions/#4-antonymy","title":"4) antonymy","text":""},{"location":"Ling/Semantics/definitions/#5-hyponymy","title":"5) hyponymy","text":""},{"location":"Ling/Semantics/definitions/#6-meronymy","title":"6) meronymy","text":"

    part-whole relationship

    subtypes of meronymy

    pistachio - almond taxonymy\nlaugh - cry move in - move out\ncry - weep\nRMB - monetary unit\ngrilfriend - wife\nsit - stand\njump - hop\ngood - bad\nbeat - beet\nrise - fall reverse\ncigarette - cigar taxonymy\nkid - goat dragon - monster\n
    "},{"location":"Ling/Semantics/definitions/#compositional-semantics","title":"Compositional semantics","text":""},{"location":"Ling/Semantics/definitions/#inventory-of-components","title":"Inventory of components","text":""},{"location":"Ling/Semantics/definitions/#important-linguistics","title":"Important linguistics","text":"

    Michel Br\u00e9al: coined semantics

    Ferdinand de Saussure: semiotician, diachronic vs. synchronic.

    Leonard Bloomfield: structural linguistics, Language, behaviorism(stimulus-response testing). reject introspection(theorize about language learning by thinking about on ones own experience)

    "},{"location":"Ling/Semantics/definitions/#diachronic-synchronic","title":"Diachronic & Synchronic","text":""},{"location":"Ling/Semantics/definitions/#signifier-signified-referent","title":"Signifier & Signified & Referent","text":""},{"location":"Ling/Semantics/definitions/#langue-parole","title":"Langue & Parole","text":""},{"location":"Ling/Semantics/definitions/#paradigmatic-syntagmatic","title":"Paradigmatic & Syntagmatic","text":"

    Noam Chomsky Syntax

    "},{"location":"Ling/Semantics/definitions/#generative-grammar","title":"Generative Grammar","text":""},{"location":"Ling/Semantics/definitions/#ambiguity","title":"Ambiguity","text":"

    e.g. Flying planes can be dangerous.

    graph TD\n  are --> planes\n    planes --> flying\n    are --> dangerous\n
    graph TD\n    is --> flying\n    flying --> planes\n    is --> dangerous\n
    "},{"location":"Ling/Semantics/definitions/#pronoun-resolution","title":"pronoun resolution","text":""},{"location":"Ling/Semantics/definitions/#inference","title":"Inference","text":"

    notes: cf. compare, e.g. for example

    graph TD\n  Inference --> Entailment\n  Inference --> Presuppositions\n  Inference --> Implicature\n

    any conclusion drawn from a set of propositions, from something someone has said and so on.

    "},{"location":"Ling/Semantics/definitions/#entailment","title":"Entailment","text":"
    Three girls were present. -> More than two girls were present.\nThree girls were not present. kills More than two girls were present.\n

    Cannot be cancelled

    # Three girls were present, but actually two girls come.\n#: semantically wrong\n
    "},{"location":"Ling/Semantics/definitions/#presupposition","title":"Presupposition","text":"
    Jim regrets ignoring the first problem. -> Jim has the first problem.\nJim does not regret ignoring the first problem. -> Jim has the first problem.\n

    cannot be cancelled

    # Jim regrets ignoring the first problem, but he does not have the first problem.\n
    "},{"location":"Ling/Semantics/definitions/#implicature","title":"Implicature","text":"
    Susan blushes when Jim looks at her, but she does not have a crush on him.\n
    "},{"location":"Ling/Semantics/definitions/#compositionality","title":"Compositionality","text":"

    Proposed by Noam Chomsky, the term compositionality entails three dimension.

    "},{"location":"Ling/Semantics/definitions/#principle-of-compositionally-of-meaning","title":"Principle of compositionally of meaning","text":"

    The meaning of the whole is a function of the meaning of its parts and the way they are put together.: \u2026 is determined by\u2026

    "},{"location":"Ling/Semantics/formal_semantics/","title":"Logics & Formal Semantics","text":""},{"location":"Ling/Semantics/formal_semantics/#metalanguage","title":"Metalanguage","text":"
    a. January has 31 days.\nb. *******January******* has 7 letters.\nb*. 'January' has 7 letters.\n

    Liar sentence

    (31) Sentence (31) is false.\n

    solutions: (\u4e0d\u8003)

    "},{"location":"Ling/Semantics/formal_semantics/#connectives-truth-and-truth-conditions","title":"Connectives, truth, and truth conditions","text":"

    logic overview

    graph TD\n  Logic --> Logic_from_antiquity\n    Logic --> Predicate_Logic\n    Logic_from_antiquity --> Term_Logic\n    Logic_from_antiquity --> Propositional_Logic\n

    logic from antiquity: older

    predicate logic: newer

    Aristotle: term logic

    Gottlob Frege: predicate logic

    "},{"location":"Ling/Semantics/formal_semantics/#history-of-logics","title":"History of Logics","text":"

    Not applied for - question (?) - exclamation - modal: modal logic

    \ud83d\udcad ergo: therefore"},{"location":"Ling/Semantics/formal_semantics/#term-logic","title":"Term logic","text":""},{"location":"Ling/Semantics/formal_semantics/#modus-ponens","title":"Modus Ponens","text":"

    Means of putting, MP syllogism, affirming the antecedent

    P(conditional statement): If it rain, I do not go to school.\nH: It rains.\nC: I do not go to class.\n

    Formal fallacy: affirming the consequent. Abductive reasoning.

    P: If it rains, I will not go to class.\nH: I do not go to class.\nC: * It rains.\n

    "},{"location":"Ling/Semantics/formal_semantics/#modus-tollens","title":"Modus Tollens","text":"

    Means of carrying, MT syllogism, denying the consequent.

    P: If it has not been cloudy, it does not rain.\nH: It rains.\nC: It has been cloudy.\n

    "},{"location":"Ling/Semantics/formal_semantics/#hypothetical-syllogism","title":"Hypothetical syllogism","text":"

    principle of transitivity

    P: If it rains, the soils goes wet. If the soil goes wet, the plants grow.\nH: It rains.\nC: The plants grow.\n

    "},{"location":"Ling/Semantics/formal_semantics/#disjunctive-syllogism","title":"Disjunctive syllogism","text":"

    two premises and a conclusion

    P: It either rains or its sunny.\nH: It rains.\nC: It is not sunny.\n

    "},{"location":"Ling/Semantics/formal_semantics/#three-types-of-reasoning","title":"Three types of reasoning","text":""},{"location":"Ling/Semantics/formal_semantics/#propositional-logic","title":"Propositional logic","text":""},{"location":"Ling/Semantics/formal_semantics/#conditional-material-implication","title":"conditional, material implication","text":""},{"location":"Ling/Semantics/formal_semantics/#biconditional","title":"biconditional","text":""},{"location":"Ling/Semantics/formal_semantics/#de-swarts-formalizations","title":"De Swarts formalizations","text":""},{"location":"Ling/Semantics/formal_semantics/#well-formed-formula","title":"Well-formed formula","text":""},{"location":"Ling/Semantics/formal_semantics/#propositional-practice","title":"Propositional practice","text":"John is happy. p John is not happy. ~p John is happy or sad. p or q exlusive John is happy, not sad. p and ~q If John has eaten, John is happy. p -> q If John has not eaten, John is not happy. ~p -> ~q John is hungry or thirsty. p or q inclusive. John left before you did. p John is not hungry or thirsty. ~(p or q inclusive) <-> ~p and ~q John is not hungry and thirsty. ~(p and q) <-> ~p or ~q inclusive If John did not laugh, then John cried. ~p \u2192 q \u2194 p or q If John laughed, then John also cried. p \u2192 q \u2194 ~p or q inclusive John did not laugh, or John cried. ~p or q \u2194 p \u2192 q John laughed, or John cried and beat on the table. p and (q or r) \u2194 (p and q) or (p and r) John is not happy, but rather sad. (scope of \u201cnot\u201d) ~p and q. * ~(p and q) John is not happy, or sad. ~(p and q) John is not happy, or John is sad. ~p or q John did not help us or hinder us. ~(p or q) \u2194 ~p and ~q John did not help us or John hinders us. ~p or q
    John is friendly or John is not friendly.\n
    p V_e ~p T T F F T T
    John is friendly and John is not friendly.\n
    p and ~p T F F F F T
    It is not the case that John is not friendly.\n
    ~ ~ p T F T F T F

    contingent.

    It is not the case that John is hungry or John is not grumpy.\n
    ~( p or ~q F T T T F T T F F F T T T F F F"},{"location":"Ling/Semantics/formal_semantics/#material-implication","title":"Material implication \u2192","text":"

    converse: q\u2192p. affirming the consequent

    inverse: ~p\u2192~q. denying the antecedent

    contrapositive: ~q\u2192~p. modus tollens

    given p\u2192q.

    Although it was extremely cold, Sally did not stay indoors.

    ~q->p\np and ~q\n

    We get a holiday, or we protest.

    ~p->q\np or q\n

    Jone said that Jane helped him.

    p\np and q\n

    John\u2019s sister burped

    p: John has a sister. presupposition, assume it true\nq: This sister burped.\np\np and q\n

    John arrives before Jane left

    p before q\n

    John did not arrive before Jane left.

    ~p before q\np ~before q\n
    "},{"location":"Ling/Semantics/formal_semantics/#predication-and-quantification","title":"Predication and Quantification","text":"

    universal quantifier: every, each, all, any, only

    existential quantifier: a, some, there is \\(\\exist\\), for all \\(\\forall\\)

    predicate, argument

    John may like Sally.

    predicate: may like\n

    John has a crush on Sally.

    predicate: has a crush on\n

    Frank is the father of Susan.

    predicate: is the father of\n

    Frank is Susan\u2019s father.

    predicate: is...'s father\n

    Adjunct: if, probably, means, of course, early

    Valent, empty place holder: formal subject

    "},{"location":"Ling/Semantics/formal_semantics/#collective-and-distributive-readings","title":"Collective and distributive readings","text":"
    Jogn and Molly ate a pizza.\np: one pizza, ate one together.   distributive\np and q: two pizzas, each ate a pizza.  collective\n
    Cinthia and Sam have saved 100 dollars.\np: together 100 dollars\np and q: 200 dollars\n

    Content verb is a predicate, but functional verbs are not

    John obviously spoke with Jane because he had to.

    predicate: spoke with\nargument: John, Jane\nadjuncts: obviously, because he had to.\n

    If I get a chance, I will probably try to avoid the mistake.

    predicate: will try to \nargument: I, avoid the mistake\nadjuncts: If I get a chance, probably\n

    John performed Jill\u2019s operation first.

    \n

    The person who talk loudly is Jim\u2019s father.

    predicate: is someone's father\nargument: the person who talk loudly, Jim\nadjunct: \n

    the talking loudly person

    predicate: talking\nargument: person\nadjunct: loudly\n

    predicate: the nodes that are connected in SUD parsing tree

    universal dependency (UD)

    syntactic-universal dependency (SUD)

    graph TD\n  Primitive_units_within_propositions --> Predicates\n  Primitive_units_within_propositions --> Arguments\n    Arguments --> individuals_Terms\n    individuals_Terms --> constants\n    individuals_Terms --> variables\n

    lexical predicates vs. syntactic predicates

    individual constants vs. individual variables

    e.g. We think John likes Susan.

    T(w, Lj,s)\n

    Types of predicates:

    e.g. Monica hid her bicycle.

    x hide y: Hx,y\nMonica: m\nher bicycle: b\nHm,b\n

    e.g. Monica did not hide her bicycle.

    x hide y: Hx,y\nMonica: m\nher bicycle: b\n~Hm,b\n

    e.g. Monica laughed and cried.

    Monica: m\nlaugh: L()\ncry: C()\nLm and Cm\n

    e.g. Jim sent Monica his dog.

    Sj,m,d\n

    e.g. William did not help or hinder Mike.

    ~ (H1w,m or H2w,m) \n

    e.g. Jennifer promise to help.

    P(j, Hj)\n

    e.g. Jennifer did not promise to help.

    ~P(j,Hj)\n

    e.g. Jennifer promise to not laugh.

    P(j,~Lj)\n

    e.g. Mike claimed he wanted to help.

    C(m, W(m/x, Hm/x))\n\nm: Mike\nx: maybe some other\n

    e.g. John asked Mandy to stop laughing.

    A(j, m, S(m, Lm))\n

    e.g. John and Larry called Molly.

    Cj,m and Cl,m\nC(j and l, m)\n

    e.g. Molly did not call John and Larry.

    ~C(m, j) and ~C(m, l)\n~C(m, j and l)\n~C(m, j) or ~C(m, l)\n

    entailment: (universal instantiation)

    every dog barks \u2192 if something is a dog, then it is a dog.

    Universal quantification

    \\(\\forall\\)x (Dx \u2192 Bx)

    D = (d1, d2, d3,\u2026)

    \\(\\forall\\)x (Dx \u2192 Bx)= (Bd1 and Bd2 and Bd3, \u2026.)

    Existential quantification

    \\(\\exist\\)x (Dx and Bx)

    D = (d1, d2, d3,\u2026)

    \\(\\exist\\)x (Dx and Bx) = (Bd1 or Bd2 or Bd3, \u2026.)

    e.g. Every cat barfed.

    \\forall x (Cx -> Bx)\n

    e.g. The cat barfed.

    Bc\n

    e.g. Bill fed cat.

    \\forall x (Cx -> Fb,x)\n

    e.g. Some dog barked at Fred.

    \\exist x (Dx and Bx,f)\n

    e.g. Fred scolded some dog.

    \\exist x (Dx and Sf,x)\n

    e.g. Fred and Susan avoid some dog.

    \\exist x (Dx and Af,x and As,x)\n\\exits x (Dx and Af,x) and \\exist y (Dy and Af,s)\n

    e.g. No dog barks.

    \\forall x (Dx -> ~Bx)\n~\\exist x (Dx and Bx)\n

    e.g. Bill fed no dog.

    ~\\exist x (Dx and Fb,x)\n\\forall x (Dx -> ~Fb,x)\n

    e.g. No dog barked at Susan or chased Fred.

    ~\\exist x ((Dx and (Bx,s or Cx,f))\n\\forall x ((Dx -> (~Bx,s and ~Cx,f))\n\\forall x ((Dx -> ~(Bx,s or Cx,f))\n

    Scope ambiguity

    e.g. Some boy kissed every girl.

    \\exist x \\forall y (Bx and (Gy -> Kx,y)) = \\exist x(Bx and \\forall y (Gy -> Kx,y))\n\\forall y \\exist x (Gy -> (Bx and Kx,y)) = \\forall y (Gy -> \\exist x (Bx and Kx,y))\n

    Every boy kissed some girl.

    \\forall x (Bx -> \\exist (Gy and Kxy)) <=> \\forall x \\exist y (Gy and Kxy)\n

    Every students did not laugh.

    \\forall x (Sx -> ~Lx) <=> ! \\exist x (Sx and Lx)\n~\\forall x (Sx -> Lx) <=> \\exist (Sx and ~Lx)\n

    Not every student laughs.

    ~\\forall x (Sx -> Lx) <=> \\exist (Sx and ~Lx)\n
    graph TD\n  laughed --> student\n    student --> /every\n    /every --> not\n

    each studnet did not laugh.

    \\forall x (Sx -> ~Lx) \n~\\forall x (Sx -> Lx)\n
    "},{"location":"Ling/Semantics/formal_semantics/#polarity-item","title":"Polarity item","text":"

    any: negative polarity item

    John did not pass every exam.

    ~\\forall x (Ex -> Pj,x) <=> \\exist x (Ex and Pj,x)\n\\forall x (Ex -> ~Pj,x)\n

    John did not pass any exam.

    \\forall x (Ex -> ~Pj,x)\n

    e.g.

    Jack saw a rat.

    \\exist x (Rx and Sj,x) \n

    Jack is a rat.

    the quantifier is in the predicate but not the argument. here rat is a constant.

    Rj\n

    Jack knows no genius.

    use not exist to render \u201cno\u201d

    ~\\exist x (Gx and Kj,x)  <=> \\forall x (Gx -> ~Kj,x)\n

    Jack is no genius. <=> Jack is not a genius.

    ~Gj\n

    These problems are difficult.

    Dp\n

    These problems are difficult ones.

    Dp\n

    All the problems are difficult.

    \\forall x (Px -> Dx)\n

    These problems are all the problems.

    Ap\n

    These problems are not all the problems.

    ~Ap\n

    Jack is our plumber.

    Pj\n

    Our plumer is Jack. (has presupposition)

    Pj\n

    Everything counts.

    whether thing includes animate and inanimate.

    \\forall x (Cx)\n\\forall x (Tx -> Cx)\n

    Everybody counts.

    *\\forall x (Cx)\n\\forall x (Px -> Cx)\n

    predicates

    common nouns

    content verbs are the core of syntactic predicates

    adjectives are most always the core of syntactic predicates.

    e.g. Mike\u2019s wife thinks Mikes if lazy.

    predicates inside individual constants are presuppositional

    A thin man was present.

    predicates inside \u2026 .are propositional

    e.g. Every barking is harmless

    has true or false impact on the truth

    \\forall x ((Dx and Bx) -> Hx)\n

    this proposition has to show up in the predicate

    The barking dog is harmless.

    Hd\n

    the presupposition does not show in the predicate

    John avoids every dog he sees.

    \\forall x ((Dx and Sj,x) -> Aj,x)\n

    John said every dog barks.

    intensional

    Sj\nS(j,\\forall x (Dx -> Bx)) \nSj,I  ; I for intensional argument predicate\n
    "},{"location":"Ling/Semantics/formal_semantics/#adjunct-predicates","title":"Adjunct predicates","text":"

    Jane probably teased Sam last night

    John arrived drunk.

    Jim burped twice.

    twice: propositional or presuppositional

    Susan did not cheat yesterday.

    Mary stayed because John stayed.

    Mary did not stay because John stayed

    "},{"location":"Ling/Semantics/formal_semantics/#restricted-quantification","title":"restricted quantification","text":"

    Every boy was hungry

    \\forall x: Bx(Hx)\n

    Some boy was hungry.

    \\exist x: Bx(Hx)\n

    Every cat barfed.

    \\forall x: Cx(Bx)\n

    Bill fed every cat.

    \\forall x (Cx, Fb,x)\n\\forall x: Cx(Fb,x)\n

    Some dog barked at Fred.

    \\exist x (Dx, Bx,f)\n\\exist x: Dx(Bx,f)\n

    Fred and Susan avoid some dog.

    \\exist x(Dx and (Af,x and As,x))\n\\exist x: Dx (Af,x and Af,x)\n

    No dog barks.

    ~\\exist x (Dx and Bx) <=> ~\\exist x: Dx (Bx)\n
    "},{"location":"Ling/Semantics/formal_semantics/#formal-predicate-semantics","title":"Formal Predicate Semantics","text":"
    graph TD\n  Semantic_Rules --> Model\n  Semantic_Rules --> Valuation_Function\n    Model --> Universe_of_Discourse\n    Model --> Interpretation_Function\n    Universe_of_Discourse --> entities\n
    "},{"location":"Ling/Semantics/formal_semantics/#relation","title":"Relation","text":""},{"location":"Ling/Syntax/","title":"Syntax","text":"

    \u4e0d\u597d\u8bf4 \u65bd\u5de5\u4e2d

    \u76ee\u5f55

    "},{"location":"Ling/Syntax/conv_gen/","title":"\u8f6c\u6362\u751f\u6210\u53e5\u6cd5","text":""},{"location":"Ling/Syntax/conv_gen/#x-bar-theory","title":"X-bar theory","text":"

    \u751f\u6210\u53e5\u6cd5\u548c\u6210\u5206\u53e5\u6cd5\u4e4b\u95f4\u7684\u533a\u522b

    [The big book of poems with the blue cover] is on the table.\n

    \u6210\u5206\u53e5\u6cd5\u505a\u51fa\u6765\uff0csubject\u662f\u4e00\u4e2a\u9ad8\u5ea6\u4e3a1\u7684\u6811

    \u53e5\u5b50\u4e4b\u95f4\u7684\u6210\u5206\u901a\u8fc7\u4e24\u4e24\u7ec4\u5408\u8fd8\u80fd\u505a\u51fa\u65b0\u7684\u9ad8\u5ea6

    one-replacement

    \u7528one-replacement\u63a2\u6d4b\u9650\u5b9a\u8bcd\u4e4b\u95f4\u7684\u8ddd\u79bb\u5173\u7cfb\uff08\u52a8\u8bcd\u7528did so/did too\uff09

    Mika loved the policeman intensively.\nSusan did so half-heartedly.\n*Susan did so the baker.\n
    graph TD\n  NP --> D\n    D --> the\n    NP --> N1\n    N1 --> AdjP\n    AdjP --> big\n    N1 --> N2\n    N2 --> N3\n    N2 --> PP1\n    N3 --> N\n    N --> book\n    N3 --> PP2\n    PP2 --> of_poems\n    PP1 --> with_the_blue_cover\n

    \u52a0\u5165\u4e86bar level\uff0cbook\u4e0eof poems\u6784\u6210\u4e00\u4e2a\u4e2d\u95f4\u6295\u5c04X-bar\uff0c\u6784\u6210\u4e00\u4e2aconstituent\u3002\u4f7f\u5f97\u6bcf\u4e2a\u53e5\u5b50\u90fd\u80fd\u88ab\u753b\u6210\u4e00\u4e2a\u4e8c\u53c9\u6811\u5f62\u5f0f

    \u751f\u6210\u53e5\u6cd5\u5b66\u6d3e\uff1a\u4e0a\u4e16\u7eaa\u4e94\u5341\u5e74\u4ee3\u3002classical theory and standard theory\u30021988\u5e74\u63d0\u51fa\u4e86government and binding theory\u3002lexicon, D-S, S-S, PF, LF

    "},{"location":"Ling/Syntax/conv_gen/#n-bar","title":"N-bar","text":"

    \u539f\u672cNP\u6839\u636e\u4e00\u7cfb\u5217\u89c4\u5219\u4e0d\u662f\u4e8c\u53c9\u6811\uff0c\u6bd4\u5982N\u2192

    N-bar theory\u8ba4\u4e3a\u53ef\u4ee5\u90fd\u53d8\u6210\u4e8c\u53c9\u6811

    \u89c4\u5219\u6bd4\u5982

    NP -> Det N'\nN' -> AP N'\nN' -> N PP\n

    \u7b2c\u4e00\u6761\u79f0\u4e3a\u4e00\u4e2a\u6700\u5927\u6295\u5c04

    "},{"location":"Ling/Syntax/conv_gen/#v-bar","title":"V-bar","text":"
    VP -> V'   // \u9884\u7559\u4e00\u4e2a\u4f4d\u7f6e\u7ed9\u6f5c\u5728\u7684specifier\uff0c\u5373\u4f7f\u6ca1\u6709\nV' -> AdvP V' | V' PP | V' AdvP\nV' -> V(NP)\n
    "},{"location":"Ling/Syntax/conv_gen/#abj-bar","title":"Abj-bar","text":"
    AdjP -> Adj'\nAdj' -> (AdvP) Adj' | Adj' (AdvP)\nAdj' -> Adj(PP)\n
    "},{"location":"Ling/Syntax/conv_gen/#p-bar","title":"P-bar","text":"
    PP -> P'\nP' -> P'(PP) | (AdvP)P'\nP' -> P(NP)\n

    \u4e2d\u5fc3\u8bcdX \u2192 \u4e2d\u95f4\u6295\u5c04X\u2019 \u2192 \u6700\u5927\u6295\u5c04XP\u3002\u4e0d\u80fd\u76f4\u63a5\u5230XP\uff0c\u4e00\u5b9a\u8981\u6709\u4e2d\u95f4\u6295\u5c04

    "},{"location":"Ling/Syntax/conv_gen/#parameter-of-word-orders","title":"Parameter of Word Orders \u7ba1\u7ea6\u8bba\uff0c \u539f\u5219\u4e0e\u53c2\u6570\u7406\u8bba","text":"

    \u6839\u636eX-bar\u7406\u8bba\uff0c\u53ef\u4ee5\u5bf9\u4e00\u4e9b\u8bed\u8a00\u7684\u4e0d\u540c\u8bed\u5e8f\uff08\u5982SVO\uff0cSOV\u7b49\uff09\u7ed9\u51fa\u8bed\u6cd5\u53c2\u6570\u5316\u89e3\u91ca

    specifier\u548ccomplement\u53ef\u4ee5\u51fa\u73b0\u5728\u5176sister\u7684\u4e24\u4fa7\uff0c\u8fd9\u79cd\u6295\u5c04\u7684\u5de6\u53f3\u533a\u522b\u88ab\u79f0\u4e3aparameter setting

    "},{"location":"Ling/Syntax/conv_gen/#_2","title":"\u753b\u6811\u7684","text":""},{"location":"Ling/Syntax/conv_gen/#head-movement","title":"Head Movement \u4e2d\u5fc3\u8bed\u79fb\u4f4d","text":"

    head movement: movement from a head to another head position

    \u53e5\u5b50\u53ef\u4ee5\u53d1\u751fmovement\u7684\u6807\u5fd7

    "},{"location":"Ling/Syntax/conv_gen/#-reading","title":"- \u4e00\u4e2a\u53e5\u6cd5\u7ed3\u6784\u5177\u6709\u4e24\u79cdreading","text":"

    shortest movement

    shortest: let the path of a movement be the set of nodes that dominate the original position of the moved item, and do not dominate the leading site.

    "},{"location":"Ling/Syntax/ud_sud/","title":"\u4f9d\u5b58\u53e5\u6cd5 UD & SUD","text":"

    In full spelling, Universal Dependency gammar and Surface Syntax Universal Dependency grammar.

    "},{"location":"Ling/Syntax/ud_sud/#tools","title":"Tools","text":"

    AllenNLP Demo CoreNLP Tool

    "},{"location":"Ling/Syntax/ud_sud/#concepts","title":"Concepts","text":""},{"location":"Ling/Syntax/ud_sud/#ud","title":"UD","text":"

    Dependency grammar\u00a0(DG) is an approach to the study of the syntax and grammar of natural languages that is quite distinct from\u00a0phrase structure grammar\u00a0(PSG), which is also known as\u00a0constituency grammar. The modern history of DG begins with\u00a0Lucien Tesni\u00e8re's major oeuvre (1959), whereas the modern history of PSG begins arguably with\u00a0Noam Chomsky's first prominent work (1957).

    DG views linguistic structures in terms of a\u00a0one-to-one mapping\u00a0of atomic linguistic units to the nodes in structure, whereas PSG assumes a\u00a0one-to-one-or-more mapping. The distinction is clearly visible when one compares the tree structures. The next trees are taken from the\u00a0Wikipedia article on DG:

    "},{"location":"Ling/Syntax/ud_sud/#sud","title":"SUD","text":"

    [Surface Syntactic Universal Dependencies (SUD) | SUD](https://surfacesyntacticud.github.io/ SUD is an annotation scheme for syntactic dependency treebanks, and has a nearly perfect degree of two-way convertibility with the Universal Dependencies scheme (UD). Contrary to UD, it is based on syntactic criteria (favoring functional heads) and the relations are defined on distributional and functional bases.

    "},{"location":"Ling/Syntax/ud_sud/#general-principles-of-sud","title":"General principles of SUD","text":""},{"location":"Ling/Syntax/ud_sud/#specific-sud-relations","title":"Specific SUD relations","text":"

    SUD has 4 specific syntactic relations and a few extended relations: - subj - udep - comp - comp:aux - comp:cleft - comp:obj - comp:obl - comp:pred - mod

    "},{"location":"Ling/Syntax/uni_gram/","title":"\u666e\u904d\u8bed\u6cd5 Universal Grammar","text":""},{"location":"Ling/Syntax/uni_gram/#introduction","title":"Introduction","text":"

    Syntax\u7684\u610f\u4e49\u5728\u4e8e\u627e\u5230\u4e00\u79cdgrammar\uff0c\u80fd\u591f\u751f\u6210\u67d0\u79cd\u8bed\u8a00\u4e2d\u7684\u6240\u6709\u53e5\u5b50\u3002

    Grammar\u662f\u57fa\u4e8e\u89c4\u5219\u7684\uff0c\u4e0d\u80fd\u7528high order of statistical approximation to English\u6765\u66ff\u4ee3\u3002

    "},{"location":"Ling/Syntax/uni_gram/#basic-linguistics","title":"Basic Linguistics","text":"

    DFA & Regular language

    \u8c13\u8bcd\u903b\u8f91\u3002\u4f46\u6211\u4eec\u4e0d\u5173\u5fc3\u5176\u4e2d\u7684\u8bed\u4e49\uff0c\u53ea\u9700\u5173\u5fc3CFG\u7684\u5f62\u5f0f\u3002

    "},{"location":"Ling/Syntax/uni_gram/#phrase-structure-limitation","title":"Phrase Structure & Limitation","text":"

    \u81ea\u7136\u8bed\u8a00\u7684CFG\uff08\u4ee5\u82f1\u8bed\u4e3a\u4f8b\uff09\u6784\u6210\u8bed\u6cd5\u7684\u57fa\u7840\u90e8\u5206\u3002

    \u4f46\u8fd9\u6837\u63cf\u8ff0\u81ea\u7136\u8bed\u8a00\u7684\u5de5\u5177\u8fd8\u662f\u4e0d\u80fd\u751f\u6210\u6240\u6709\u5408\u7406\u7684\u53e5\u5b50\uff0c\u6545\u5f15\u5165a more powerful model combining phrase structure and grammatical transformation\uff0c\u5f97\u5230\u8f6c\u6362-\u751f\u6210\u6587\u6cd5\u3002

    "},{"location":"Ling/Syntax/uni_gram/#on-the-goals-of-linguistic-theory","title":"On the Goals of Linguistic Theory","text":"

    \u4ece\u4e00\u822c\u8bed\u6cd5\u4e2d\u5f52\u7eb3\u51faUG\u7406\u8bba\uff0c\u5bf9UG\u7684\u671f\u671b\u7531\u5f3a\u81f3\u5f31\u4e3a\uff1a

    "},{"location":"Ling/Syntax/uni_gram/#the-explanatory-power-of-linguistic-theory","title":"The Explanatory Power of Linguistic Theory","text":"

    \u5e94\u8be5\u7814\u7a76competence\uff0c\u800c\u975eperformance

    "},{"location":"Other/","title":"\u7d22\u5f15","text":"

    TODO\uff08\u8fd8\u6ca1\u5199\uff09

    "},{"location":"Other/24fall/","title":"\u3010TODO\u3011\u6211\u768424fall\u7533\u8bf7\u8bb0\u5f55","text":"

    \u672c\u9875\u9762\u4f1a\u5728\u621112\u6708\u6295\u9012\u5b8c\u7b2c\u4e00\u6279\u7533\u8bf7\u540e\u66f4\u65b0\u4e00\u4e2a\u7533\u8bf7\u8bb0\u5f55\u3002

    \u4e3b\u8981\u76ee\u7684\u6709\u5206\u4eab\u6211\u7684\u7ecf\u9a8c\u5fc3\u5f97\u548c\u52aa\u529b\u83b7\u5f97\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u81f4\u529b\u4e8e\u7ef4\u62a4CS\u548clinguistics\u7533\u8bf7\u8d44\u6599\u5f00\u6e90\u7684\u751f\u6001\u3002

    \u9884\u8ba1\u66f4\u65b0\u5c0f\u6807\u9898\u6709\uff1a

    "},{"location":"Other/24fall/#_1","title":"\u7533\u8bf7\u683c\u8a00","text":""},{"location":"Other/24fall/#ms","title":"ms\u9009\u6821","text":"

    \u6211\u52a0\u5fc3\u9009\u5355\u4e3b\u8981\u770b\u7684\u98de\u8dc3+opencsapp\uff0c\u7136\u540e\u4ece\u91cc\u9762\u5220\u53bb\u6240\u6709\u7533\u5230\u4e5f\u4e0d\u60f3\u53bb\u7684

    \u6211\u4e3a\u4ec0\u4e48\u6ca1\u5fcd\u4f4f\u7533\u4e86\u8fd9\u4e48\u591a\uff1a\u56e0\u4e3a\u89c9\u5f97\u7533\u8bf7\u8d39\u4e0e\u5982\u679c\u7533\u8bf7\u5931\u8d25\u53ef\u80fdgap\u4e00\u5e74\u5e26\u6765\u7684\u635f\u5931\uff0c\u53ef\u80fd\u524d\u8005\u8f83\u5c0f

    "},{"location":"Other/24fall/#phd","title":"Ph.D. \u9009\u5bfc","text":""},{"location":"Other/24fall/#_2","title":"\u8bed\u8a00\u6210\u7ee9","text":"

    CMU \u5fc5\u987b\u9001\u5206

    Umich Meng ECE\u9700\u8981GRE\uff0c\u5fc5\u987b\u9001\u5206 The University of Michigan school code is 1839.

    Uchi MPCS\u9700\u8981GRE\u7684q>85%\uff08\u597d\u50cf\u662f\u8fd9\u4e2a\u6570\uff09\uff0cv\u6ca1\u6709\u8981\u6c42 Please have an official TOEFL or IELTS score sent directly to the University of Chicago. The University's institution code for TOEFL/GRE reporting is 1832

    UW CLMS \u5fc5\u987b\u8981\u5b98\u65b9\u9001\u5206 TOEFL/GRE ETS report code: 4854

    USC: 4852

    UCSD\uff1a4836

    "},{"location":"Other/24fall/#_3","title":"\u63a8\u8350\u4fe1","text":"

    \u5927\u7ea612.2\u53f7\u770b\u5230phd\u7533\u8bf7\u7fa4\u91cc\u8bf4\u7684\uff0c\u5176\u5b9e\u4e0d\u8981\u627e3\u4e2a\u63a8\u8350\u4eba\u5c31\u7ed3\u675f\uff0c\u6700\u597d\u63d0\u524d\u627e4\u52305\u4e2a\uff0c\u56e0\u4e3a\u591a\u4ea4\u6ca1\u6709\u5173\u7cfb\uff0c\u5927\u90e8\u5206\u5b66\u6821\u90fd\u6709\u6dfb\u52a0\u591a\u4e2a\u63a8\u8350\u4eba\u7684\u9009\u9879\uff08\u6211\u7684\u9009\u6821\u91cc\u53ea\u6709loo\u548cumich\u4e0a\u9650\u4e09\u4e2a\uff09\uff0c\u4f46\u662f\u7ecf\u5e38\u6709\u63a8\u8350\u4eba\u5fd9\u5fd8\u4e86\u7684\u60c5\u51b5\u3002\u518d\u95ee\u53e6\u4e00\u4e2a\u7fa4\uff0c\u5f97\u5982\u679c\u662fphd\uff0c\u4e0d\u4f1a\u56e0\u4e3a\u6709\u4e00\u4e2a\u63a8\u8350\u4eba\u5fd8\u4e86\u4ea4\u62d2\u4f60\uff0c\u4f46\u662f\u6709\u7684ms\u542c\u8bf4\u4e09\u5c01\u4ea4\u4e0d\u9f50\u5c31\u63d0\u4ea4\u4e0d\u4e86\uff08\u6211\u7684\u6682\u65f6\u6ca1\u9047\u5230\uff09\uff0c\u6216\u8005\u53ef\u80fd\u56e0\u6b64\u65e0\u58f0\u62d2\u4f60\uff0c\u6240\u4ee5\u8fd8\u662f\u63d0\u524d\u627e4\u4e2a\u4ee5\u4e0a\u3002

    \u542c\u8bf4USC MSCS\u5b8c\u5168\u4e0d\u770b\u63a8\u8350\u4fe1\uff0c\u56e0\u4e3a\u4e5f\u4e0d\u6562\u591a\u8981\uff0c\u6211\u5c31\u4ea4\u4e86\u4e00\u5c01\uff0c\u8d4c\u3002\u3002\u3002\u3002

    Uchi\u53ef\u4ee5\u5171\u4eab\u63a8\u8350\u4fe1

    Rice\u53ef\u4ee5\u5171\u4eab\u63a8\u8350\u4fe1

    CMU\u540c\u4e00\u4e2a\u7533\u8bf7\u7cfb\u7edf\u4e4b\u95f4\u53ef\u4ee5\u5171\u4eab\u63a8\u8350\u4fe1\uff0c\u6bd4\u5982MSCS\u548cPhD\u5171\u4eab\uff0cMLT\u90a3\u4e00\u5927\u4e32\u7684AI\u9879\u76ee\u5171\u4eab\u3002

    UCSD\u7684ms\u548cphd\u4e4b\u95f4\u4e0d\u80fd\u5171\u4eab\u63a8\u8350\u4fe1\uff0c\u4f46\u662f\u636e\u8bf4cs ce master\u4e4b\u95f4\u662f\u4e92\u901a\u7684\uff0c\u8ddfgit\u4e0d\u4e92\u901a

    Umich\u76ee\u524d\u53ea\u77e5\u9053\u81f3\u5c11ms\u548cmeng\u4e4b\u95f4\u4e0d\u80fd\u5171\u4eab\u63a8\u8350\u4fe1\u3002\u586b\u9519\u4e86\u53ef\u4ee5\u66f4\u6539\u63a8\u8350\u4eba\uff0c\u66f4\u6539\u540e\u65b0\u7684\u63a8\u8350\u4eba\u4f1a\u6536\u5230\u90ae\u4ef6\uff0c\u53ea\u662f\u5728\u4f60\u7684\u7533\u8bf7\u91cc\u8fd8\u662f\u663e\u793a\u539f\u6765\u63a8\u8350\u4eba\u3002

    Waterloo\u7684\u63a8\u8350\u4fe1\u5728\u7b2c\u4e00\u6b65\u63d0\u4ea4\u540e1-3\u5929\u5185\u53d1\u51fa\uff0c\u7533\u8bf7\u4eba\u4e0d\u53ef\u51b3\u5b9a\u3002\u6211\u7684\u63a8\u8350\u4eba\u6700\u5feb\u6536\u5230\u7684\u662f\u63d0\u4ea4\u540e1\u5929\u5de6\u53f3\u3002\u4e4b\u540e\u5728ddl\u524d14\u5929\u548c7\u5929\u8fd8\u4f1a\u5404\u81ea\u52a8\u53d1\u4e00\u6b21\u50ac\u4fe1

    \u7fa4\u91cc\u8bf4\u7684\uff1a\u8865\u5145\u4e00\u4e2a\u54e5\u5927cs ce ee\u4e5f\u662f\u5171\u7528\u3002\u5e94\u8be5\u662fms

    \u5df2\u77e5\u5927\u8305\u548c\u54e5\u5927\u67e5ip\u633a\u4e25\uff0c\u7fa4\u91cc\u6709\u540c\u5b66\u6536\u5230\u5b66\u6821\u90ae\u4ef6\u8bf4\u67e5\u5230\u4fe1\u662f\u81ea\u5df1\u53d1\u7684

    "},{"location":"Other/24fall/#_4","title":"\u5957\u74f7","text":"

    \u7f51\u4e0a\u8bf4\u5957\u5230\u74f7\u624d\u80fd\u7533\u3002\u7533\u8bf7\u8fc7\u7a0b\u4e2d\u5f97\u5230\u7684\u6d88\u606f\u662f\u5957\u74f7\u548c\u7533\u8bf7\u5e76\u4e0d\u5f3a\u76f8\u5173\uff0c\u6709\u6559\u6388\u5c31\u60f3\u7b49\u770b\u5230\u6c60\u5b50\u518d\u51b3\u5b9a\u7684\u60c5\u51b5\u3002

    \u7fa4\u91cc\u8bf423fall\u8fd8\u6709\u4eba\u628a\u5f3aprof\u5236\u7684\u5b66\u6821\u544a\u4e86\uff0c\u8bf4\u62ff\u4e0d\u51fa\u5177\u4f53\u7684\u62d2\u4eba\u539f\u56e0\uff0c\u6240\u4ee5\u4eca\u5e74\u5f88\u591a\u5b66\u6821\u6539committee\u5236\u4e86\uff08\u7fa4\u91cc\u6709\u4eba\u8bf4usc\u5c31\u662f\u8fd9\u6837\uff0c\u786e\u5b9e\u4eca\u5e74\u8eab\u8fb9\u4eba\u5957usc\u7684\u74f7\u4e00\u4e2a\u4e5f\u6ca1\u56de\u3002\u3002\uff09

    "},{"location":"Other/24fall/#college-specific","title":"College-specific\u7f51\u7533\u7684\u5751","text":"

    CMU\u5982\u679c\u76f4\u63a5\u641c\u7d22 MLT application \u51fa\u73b0\u7684\u4ee5\u4e0b\u9875\u9762\u53ca\u7533\u8bf7\u94fe\u63a5\u662f\u627e\u4e0d\u5230MLT\u9879\u76ee\u7684

    Application Management (cmu.edu) \u8fd9\u4e2a\u9875\u9762\u548c\u4ee5\u4e0b\u622a\u56fe\u662f\u6b63\u786e\u7684\uff0c\u540c\u7406mscv\u548cmsaii\u4ec0\u4e48\u7684\u9879\u76ee\u4e5f\u5728\u8fd9\u91cc\u7533\u8bf7\u3002

    CMU\u7684video essay\uff1a

    \u5728mscs\u7684\u7cfb\u7edf\u91cc\u662f\u63d0\u524d\u5f55\u597d\u4e86\u7136\u540e\u4e0a\u4f20\u5230youtube\u8fd9\u79cd\u7684\uff0c\u5728\u7ec6\u5206\u7684\u90a3\u51e0\u4e2aai\u9879\u76ee\u91cc\u662f\u96503\u6b21\u673a\u4f1a\uff0c\u6bcf\u6b21\u968f\u673a\u95ee\u9898\uff0c\u9650\u65f6\u51c6\u5907\uff0c\u9650\u65f6\u8bf4\u3002

    \u6211\u770b\u5230\u7684\u7f51\u4e0a\u7684\u5e16\u5b50\u8bf4\u597d\u50cfmiis ini ece\uff08\u8bb0\u4e0d\u4f4f\u8fd9\u51e0\u4e2a\u9879\u76ee\u540d\u5b57\uff0c\u603b\u4e4b\u7c7b\u4f3c\uff09\u662f30s\u51c6\u5907\uff0c180s\u8bf4\uff0c\u95ee\u7684\u95ee\u9898\u5927\u7c7b\u6709\uff1a\u4f60\u961f\u53cb\u600e\u4e48\u8bc4\u4ef7\u4f60\uff0c\u4f60\u6536\u5230\u7684\u961f\u53cb\u7684\u4e00\u6761\u8d1f\u9762\u8bc4\u4ef7\u662f\uff0c\u4f60\u600e\u4e48\u9886\u5bfcproject\uff0c\u4e00\u4e2a\u6210\u529f\u7684project\u5bf9\u4f60\u6765\u8bf4\u662f\u600e\u6837\u7684\uff0c\u4f60\u559c\u6b22\u4ec0\u4e48\u6c9f\u901a\u6a21\u5f0f\uff0c\u5bf9\u4f60\u6765\u8bf4\u4ec0\u4e48\u662f\u5f88\u96be\u505a\u7684\u51b3\u5b9a\uff0c\u4f60\u9047\u5230\u632b\u6298\u4e86\u4f1a\u600e\u4e48\u6837...\u8fd9\u79cd\u5f88\u8ddfcourse project\u548c\u5408\u4f5c\u6709\u5173\u7684\u3002

    \u4f46\u662f\u6211\u5728mlt\u91cc\u6253\u5f00\u9047\u5230\u7684\u662f10s\u51c6\u5907\uff0c210s\u8bf4\uff0c\u9047\u5230\u7684\u4e24\u4e2a\u95ee\u9898\u4f9b\u53c2\u8003: - \u8bb2\u8bb2\u4e3a\u4ec0\u4e48\u9009\u6211\u4eec\u9879\u76ee - \u4f60\u7684\u7814\u7a76\u5174\u8da3\u90fd\u6709\u4ec0\u4e48 \u8fd9\u6837\u5f88\u7814\u7a76\u5bfc\u5411\u7684\u95ee\u9898\uff0c\u611f\u89c9\u719f\u8bb0sop\u5c31\u80fd\u7b54

    UWaterloo \u7684\u7533\u8bf7\u5206\u4e3a\u4e24\u4e2a\u9636\u6bb5\uff0c\u7b2c\u4e00\u4e2a\u9636\u6bb5\u8d76\u7d27\u4ea4\u4e86\u624d\u80fd\u5728\u7b2c\u4e8c\u4e2a\u9636\u6bb5\u4e0a\u4f20cv \u6587\u4e66 \u8bed\u8a00\u6210\u7ee9\u7b49\u4e1c\u897f\uff0c\u7b2c\u4e8c\u9636\u6bb5\u7684\u94fe\u63a5\u4f1a\u5728\u7b2c\u4e00\u9636\u6bb5\u540e2-4\u5929\u6536\u5230\u3002\u7b2c\u4e00\u4e2a\u9636\u6bb5\u4e00\u5b9a\u4e00\u5b9a\u8981\u6bd412.1\u63d0\u524d\u81f3\u5c11\u56db\u4e94\u5929\u4ea4

    Umich\u7684\u7cfb\u7edf\u4e00\u5f00\u59cb\u56db\u4e94\u4e2a\u9875\u9762\u8981\u987a\u5e8f\u586b\u5b8c\uff0c\u540e\u9762\u7684\u9875\u9762\u624d\u80fd\u8df3\u7740\u586b

    "},{"location":"Other/24fall/#_5","title":"\u6587\u4e66","text":"

    CV instruction from JHU Upload a copy of your resume or curriculum vitae (CV). This document should outline clearly and briefly the following: Employment held (include title of jobs and start/end dates) Research activities Academic honors, including fellowships you have been awarded Volunteer or community service Extracurricular activities Honorary societies, awards for service or leadership you have received Publications

    \u5176\u5b9e\u6211\u4e2a\u4eba\u8ba4\u4e3a\u5728\u5ba1\u6587\u4e66\u65f6\u6bcf\u4efd\u6587\u4e665-10\u5206\u949f\uff0c\u53ef\u80fd\u6240\u6709\u4eba\u80fd\u4e00\u773c\u770b\u5230\u7684\u662f 1\uff09\u5c0f\u6807\u9898 2\uff09\u52a0\u7c97\u7684\u5173\u952e\u8bcd\u3002\u8bb2\u4e00\u4e2a\u4f8b\u5b50\u662f\u6211\u4e0a\u6b21\u53c2\u52a0\u4e00\u95e8\u8bfe\u7684group tutorial\u65f6\uff0c\u5f53\u65f6\u5c0f\u7ec4\u6210\u5458\u5408\u5199\u4e86\u4e00\u4efdrp\uff0c\u5176\u4e2d\u6211\u5199\u7684\u662f\u6700\u6666\u6da9\u7684lit review\uff0c\u5373\u4e13\u4e1a\u672f\u8bed\u5bc6\u5ea6\u6700\u9ad8\u8fd8\u53e5\u5b50\u6700\u957f\uff0c\u4f46\u662f\u6211\u7ed9\u6bcf\u4e2a\u5206\u4e3b\u9898\u52a0\u4e86\u5c0f\u6807\u9898\uff0c\u5176\u5b83\u540c\u5b66\u5199\u7684\u90e8\u5206\u6ca1\u6709\u52a0\u3002\u8001\u5e08\u5728\u4e0e\u6211\u4eec\u8c08\u8bdd\u7684\u95f4\u9699\u7784\u4e86\u51e0\u773c\u6211\u4eec\u7684\u6587\u4ef6\uff0c\u77ed\u77ed\u7684\u65f6\u95f4\u91cc\u5c31\u53ea\u770b\u8fdb\u53bb\u4e86lit review\u7684\u5c0f\u6807\u9898\uff0c\u70b9\u8bc4\u4e86\u4e00\u4e0b\u3002\u6240\u4ee5\u6211\u89c9\u5f97\u505a\u6e05\u6670\u7684\u5206\u6bb5\u548c\u5c0f\u6807\u9898\u5f88\u91cd\u8981\uff08\u8fd9\u91cc\u771f\u7684\u6709\u70b9\u50cf\u8bbe\u8ba1\u56db\u539f\u5219\uff0c\u5bf9\u6bd4/\u805a\u5408\uff09\uff0c\u5c24\u5176\u662f\u65f6\u95f4\u7cbe\u529b\u4e0d\u591f\u65f6\uff0c\u5176\u4e2d\u7684\u7ec6\u8282\u5185\u5bb9\u8bf4\u4e0d\u5b9a\u4e0d\u7528\u62a0\u592a\u7ec6\u3002

    \u60f3\u7ed9\u70b9\u5199\u6587\u4e66\u65f6\u81ea\u5df1\u7528\u7684\u683c\u5f0f

    PS\u7ed3\u6784

    \u7b2c\u4e00\u6bb5\uff1a\u4e00\u4e9bhook\uff0c\u8bb2\u4e00\u70b9\u5bf9\u81ea\u5df1\u603b\u7ed3\u6027\u7684\u8bdd/tattoo\uff0c\u6216\u8005\u5e72\u8106\u76f4\u63a5\u4ece\u201c\u6211\u672c\u79d1\u5f00\u59cb\u5bf9xxx\u611f\u5174\u8da3\uff0c\u4e8e\u662f\u4e0a\u4e86\u5f88\u591a\u8bfe\u505a\u4e86\u5f88\u591a\u7814\u7a76\u201d\u5e73\u5b9e\u5730\u5f00\u59cb

    \u7b2c\u4e8c\u6bb5\uff1a\u4e00\u822c\u4e00\u4e24\u53e5\u8bdd\u5e26\u8fc7\u8bfe\u7a0b\uff0c\u6709\u7279\u522b\u51fa\u8272\u7684score\u6216coursework\u53ef\u4ee5\u5728\u8fd9\u91cc\u8bf4

    \u7b2c\u4e09\u5230\u4e94\uff08\u6216\u56db\uff09\u6bb5\uff1a\u6bcf\u6bb5\u4e00\u4e2a\u7ecf\u5386\uff0c\u53ef\u4ee5\u603b\u5206\u603b\u5199\uff0c\u627e\u5230\u4e00\u4e2a\u8fd9\u6bb5\u7ecf\u5386\u6700\u60f3\u7a81\u51fa\u7684\u7279\u70b9/\u54c1\u8d28\uff0c\u7136\u540e\u56f4\u7ed5\u7740\u8bf4

    \u7b2c\u516d\u6bb5\uff1amoving forward \u8bb2\u4ee5\u540e\u7684\u89c4\u5212

    \u7b2c\u4e03\u6bb5\uff1awhy [program name] and why [school name]

    \u7b2c\u516b\u4e5d\u6bb5\uff1a\u5982\u679c\u5b66\u6821\u6709\u7279\u6b8a\u7684diversity \u5956\u5b66\u91d1 gre clarification\u4e4b\u7c7b\u7684\u53ef\u4ee5\u5728\u8fd9\u91cc\u5199

    References

    SoP\u7ed3\u6784

    \u7b2c\u4e00\u6bb5\uff1axxx\u662f\u5f88\u91cd\u8981\u7684\uff0c\u6211\u4e00\u76f4\u5bf9xxx\u611f\u5174\u8da3\uff0c\u6211\u9009\u62e9\u5728x\u6821\u8bfbphd is naturally a continuation of my previous interests and experiences\u3002\u5177\u4f53\u800c\u8a00\uff0c\u6211\u7684\u7814\u7a76\u5174\u8da3\u4e3a\uff1a ( \u6b64\u5904\u53ef\u4ee5\u6709\u5c0f\u6807\u9898\u548c\u4e00\u53e5\u8bdd\u4ecb\u7ecd

    1. AAA aaaa
    2. BBB bbbb
    3. CCC cccc )

    \u7b2c\u4e8c\u6bb5\uff1aAAA \u7ed3\u6784\u5982\u4e0b

    \u5199\u5b8c\u4e00\u6574\u6bb5\u540e\u6700\u540e\u518d\u8d77\u5c0f\u6807\u9898\n\u4e00\u4e2a\u65b9\u5411\u6709\u591a\u91cd\u8981\u7b80\u4ecb\n\uff08+\u81ea\u5df1\u8fc7\u53bb\u8bfe\u7a0b\u9879\u76ee\uff0c\u5982\u679c\u771f\u7684\u5f88\u91cd\u8981\u7684\u8bdd\u5427\uff09\n+\u81ea\u5df1\u8fc7\u53bb\u7814\u7a76\n+\u81ea\u5df1\u8fc7\u53bb\u7814\u7a76\n+\u672a\u6765\u7814\u7a76\n+\u672a\u6765\u7814\u7a76\n+\u5e0c\u671bachieve\u7684\u76ee\u6807\n

    \u7b2c\u4e09\u6bb5\uff1aBBB \u540c\u4e0a

    \u7b2c\u56db\u6bb5\uff1aCCC \u540c\u4e0a\u4e0a

    \u7b2c\u4e94\u6bb5\uff1aMoving forward

    \u7b2c\u516d\u6bb5\uff1awhy [program name] and why [school name]

    References

    \u6211\u7684\u8fc7\u53bb\u7814\u7a76\u7ecf\u5386\u4e0e\u6211\u672a\u6765\u7684\u76ee\u6807\u65b9\u5411\u7279\u522b\u4e0d\u76f8\u4f3c\uff0c\u4f46\u662f\u611f\u89c9\u4f60\u5fc5\u987b\u53bb\u5bfb\u627e\u4e00\u4e2a\u5e73\u8861\u70b9\uff0c\u5bfb\u627e\u4e24\u4e09\u4e2a\u5c0f\u6807\u9898\u80fd\u628a\u4ed6\u4eec\u90fd\u6982\u62ec\u4f4f\u3002\u8fd9\u4e24\u4e09\u4e2a\u5c0f\u6807\u9898\u9996\u5148\u8981\u670d\u52a1\u4e8e\u672a\u6765\u65b9\u5411\uff0c\u7136\u540e\u56e0\u4e3a\u4f60\u8fc7\u53bb\u7684\u6bcf\u4e2a\u9879\u76ee\u4e0d\u53ef\u80fd\u53ea\u6709\u4e00\u4e2a\u5c5e\u6027/\u9886\u57df\uff0c\u53ef\u4ee5\u9009\u62e9\u80fd\u591f\u670d\u52a1\u4e8e\u672a\u6765\u65b9\u5411\u7684\u65b9\u9762\uff0c\u7528\u201c\u6211\u53d7\u5230\u4e86xx\u65b9\u9762\u7684\u542f\u53d1\u201d\u4e4b\u7c7b\u7684\u8bdd\u8fde\u63a5\u8d77\u6765\u3002

    UCSD \u7ed9\u7684\u53c2\u8003\u6307\u5bfc \u4e94\u4e2a\u95ee\u9898 - How did you become interested in this field? - What experiences have contributed toward your preparation for further study in this field? - What are your future goals? - What are your research interests? - How are you a \"match\" for the program to which you are applying? \u5176\u5b83\u8981\u6ce8\u610f\u7684 - Give examples of personal attributes or qualities that would help you complete graduate study successfully. - Describe your determination to achieve your goals, your initiative and ability to develop ideas, and your ability to work independently. - Describe background characteristics that may have placed you at an educational disadvantage (English language learner, family economic history, lack of educational opportunity, disability, etc.). - Leave the reader believing that you are prepared for advanced academic work and will be successful in graduate school.

    "},{"location":"Other/24fall/#_6","title":"\u81f4\u8c22","text":"

    \u6211\u7684\u63a8\u8350\u4eba

    \u7ed9\u8fc7\u6211\u91cd\u8981\u4eba\u751f\u5efa\u8bae\u7684

    \u8001\u5e08

    \u8ddf\u6211\u804a\u7533\u8bf7\u7684\u540c\u5b66

    \u63d0\u4f9b\u60c5\u611f\u652f\u6301\u7684\u540c\u5b66\u548cTA\u4eec

    "},{"location":"Other/24fall/#emotion-timeline","title":"\u9644\u5f55\uff1aEmotion \u7248 \u6211\u7684 Timeline\uff08\u5efa\u8bae\u522b\u770b \u770b\u6211\u4e22\u4eba\uff09","text":"

    \u6211\u7684\u7533\u8bf7\u771f\u7684\u597d\u6781\u9650\u554a\u554a\u554a\u554a\u554a\u554a\u554a

    "},{"location":"Other/apa/","title":"APA Format","text":"

    \u6211\u559c\u6b22\u7528\u5f15\u6587\u81ea\u52a8\u751f\u6210\u5668\uff0c\u63a8\u8350\u51e0\u4e2a

    "},{"location":"Other/apa/#apa-style","title":"\u5916\u8bed\u8bba\u6587\u6587\u732e\u5f15\u7528\u683c\u5f0f\u2014\u2014APA Style","text":"

    APA\u683c\u5f0f\u6307\u7684\u662f\u7f8e\u56fd\u5fc3\u7406\u5b66\u4f1a\uff08American Psychological Association\uff0c\u7b80\u79f0APA\uff09\u51fa\u7248\u7684\u300a\u7f8e\u56fd\u5fc3\u7406\u534f\u4f1a\u51fa\u7248\u624b\u518c\u300b\uff08Publication Manual of the American Psychological Association\uff09\u3002\u5b83\u8d77\u6e90\u4e8e1929\u5e74\uff0c\u5230\u76ee\u524d\u4e3a\u6b62\u5df2\u7ecf\u66f4\u65b0\u81f3\u7b2c\u4e03\u7248\uff0c\u603b\u9875\u6570\u4e5f\u5df2\u7ecf\u8d85\u8fc7400\u9875\uff0c\u91cc\u9762\u8be6\u7ec6\u89c4\u8303\u4e86\u6587\u7ae0\u7684\u9875\u9762\u683c\u5f0f\uff08\u884c\u95f4\u8ddd\u3001\u5b57\u4f53\u3001\u5b57\u53f7\u3001\u9875\u8fb9\u8ddd\u7b49\u7b49\uff09\u3001\u56fe\u8868\u8868\u683c\\\u53c2\u8003\u6587\u732e\u7b49\u7b49\uff0c\u6781\u4e3a\u5168\u9762\u3002APA\u4e3b\u8981\u7528\u4e8e\u5fc3\u7406\u3001\u6559\u80b2\u53ca\u793e\u4f1a\u79d1\u5b66\u7b49\u5b66\u79d1\u3002\u5176\u89c4\u8303\u683c\u5f0f\u4e3b\u8981\u5305\u62ec\u6587\u5185\u6587\u732e\u5f15\u7528\uff08Reference Citations in Text\uff09\u548c\u6587\u672b\u53c2\u8003\u6587\u732e\u5217\u8868\uff08Reference List\uff09\u4e24\u5927\u90e8\u5206\u3002

    APA\u683c\u5f0f\u5f3a\u8c03\u51fa\u7248\u7269\u7684\u5e74\u4ee3\uff08Time of the Publication Year\uff09\u800c\u4e0d\u5927\u6ce8\u91cd\u539f\u6587\u4f5c\u8005\u7684\u59d3\u540d\u3002\u5f15\u6587\u65f6\u5e38\u5c06\u51fa\u7248\u5e74\u4ee3\u7f6e\u4e8e\u4f5c\u8005\u7f29\u5199\u7684\u540d\uff08the Initial of Author\u2019s First Name\uff09\u4e4b\u524d\u3002

    \u4e00\u3001\u6587\u5185\u6587\u732e\u5f15\u7528\uff08ReferenceCitations in Text\uff09

    1.\u5355\u4e00\u4f5c\u8005

    \u683c\u5f0f\u5e94\u4e3a\u201c\uff08\u4f5c\u8005\u59d3\u6c0f\uff08\u975e\u9996\u5b57\u6bcd\uff09\uff0c\u53d1\u8868\u5e74\u4efd\uff09\u201d\u3002\u82e5\u4f5c\u8005\u59d3\u540d\u5728\u6587\u7ae0\u4e2d\u5df2\u88ab\u63d0\u53ca\uff0c\u53ea\u9700\u6807\u51fa\u5e74\u4efd\u5c31\u597d\uff08\u82e5\u9700\u8981\u53ef\u52a0\u4e0a\u9875\u6570\uff09\uff0c\u4ecd\u9700\u4f7f\u7528\u62ec\u53f7\u3002\u591a\u4f4d\u4f5c\u8005\u4ee5\u4e0a\u540c\u7406\u3002\u4f8b\u5982\uff1a

    A recent study found a possible genetic cause of alcoholism (Pauling, 2005). Pauling (2005) discovered a possible genetic cause of alcoholism.

    2.\u4e24\u4f4d\u4f5c\u8005

    \u4f5c\u8005\u59d3\u6c0f\u5fc5\u987b\u4ee5\u4ed6\u4eec\u7684\u540d\u5b57\u5728\u5176\u53d1\u8868\u6587\u7ae0\u5185\u7684\u987a\u5e8f\u6765\u6392\u5e8f\u3002\u82e5\u4e24\u4e2a\u4f5c\u8005\u90fd\u5728\u62ec\u53f7\u5185\u5f15\u7528\uff0c\u540d\u5b57\u4e2d\u95f4\u9700\u52a0\u4e0a\u201c&\u201d\u7b26\u53f7\uff1b\u82e5\u4e0d\u5728\u62ec\u53f7\u5185\u5219\u4f7f\u7528\u201cand\u201d\u3002\u4f8b\u5982\uff1a

    A recent study found a possible genetic cause of alcoholism (Pauling & Liu, 2005). Pauling and Liu (2005) discovered a possible genetic cause of alcoholism.

    3.\u4e09\u81f3\u4e94\u4f4d\u4f5c\u8005

    \u7b2c\u4e00\u6b21\u5f15\u7528\u65f6\u9700\u5217\u4e3e\u5168\u90e8\u7684\u4f5c\u8005\uff0c\u5f80\u540e\u82e5\u5f15\u7528\u76f8\u540c\u7684\u6587\u732e\uff0c\u53ea\u9700\u4e3e\u51fa\u6700\u4e3b\u8981\u7684\u4f5c\u8005\uff0c\u518d\u52a0\u4e0a\u201cet al.\u201d\u3002\u4f46\u662f\uff0c\u5728\u53c2\u8003\u6587\u732e\u90e8\u5206\uff0c\u5168\u90e8\u4f5c\u8005\u7684\u59d3\u540d\u7686\u987b\u5217\u4e3e\u51fa\u6765\u3002\u4f8b\u5982\uff1a

    A recent study found a possible genetic cause of alcoholism (Pauling, Liu, & Guo, 2005). Pauling, Liu, and Guo (2005) conducted a study that discovered a possible genetic cause of alcoholism. Pauling et al. (2005) discovered a possible genetic cause of alcoholism. A recent study found a possible genetic cause of alcoholism (Pauling et al., 2005).

    4.\u516d\u4f4d\u4f5c\u8005\u4ee5\u4e0a

    \u4e3e\u51fa\u7b2c\u4e00\u4f4d\u4f5c\u8005\u5373\u53ef\uff0c\u683c\u5f0f\u5e94\u4e3a\u201c\uff08\u4f5c\u8005\u00a0et al.\uff0c\u5e74\u4efd\uff09\u201d\u3002\u5728\u53c2\u8003\u6587\u732e\u90e8\u5206\uff0c\u5168\u90e8\u4f5c\u8005\u7684\u59d3\u540d\u7686\u987b\u5217\u4e3e\u51fa\u6765\u3002\u4f8b\u5982\uff1a

    Pauling et al. (2005) discovered a possible genetic cause of alcoholism.

    5.\u591a\u7bc7\u6587\u732e\uff0c\u540c\u4e00\u4f5c\u8005

    \u82e5\u4e00\u4f5c\u8005\u6709\u591a\u7bc7\u4f60\u60f3\u5f15\u7528\u7684\u6587\u732e\uff0c\u53ea\u9700\u7528\u9017\u53f7\u6765\u533a\u9694\u4f5c\u54c1\u7684\u53d1\u8868\u5e74\u4efd\uff08\u6700\u65e9\u5230\u6700\u665a\u4f9d\u5e8f\u6392\u5217\uff09\u3002\u82e5\u591a\u7bc7\u6587\u732e\u5728\u540c\u4e00\u5e74\u5185\u53d1\u8868\uff0c\u8bf7\u5728\u5e74\u4efd\u540e\u9762\u52a0\u4e0aa\u3001b\u3001c\u2026\u2026\u7b49\u6807\u6ce8\u3002\uff08\u6309\uff1aabc\u7684\u4f7f\u7528\u9700\u4e0e\u53c2\u8003\u6587\u732e\u90e8\u5206\u6709\u6240\u5bf9\u5e94\uff0c\u800c\u8fd9\u4e9b\u6587\u732e\u7684\u7f16\u6392\u4ee5\u6807\u9898\u540d\u79f0\u7684\u5b57\u6bcd\u6765\u51b3\u5b9a\u3002\uff09\u4f8b\u5982\uff1a

    A recent study found a possible genetic cause of alcoholism (Pauling, 2004, 2005a, 2005b). Pauling (2004, 2005a, 2005b) conducted a study that discovered a possible genetic cause of alcoholism

    6.\u591a\u7bc7\u6587\u732e\uff0c\u591a\u4f4d\u4f5c\u8005

    \u6839\u636e\u4e0a\u4e00\u4e2a\u7684\u89c4\u5219\uff0c\u5e76\u4e14\u4f7f\u7528\u5206\u53f7\u9694\u5f00\u3002\u6392\u5e8f\u5148\u4f9d\u7167\u4f5c\u8005\u59d3\u6c0f\u7684\u5b57\u6bcd\uff0c\u63a5\u7740\u662f\u53d1\u8868\u5e74\u4efd\u3002\u4f8b\u5982\uff1a

    A recent study found a possible genetic cause of alcoholism (Alford, 1995; Pauling, 2004, 2005; Sirkis, 2003)

    7.\u76f4\u63a5\u5f15\u8ff0

    \u683c\u5f0f\u4e0e\u524d\u8ff0\u65e0\u4e0d\u540c\uff0c\u4e00\u6837\u4e3a\u201c\uff08\u4f5c\u8005\uff0c\u5e74\u4efd\uff0c\u9875\u6570\uff09\u201d\u3002\u4f8b\u5982\uff1a

    When asked why his behavior had changed so dramatically, Max simply said \u201cI think it\u2019s the reinforcement\u201d (Pauling, 2004, p. 69).

    \u4e8c\u3001\u6587\u672b\u53c2\u8003\u6587\u732e\u5217\u8868\uff08Reference List\uff09

    \u5728\u53c2\u8003\u6587\u732e\u90e8\u5206\uff0cAPA\u683c\u5f0f\u89c4\u5b9a\u90e8\u5206\u7684\u4eba\u540d\u5fc5\u987b\u4ee5\u59d3\uff08Family name\uff09\u7684\u5b57\u6bcd\u987a\u5e8f\u6765\u6392\u5217\uff0c\u5305\u62ec\u540d\uff08first name\uff09\u7684\u524d\u7f00\u3002

    1.\u5355\u4e00\u4f5c\u8005\u8457\u4f5c\u7684\u4e66\u7c4d\u3002\u4f8b\u5982\uff1a

    Sheril, R. D. (1956).\u00a0The terrifying future: Contemplating color television. San Diego: Halstead.

    2.\u4e24\u4f4d\u4f5c\u8005\u4ee5\u4e0a\u5408\u8457\u7684\u4e66\u7c4d\u3002\u4f8b\u5982\uff1a

    Smith, J., & Peter, Q. (1992).\u00a0Hairball: An intensive peek behind the surface of an enigma. Hamilton, ON: McMaster University Press.

    3.\u6587\u96c6\u4e2d\u7684\u6587\u7ae0\u3002\u4f8b\u5982\uff1a

    Mcdonalds, A. (1993). Practical methods for the apprehension and sustained containment of supernatural entities. In G. L. Yeager (Ed.),\u00a0Paranormal and occult studies: Case studies in application\u00a0(pp. 42\u201364). London: OtherWorld Books.

    4.\u671f\u520a\u4e2d\u7684\u6587\u7ae0\u3002\u4f8b\u5982\uff1a

    Crackton, P. (1987). The Loonie: God\u2019s long-awaited gift to colourful pocket change?\u00a0Canadian Change, 64(7), 34\u201337.

    5.\u6708\u520a\u6742\u5fd7\u4e2d\u7684\u6587\u7ae0\u3002\u4f8b\u5982\uff1a

    Henry, W. A., III. (1990, April 9). Making the grade in today\u2019s schools.\u00a0Time, 135, 28-31.

    6.\u62a5\u7eb8\u4e2d\u7684\u6587\u7ae0\u3002\u4f8b\u5982\uff1a

    Wrong, M. (2005, August 17). Misquotes are \u201cProblematastic\u201d says Mayor.\u00a0Toronto Sol.,\u00a04.

    7.\u653f\u5e9c\u5b98\u65b9\u6587\u732e

    Revenue Canada. (2001).\u00a0Advanced gouging: Manual for employees\u00a0(MP 65\u2013347/1124). Ottawa: Minister of Immigration and Revenue.

    8.\u9488\u5bf9\u7535\u5b50\u6587\u732e\u3001\u7f51\u7ad9\u548c\u7ebf\u4e0a\u6587\u7ae0\uff0cAPA\u683c\u5f0f\u7684\u7f51\u7ad9\u4e0a\u6709\u8ba2\u5b9a\u4e00\u4e9b\u57fa\u672c\u7684\u89c4\u5219\uff0c\u7b2c\u4e00\u5c31\u662f\u63d0\u4f9b\u8bfb\u8005\u8be6\u7ec6\u7684\u6587\u732e\u5185\u5bb9\u6765\u6e90\uff0c\u7b2c\u4e8c\u4e3a\u63d0\u4f9b\u5176\u6709\u6548\u7684\u53c2\u8003\u6765\u6e90\u3002

    \u2474\u00a0\u7f51\u7edc\u6587\u7ae0\u7684\u6253\u5370\u7248\u672c

    Marlowe, P., Spade, S., & Chan, C. (2001). Detective work and the benefits of colour versus black and white [Electronic version].Journal of Pointless Research, 11,123\u2013124.

    \u2475\u00a0\u7535\u5b50\u671f\u520a\u7684\u6587\u7ae0\uff08\u53ea\u6709\u7f51\u7edc\u7248\u7684\u671f\u520a\uff09

    Blofeld, E. S. (1994, March 1). Expressing oneself through Persian cats and modern architecture.Felines & Felons, 4,Article 0046g. Retrieved October 3, 1999, from\u00a0\u7f51\u9875\u5730\u5740.

    \u2476\u00a0\u7535\u5b50\u77ed\u4fe1\uff08newsletter\uff09\u7684\u6587\u7ae0

    Paradise, S., Moriarty, D., Marx, C., Lee, O. B., Hassel, E., et al. (1957, July). Portrayals of fictional characters in reality-based popular writing: Project update.Off the beaten path, 7(3). Retrieved October 3, 1999, from\u00a0\u7f51\u9875\u5730\u5740.

    \u2477\u00a0\u5355\u7bc7\u7ebf\u4e0a\u6587\u732e\uff08\u65e0\u4f5c\u8005\u53ca\u8457\u4f5c\u65e5\u671f\uff09

    What I did today.(n.d.). Retrieved August 21, 2002, from\u00a0\u7f51\u9875\u5730\u5740.

    \u2478\u00a0\u4ece\u5927\u5b66\u8bfe\u7a0b\u6216\u7cfb\u4e0a\u7f51\u7ad9\u53d6\u5f97\u7684\u6587\u732e

    Rogers, B. (2078).Faster-than-light travel: What we\u2019ve learned in the first twenty years.Retrieved August 24, 2079, from Mars University, Institute for Martian Studies Web site:\u00a0\u7f51\u9875\u5730\u5740.

    \u2479\u00a0\u4ece\u6570\u636e\u5e93\u641c\u5bfb\u7684\u671f\u520a\u6587\u7ae0\u7684\u7535\u5b50\u590d\u5236\u7248\u672c\uff083\u81f35\u4f4d\u4f5c\u8005\uff09

    Costanza, G., Seinfeld, J., Benes, E., Kramer, C., & Peterman, J. (1993).\u00a0Minuti\u00e6 and insignificant observations from the nineteen-nineties.Journal about Nothing, 52,475\u2013649. Retrieved October 31, 1999,\u00a0from NoTHINGJournals database.

    \u247a\u00a0\u7535\u5b50\u90ae\u4ef6\u6216\u5176\u4ed6\u4e2a\u4eba\u901a\u8baf\uff08\u4e0d\u51fa\u73b0\u5728\u53c2\u8003\u6587\u732e\u5217\u8868\u4e2d\uff0c\u4ec5\u5728\u6587\u4e2d\u6807\u51fa\uff09\u3002\u4f8b\u5982\uff1a

    (A. Monterey, personal communication, September 28, 2001).

    9.\u50a8\u5b58\u4e8e\u5149\u789f\u7684\u4e66\u7c4d

    Nix, G. (2002).\u00a0Lirael, Daughter of the Clayr\u00a0[CD].\u00a0New York: Random House/Listening Library.

    10.\u50a8\u5b58\u4e8e\u5f55\u97f3\u5e26\u7684\u4e66\u7c4d

    Nix, G. (2002).\u00a0Lirael, Daughter of the Clayr\u00a0[Cassette Recording No. 1999-1999-1999]\u3002New York: Random House/Listening Library.

    APA\u683c\u5f0f\u8303\u6587\u53ef\u6d4f\u89c8\u7f51\u9875\uff1a

    MLA Sample Essay

    \u5176\u8be6\u7ec6\u7684\u4ecb\u7ecd\u53ef\u53c2\u770b\u7f8e\u56fd\u4f5b\u8499\u7279\u5927\u5b66\u56fe\u4e66\u9986\u5927\u536b\u2022W\u2022\u8c6a\u7eaa\u5ff5\u56fe\u4e66\u9986\uff08David W. Howe Memorial Library of THE UNIVERSITY OF VERMONT Libraries\uff09\u7f51\u7ad9\u4e0a\u7684\u201cAPA (American Psychological Association) Style\u201d\u7f51\u9875\uff08\u7f51\u5740\uff1a

    APA (American Psychological Association) Style | Howe Library

    "},{"location":"Other/nlp_phd/","title":"NLP Global PHD Equality Digest (\u642c\u8fd0)","text":"

    \u7ffb\u8bd1\u81eahttps://github.com/zhijing-jin/nlp-phd-global-equality

    "},{"location":"Other/nlp_phd/#_1","title":"\u9996\u63a8\u8d44\u6e90","text":"
    1. ACL \u5e74\u5ea6\u5bfc\u5e08\u5236\u9879\u76ee\uff08https://acl-mentorship.github.io\uff09
    2. NLP with Friends \uff08Welcome! - NLP with Friends\uff09
    "},{"location":"Other/nlp_phd/#phd","title":"\u7b2c\u4e00\u9636\u6bb5\uff1a\u600e\u6837\u7533\u8bf7PhD\uff1f","text":""},{"location":"Other/nlp_phd/#_2","title":"\u7533\u8bf7\u5efa\u8bae","text":""},{"location":"Other/nlp_phd/#phd_1","title":"\u6211\u5e94\u8be5\u8bfbPhD\u5417\uff1f","text":"
    1. (John Hewitt, PhD@Stanford)\u00a0Undergrad to PhD, or not - advice for undergrads interested in research\u00a0(2018). [Suggestions]

    2. \u7a77\u548c\u4e0d\u806a\u660e\u4e0d\u662f\u7406\u7531

    3. \u591a\u4e0e\u4eba\u4ea4\u6d41\uff0c\u542c\u7684\u5efa\u8bae\u8d8a\u591a\u8d8a\u597d
    4. \u89c2\u5bdf\u4e86\u89e3phd\u7684\u65e5\u5e38\u751f\u6d3b
    5. \u770b\u770b\u81ea\u5df1\u662f\u5426\u6709\u70ed\u60c5
    6. \u7533\u8bf7\u524d\u76848\u6708\u52309\u6708\u8981\u5199\u597d\u81ea\u5df1\u7684SOP\uff0c\u601d\u8003\u81ea\u5df1\u8981\u505a\u600e\u6837\u7684\u7814\u7a76\uff0c\u600e\u6837\u8ba9\u81ea\u5df1\u7684\u7814\u7a76\u6709\u5f71\u54cd\u529b\u3002\u57288\u6708\u8981\u8054\u7cfb\u597d\u63a8\u8350\u4fe1

    7. (Prof Jason Eisner@JHU)\u00a0Advice for Research Students\u00a0(last updated: 2021). [List of suggestions]

    "},{"location":"Other/nlp_phd/#_3","title":"\u7533\u8bf7\u8fc7\u7a0b\u662f\u4ec0\u4e48\u6837\u5b50\u7684\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u4e3a\u4ec0\u4e48\u73b0\u5728\u5c31\u8981\u7533\u8bf7\uff1a\uff081\uff09AI\u754c\u8d8a\u6765\u8d8a\u5377\uff0c\u66f4\u65b0\u975e\u5e38\u5feb\uff0c\u6240\u4ee5\u53d1\u66f4\u591apaper\u4e0d\u4e00\u5b9a\u8868\u793a\u7533\u8bf7\u66f4\u5360\u4f18\u52bf \uff082\uff09\u7855\u58eb\u7533\u8bf7phd\u6bd4\u672c\u79d1\u7533\u8bf7phd\u9700\u8981\u66f4\u591a\u6587\u7ae0 \uff083\uff09\u4e0d\u786e\u5b9a\u6027\u5f88\u5927\uff0c\u8ba1\u5212\u5f88\u53ef\u80fd\u6ca1\u6709\u53d8\u5316\u5feb \uff084\uff09\u9664\u975e\u4f60\u8ba4\u4e3a\u8bfb\u5b8c\u7855\u58eb\u540e\u81ea\u5df1\u80fd\u53d8\u5f97\u66f4\u5f3a
    3. \u7533\u8bf7\u54ea\u91cc\uff1a\uff081\uff09\u9996\u5148\u8981\u8003\u8651\u5b66\u6821\u548c\u5bfc\u5e08\uff0c\u6709\u5efa\u8bae\u79f0\u6700\u597d\u9009\u62e9\u67092\u4f4d\u4ee5\u4e0a\u76f8\u5173\u5bfc\u5e08\u7684\u5b66\u6821\u3002\uff082\uff09\u5730\u5740\u4e5f\u5f88\u91cd\u8981\uff0c\u8fd9\u662f\u672a\u67655\u5e74\u91cc\u4f60\u7684\u5de5\u4f5c\u73af\u5883\u3002\uff083\uff09\u9009\u62e9\u4e0e\u5de5\u4e1a\u754c\u5173\u7cfb\u7d27\u5bc6\u7684\u5730\u65b9
    4. \u51c6\u5907SOP\u548c\u63a8\u8350\u4fe1\uff1a\u89c1\u4e0b\u65b9\u5c0f\u6807\u9898
    5. \u51c6\u5907\u4e09\u7ef4\u6210\u7ee9\uff1a\u5360\u5c0f\u5206\u91cf\u3002\u5176\u4e2d\u6258\u798f\u5fc5\u987b\u8fc7\u7ebf
    6. \u9762\u8bd5\uff1a\u7ed3\u6784\u662f\u201c\u4ecb\u7ecd\u4e00\u4e2a\u4f60\u6700\u60f3\u8bb2\u7684\u7814\u7a76\u9879\u76ee\u201d+\u201c\u4f60\u7684\u7814\u7a76\u5174\u8da3\u662f\u4ec0\u4e48\u201d+\u201c\u8fd8\u6709\u4ec0\u4e48\u95ee\u9898\u201d\u3002\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\u662f\u770b\u4f60\u7684\u89e3\u51b3\u95ee\u9898\u80fd\u529b\u600e\u4e48\u6837\uff0c\u7814\u7a76\u5174\u8da3\u5339\u914d\u4e0d\u5339\u914d\uff0c\u5c11\u90e8\u5206\u60c5\u51b5\u4e5f\u4f1a\u95ee\u5230\u6280\u672f\u7ec6\u8282\u3002\u5728QA\u73af\u8282\uff0c\u53ef\u4ee5\u95ee\u5bf9\u65b9\u4e4b\u524d\u7684\u5de5\u4f5c\uff0c\u53ef\u4ee5\u95ee\u672a\u6765\u4f60\u80fd\u505a\u7684\u5de5\u4f5c\uff0c\u53ef\u4ee5\u95ee\u9879\u76ee\uff0c\u95ee\u5b66\u6821\u3002\u4e0d\u77e5\u9053\u7684\u5c31\u8bf4\u4e0d\u77e5\u9053\u3002
    7. (Prof Dragomir Radev@Yale)\u00a0Advice for PhD Applications, Faculty Applications, etc\u00a0(2023). [List of Suggestions]
    1. [(Roma Patel PhD@Brown, Prof Nathan Schneider@Georgetown University)\u00a0PhD Application Series of the NLP Highlights Podcast)\u00a0(2021). [Podcast] (A new series they launched that addresses all aspects of PhD application. Besides, it is just a great podcast in general that talks about recent NLP advances)
    2. (Albert Webson et al., PhDs@Brown University)\u00a0Resources for Underrepresented Groups, including Brown's Own Applicant Mentorship Program\u00a0(2020, but we will keep updating it throughout the 2021 application season.) [List of Resources]
    3. A Princeton CS Major's Guide to Applying to Graduate School. [List of suggestions]
    4. (Tim Dettmers, PhD@UW)\u00a0Machine Learning PhD Applications \u2014 Everything You Need to Know\u00a0(2018). [Guide]
    1. (Kalpesh Krishna, PhD@UMass Amherst)\u00a0Grad School Resources\u00a0(2018). [Article] (This list lots of useful pointers!)
    2. (Prof\u00a0Mor Harchol-Balter@CMU)\u00a0Applying to Ph.D. Programs in Computer Science\u00a0(2014). [Guide]
    1. (CS Rankings)\u00a0Advice on Applying to Grad School in Computer Science. [Pointers]
    2. (Prof Scott E. Fahlman@CMU)\u00a0Quora answers on the LTI program at CMU\u00a0(2017). [Article] ---------------------------------------------------------------------------------------
    "},{"location":"Other/nlp_phd/#_4","title":"\u600e\u6837\u9009\u62e9\u5b66\u6821/\u9879\u76ee\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u6295\u591a\u5c11\u6240\u5b66\u6821\uff1a8\uff5e13\u6240
    "},{"location":"Other/nlp_phd/#sop","title":"\u600e\u6837\u51c6\u5907SOP\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u516b\u6708\u4efd\u5f00\u59cb\u5199\u7684\u6700\u591a
    3. SOP\u5e94\u5f53\u63cf\u8ff0\u4f60\u7684\u7814\u7a76\u7ecf\u5386\uff0c\u8be6\u7ec6\u4ecb\u7ecd\u505a\u8fc7\u7684\u7814\u7a76\u7684\u5177\u4f53\u8fc7\u7a0b\u3001\u7814\u7a76\u6bcf\u4e00\u6b65\u7684\u7ec6\u8282\uff0c\u8fd9\u6837\u6bd4\u8f83\u65b9\u4fbf\u8bc4\u59d4\u4f30\u8ba1\u4f60\u7814\u7a76\u7684\u4ef7\u503c\uff0c\u8ba9\u4ed6\u4eec\u77e5\u9053\u4f60\u660e\u767d\u81ea\u5df1\u7684\u7814\u7a76\u6bcf\u4e00\u6b65\u90fd\u5728\u505a\u4ec0\u4e48\u3002\u4e4b\u540e\uff0c\u4f60\u5e94\u5f53\u4ece\u6574\u4e2a\u7814\u7a76\u751f\u6daf\u7684\u89c6\u89d2\u6765\u4ecb\u7ecd\u4f60\u4e4b\u524d\u7684\u5de5\u4f5c\uff0c\u5e76\u5206\u522b\u4ece\u5177\u4f53\u7684\u7814\u7a76\u5de5\u4f5c\u3001\u4f60\u7684\u7814\u7a76\u5fc3\u5f97\u4e24\u4e2a\u65b9\u9762\u4ecb\u7ecd\u4f60\u7684\u672a\u6765\u5c55\u671b\uff0c\u4ecb\u7ecd\u4f60\u5728phd\u9636\u6bb5\u8981\u505a\u600e\u6837\u7684\u7814\u7a76\u3002
    4. \u6bcf\u6240\u5b66\u6821\u5e94\u8be5\u6295\u4e0d\u4e00\u6837\u7684SOP\uff0c\u53ea\u6539\u6700\u540e\u4e00\u4e24\u6bb5\u4e5f\u6709\u70b9\u5c11\uff0c\u6700\u597d\u6539\u52a8\u5927\u4e00\u4e9b\uff0c\u6295\u5176\u6240\u597d\u3002
    5. \u53ef\u4ee5\u628aSOP\u7ed9recommender\u770b\u4e00\u4e0b
    "},{"location":"Other/nlp_phd/#_5","title":"\u600e\u6837\u51c6\u5907\u63a8\u8350\u4fe1\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u9009\u62e9\u63a8\u8350\u4eba\uff081\uff09\u4f60\u5bf9\u63a8\u8350\u4eba\u7684\u719f\u77e5\u7a0b\u5ea6\uff082\uff09\u4f60\u4e0e\u8fd9\u4f4d\u63a8\u8350\u4eba\u5408\u4f5c\u7684\u5de5\u4f5c\u597d\u4e0d\u597d\uff083\uff09\u63a8\u8350\u4eba\u7684\u77e5\u540d\u5ea6\u3002\u56e0\u6b64\u8bfe\u7a0b\u63a8\u6216TA\u63a8\u662f\u4e0d\u597d\u7528\u7684\u3002\u5de5\u4e1a\u754c\u63a8\u662f\u597d\u7528\u7684\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u63a8\u8350\u4fe1\u4f60\u540c\u6837\u9700\u8981\u8bc4\u4f30\u63a8\u8350\u4eba\u7684\u77e5\u540d\u5ea6\u3002
    3. \u9700\u8981\u6ce8\u610f\u77e5\u540d\u7684\u63a8\u8350\u4eba\uff0c\u7ade\u4e89\u7684\u5b66\u751f\u4e5f\u591a\uff0c\u53ea\u4f1a\u63a8\u8350\u6700\u4f18\u79c0\u7684\u5b66\u751f\u3002
    4. \u63d0\u9192\u63a8\u8350\u4eba\u4f60\u7684\u4f18\u70b9\u548c\u5de5\u4f5c\uff0c\u63a8\u8350\u4eba\u5f88\u5fd9\uff0c\u53ef\u80fd\u60f3\u4e0d\u8d77\u6765\u3002\u6ce8\u610f\u5728\u63a8\u8350\u4fe1\u63d0\u4ea4\u622a\u6b62\u524d1\u661f\u671f\u548c2\u661f\u671f\u5206\u522b\u90ae\u4ef6\u63d0\u9192\u63a8\u8350\u4eba\u63d0\u4ea4\u63a8\u8350\u4fe1\u3002
    "},{"location":"Other/nlp_phd/#_6","title":"\u524d\u63d0\u6761\u4ef6\uff1a\u6691\u7814","text":"
    1. (Andrew Kuznetsov, PhD@CMU)\u00a0CS/HCI PhD Opportunity Tracker from Twitter\u00a0(Developed in 2021).\u00a0http://www.andrewkuz.net/hci-opportunities-2022.html
    2. (Eugene Vinitsky, PhD@UC Berkeley)\u00a0A Guide to Cold Emailing\u00a0(2020). [Article]
    3. (Prof Shomir Wilson@Penn State University)\u00a0Guide for Interacting With Faculty\u00a0(2018). [Suggestions]
    4. (Prof Shomir Wilson@Penn State University)\u00a0Reference Letter Procedure. [Suggestions]
    "},{"location":"Other/nlp_phd/#_7","title":"\u524d\u63d0\u6761\u4ef6\uff1a\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668","text":""},{"location":"Other/nlp_phd/#_8","title":"\u53e6\u4e00\u79cd\u9009\u62e9\uff1a\u8f6f\u4ef6\u5f00\u53d1\u5de5\u7a0b\u5e08","text":""},{"location":"Other/nlp_phd/#phd_2","title":"\u7b2c\u4e8c\u9636\u6bb5\uff1a\u600e\u6837\u505a\u4e00\u4e2a\u597dPHD\uff1f","text":""},{"location":"Other/nlp_phd/#_9","title":"\u7efc\u5408\u6307\u5bfc","text":"
    1. (Prof Isabelle Augenstein@UCopenhagen)\u00a0Increasing Well-Being in Academia\u00a0(2020). [Suggestions]
    2. (Sebastian Ruder@DeepMind)\u00a010 Tips for Research and a PhD\u00a0(2020) . [Suggestions]
    3. (Maxwell Forbes, PhD@UW)\u00a0Every PhD Is Different. [Suggestions]
    4. (Prof Mark Dredze@JHU, Prof Hanna M. Wallach@UMass Amherst)\u00a0How to be a successful PhD student (in computer science (in NLP/ML)). [Suggestions]
    5. (Andrej Karpathy)\u00a0A Survival Guide to a PhD\u00a0(2016). [Suggestions]
    6. be \u201cshe\u2019s the person who did X\u201d
    7. \u4e0d\u8981\u628aphd\u5f53\u4f5c\u5199paper\uff0c\u4f60\u8981\u628a\u81ea\u5df1\u5f53\u6210\u8be5\u9886\u57df\u7684\u4e00\u5458\uff0c\u8981\u63a8\u52a8\u9886\u57df\u7684\u8fdb\u5c55\u3002
    8. (Prof Kevin Gimpel@TTIC)\u00a0Kevin Gimpel's Advice to PhD Students. [Suggestions]
    9. (Prof Marie desJardins@Simmons University)\u00a0How to Succeed in Graduate School: A Guide for Students and Advisors\u00a0(1994). [Article] [Part II]
    10. (Prof Eric Gilbert@UMich)\u00a0Syllabus for Eric\u2019s PhD students\u00a0(incl. Prof's expectation for PhD students). [syllabus]
    11. (Marek Rei, Lecturer@Imperial College London)\u00a0Advice for students doing research projects in ML/NLP\u00a0(2022). [Suggestions]
    12. (Prof H.T. Kung@Harvard)\u00a0Useful Thoughts about Research\u00a0(1987). [Suggestions]
    13. (Prof Phil Agre@UCLA)\u00a0Networking on the Network: A Guide to Professional Skills for PhD Students\u00a0(last updated: 2015). [Suggestions] --------------------------------------------------------------------------------------------------------------------------------------
    14. (Prof Stephen C. Stearns@Yale)\u00a0Some Modest Advice for Graduate Students. [Article]
    15. (Prof Tao Xie@UIUC)\u00a0Graduate Student Survival/Success Guide. [Slides]
    16. (Mu Li@Amazon)\u00a0\u535a\u58eb\u8fd9\u4e94\u5e74\u00a0(A Chinese article about five years in PhD at CMU). [Article]
    17. (Karl Stratos)\u00a0A Note to a Prospective Student. [Suggestions]
    "},{"location":"Other/nlp_phd/#llmnlp","title":"\u70ed\u70b9\u8bdd\u9898\uff1aLLM\u65f6\u4ee3\u7684NLP\u7814\u7a76","text":"
    1. (UMich; led by Prof Rada Mihalcea)\u00a0A PhD Student's Perspective on Research in NLP in the Era of Very Large Language Models\u00a0(2023). [Paper]
    2. Multilinguality and Low-resource Languages ------------------------------------------
    3. Reasoning ---------
    4. Knowledge Bases ---------------
    5. Language Grounding ------------------
    6. Computational Social Science
    7. Child Language Acquisition
    8. Non-verbal Communication
    9. Synthetic Datasets
    10. Interpretability
    11. Efficient NLP
    12. NLP in education
    13. NLP in healthcare
    14. NLP and ethics
    15. (Prof Julian Togelius@NYU, Prof Georgios Yannakakis@UMalta)\u00a0Choose Your Weapon: Survival Strategies for Depressed AI Academics Julian Togelius, Georgios N. Yannakakis\u00a0(2023). [Tweet] [Paper]
    "},{"location":"Other/nlp_phd/#idea","title":"\u627e\u5230\u597d\u7684\u7814\u7a76Idea","text":"
    1. (Prof Jia-Bin Huang@UMaryland)\u00a0How to come up with research ideas?\u00a0(2021). [Suggestions]
    1. (John Schulman, co-founder of OpenAI)\u00a0An Opinionated Guide to ML Research (e.g., horning your taste)\u00a0(2020). [Suggestions]

    Interesting snippets: \"Goal-driven. Develop a vision of some new AI capabilities you\u2019d like to achieve, and solve problems that bring you closer to that goal.\", \"If you are working on incremental ideas, be aware that their usefulness depends on their complexity.\", \"Consider how the biggests bursts of impactful work tend to be tightly clustered in a small number of research groups and institutions. That\u2019s not because these people are dramatically smarter than everyone else, it\u2019s because they have a higher density of expertise and perspective, which puts them a little ahead of the rest of the community, and thus they dominate in generating new results.\", \"Early on in your career, I recommend splitting your time about evenly between textbooks and papers. You should choose a small set of relevant textbooks and theses to gradually work through, and you should also reimplement the models and algorithms from your favorite papers.\" 3. (Prof Fei-Fei Li@Stanford)\u00a0De-Mystifying Good Research and Good Papers\u00a0(2014). [Suggestions]

    Interesting snippets: \"This means publishing papers is NOT about \u201cthis has not been published or written before, let me do it\u201d, nor is it about \u201clet me find an arcane little problem that can get me an easy poster\u201d. It\u2019s about \u201cif I do this, I could offer a better solution to this important problem,\u201d or \u201cif I do this, I could add a genuinely new and important piece of knowledge to the field.\u201d You should always conduct research with the goal that it could be directly used by many people (or industry). In other words, your research topic should have many \u2018customers\u2019, and your solution would be the one they want to use. A good research project is not about the past (i.e. obtaining a higher performance than the previous N papers). It\u2019s\u00a0about the future (i.e. inspiring N future papers to follow and cite you, N->\\inf).\"

    "},{"location":"Other/nlp_phd/#_10","title":"\u8bfb\u6587\u7ae0\u7684\u5de5\u5177","text":""},{"location":"Other/nlp_phd/#_11","title":"\u8bfb\u6587\u7ae0","text":"
    1. (Prof Srinivasan Keshav@Cambridge)\u00a0How to Read a Paper\u00a0(2007). [Suggestions]
    1. (Prof Jason Eisner@JHU)\u00a0How to Read a Technical Paper\u00a0(2009). [Suggestions]
    1. (Prof Emily M. Bender@UW)\u00a0Critical Reading\u00a0(2003). [Suggestions]
    2. \u6279\u5224\u6027\u9605\u8bfb\u662f\u5728\u9605\u8bfb\u4e2d\u79ef\u6781\u6295\u5165\u6587\u7ae0\u7684\u8fc7\u7a0b\u3002\u4f60\u53ef\u4ee5\u5728\u9605\u8bfb\u8fc7\u7a0b\u4e2d\u95ee\u4ee5\u4e0b\u95ee\u9898\uff1a
    3. \u5b9e\u9a8c\u6587\u7ae0\uff1a
    4. \u6559\u79d1\u4e66\u6587\u7ae0\uff0c\u6982\u5ff5\u8bf4\u660e\u6587\u7ae0
    5. \u671f\u520a\u6742\u5fd7\u4e2d\u7684\u8bf4\u7406\u6027\u6587\u7ae0
    "},{"location":"Other/nlp_phd/#_12","title":"\u5199\u6587\u7ae0","text":"
    1. (Prof Jason Eisner@JHU)\u00a0How to write a paper?\u00a0(2010). [Suggestions]
    2. (Simon Peyton Jones@Microsoft)\u00a0How to write a great research paper: Seven simple suggestions\u00a0(2014). [Slides] [Talk]
    3. \u5199\u6587\u7ae0\u662f\u5e2e\u52a9\u5efa\u7acb\u7814\u7a76\u7684\u7b2c\u4e00\u6b65\uff0c\u800c\u4e0d\u662f\u4e00\u79cd\u6c47\u62a5\u7814\u7a76\u7684\u673a\u5236
    4. \u4e0d\u662f\u53ea\u6709\u597d\u7684idea\u80fd\u5199\uff0c\u968f\u4fbf\u4ec0\u4e48idea\u90fd\u53ef\u4ee5\u5199\u4e0b\u6765\uff0c\u7136\u540e\u8ddf\u522b\u4eba\u8c08\u4e00\u8c08
    5. \u4e00\u7bc7paper\u4e00\u4e2aidea\uff0c\u80fd\u591f\u6e05\u6670\u8868\u8fbe\u3002\u6bd4\u5982\u6709\u8fd9\u79cd\u53e5\u5f0f\u201cThe main idea of this paper is\u2026\u201d \u201cIn this section we present the main contributions of this paper.\u201d
    6. \u8981\u5f3a\u8c03\u4f60\u7684contribution\uff0c\u5728introduction\u91cc\u5f3a\u8c03\u3002introduction\u5c31\u662f\u7528\u6765\u63cf\u8ff0\u95ee\u9898+\u4ecb\u7ecd\u8d21\u732e\u7684\u3002
    7. \u53ef\u4ee5\u5148\u5217\u4e3e\u51fa\u6240\u6709\u7684contribution\uff0c\u7136\u540e\u7528contribution\u9a71\u52a8\u6574\u7bc7\u6587\u7ae0
    8. introduction\u91cc\u7684\u201c\u540e\u6587\u7ed3\u6784\u5982\u4e0b\u2026.\u201d\u5e94\u5f53\u7528\u5c06\u6765\u65f6\uff08\u5b58\u7591\uff09
    9. \u600e\u6837\u5199\u76f8\u5173\u7814\u7a76\uff1a
    10. \u600e\u6837\u5199\u7ed3\u679c\uff1a\u628a\u8bfb\u8005\u653e\u5728\u7b2c\u4e00\u4f4d
    11. \u8bb2\u7ed9\u522b\u4eba\u542c\uff0c\u95ee\u8bfb\u8005\u7684\u610f\u89c1\uff0c\u95ee\u8bc4\u59d4\u7684\u610f\u89c1\uff08\u975e\u5e38\u96be\u4f46\u975e\u5e38\uff0c\u975e\u5e38\uff0c\u975e\u5e38\u91cd\u8981\uff09
    12. \u7528\u4e3b\u52a8\u8bed\u6c14\uff08we can see\uff09\u4e0d\u8981\u7528\u88ab\u52a8\u8bed\u6c14\uff08it can be seen that\uff09\uff0c\u4f1a\u4f7f\u6587\u7ae0\u8bfb\u8d77\u6765\u5f88\u6b7b
    13. \u7528\u7b80\u5355\u8bcd\uff0c\u7b80\u5355\u8868\u8fbe
    14. (Prof Jennifer Widom@Stanford)\u00a0Tips for Writing Technical Papers\u00a0(2006). [Suggestions]
    15. (Prof Shomir Wilson@Penn State University)\u00a0Guide for Scholarly Writing. [Suggestions]
    16. (Prof Jia-Bin Huang@U Maryland)\u00a0How to write the introduction (and also the What-Why-How figures). [Tweet]
    17. (Prof Jia-Bin Huang@U Maryland)\u00a0How to write a rebuttal for a conference?\u00a0[Tweet]
    18. (Prof Michael Black@Max Planck Institute)\u00a0Twitter Thread about \"Writing is laying out your logical thoughts\". [Tweet]
    19. (Prof Shomir Wilson@Penn State University)\u00a0Guide for Citations and References\u00a0[Suggestions]
    20. (Carmine Gallo, a bestselling author)\u00a0The Storytellers Secret\u00a0(2016). [Video]Takeaways: Writing the Introduction section and giving talks can also be like telling a Hollywood story: the setting (what problem we are solving; how important it is), the villian (how difficult this problem is; how previous work cannot solve it well), and the superhero (what we propose). For giving talks, starting with personal stories (e.g., a story of grandma telling the kid not to drink and persist the right thing leading to the person's life pursuit on social justice) is very helpful to get the audience involved.
    21. (Maxwell Forbes@UW)\u00a0Figure Creation Tutorial: Making a Figure 1\u00a0(2021). [Suggestions]
    22. UI design as a medium of thought: see Michael Nielsen's\u00a0explanation of why UI is important for science,\u00a0Bret Victor's work,\u00a0Miegakure\u00a0that visualizes a 4D environment.
    23. (Prof Jia-Bin Huang@U Maryland)\u00a0How to write math in a paper?\u00a0(2023). [Tweet]

    \u672a\u5b8c\u5f85\u7eed\uff1a

    "},{"location":"Other/nlp_phd/#_13","title":"\u7b2c\u4e09\u9636\u6bb5\uff1a\u5de5\u4e1a\u754c\u7814\u7a76\u8005\u7684\u751f\u6d3b","text":""},{"location":"Other/nlp_phd/#_14","title":"\u7b2c\u56db\u9636\u6bb5\uff1a\u5982\u4f55\u83b7\u5f97\u6559\u804c\uff1f\u5982\u4f55\u505a\u4e00\u4e2a\u597d\u5bfc\u5e08\uff1f","text":""},{"location":"Other/nlp_phd/#nlp","title":"\u7b2c\u4e94\u9636\u6bb5\uff1a\u89c4\u5212NLP\u7684\u7814\u7a76\u751f\u6daf","text":""},{"location":"Other/nlp_phd/#_15","title":"\u4e86\u89e3\u66f4\u591a","text":""},{"location":"Other/nlp_phd/#_16","title":"\u5f15\u7528","text":"
    @misc{resources2021jin,\n  author = {Zhijing Jin},\n  title = {Resources to Help Global Equality for PhDs in NLP},\n  year = {2021},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/zhijing-jin/nlp-phd-global-equality}}\n}\n
    "},{"location":"Other/nlp_resources/","title":"DL & NLP Resources","text":""},{"location":"Other/nlp_resources/#machine-learning-theory","title":"Machine Learning Theory","text":"

    Google\u7684\u4e00\u4e2a\u6559\u7a0b\uff0c\u91cc\u9762\u7684playground\u505a\u5f97\u6bd4\u8f83\u76f4\u89c2\uff0c\u65e0\u9700\u4ee3\u7801

    Machine Learning \u00a0|\u00a0 Google for Developers

    "},{"location":"Other/nlp_resources/#machine-learning-technology","title":"Machine Learning Technology","text":"

    TODO

    "},{"location":"Other/nlp_resources/#deep-learning-theory","title":"Deep Learning Theory","text":"

    TODO

    "},{"location":"Other/nlp_resources/#deep-learning-technology","title":"Deep Learning Technology","text":"

    Pytorch\u6559\u7a0b\uff0c\u53ef\u4ee5\u770b\u7740\u4ee3\u7801\u624b\u6284\u4e00\u4e0b

    Welcome to PyTorch Tutorials \u2014 PyTorch Tutorials 2.0.1+cu117 documentation

    numpy: numpy 100 exercise

    rougier/numpy-100: 100 numpy exercises (with solutions) (github.com)

    Pytorch

    PyTorch\u6df1\u5ea6\u5b66\u4e60\u5feb\u901f\u5165\u95e8\u6559\u7a0b\uff08\u7edd\u5bf9\u901a\u4fd7\u6613\u61c2\uff01\uff09\u3010\u5c0f\u571f\u5806\u3011_\u54d4\u54e9\u54d4\u54e9_bilibili

    Attention-based Models and Transformer

    Let's build GPT: from scratch, in code, spelled out. - YouTube

    "},{"location":"Other/nlp_resources/#natural-language-processing-theory","title":"Natural Language Processing Theory","text":"

    Stanford CS224N: NLP with Deep Learning | Winter 2021 | Lecture 1 - Intro & Word Vectors - YouTube

    "},{"location":"Other/nlp_resources/#natural-language-processing-technology","title":"Natural language processing technology","text":"

    Stanford CS 224N | Natural Language Processing with Deep Learning

    "},{"location":"Other/nlp_resources/#reinforcement-learning","title":"Reinforcement Learning","text":"

    \u8611\u83c7\u4e66EasyRL (datawhalechina.github.io)

    Codes:

    boyu-ai/Hands-on-RL: https://hrl.boyuai.com/ (github.com) datawhalechina/easy-rl: \u5f3a\u5316\u5b66\u4e60\u4e2d\u6587\u6559\u7a0b\uff08\u8611\u83c7\u4e66\uff09\uff0c\u5728\u7ebf\u9605\u8bfb\u5730\u5740\uff1ahttps://datawhalechina.github.io/easy-rl/

    "},{"location":"Other/nlp_resources/#computer-vision","title":"Computer Vision","text":"

    Computer Vision | Universit\u00e4t T\u00fcbingen (uni-tuebingen.de)

    "},{"location":"Other/portfolio/","title":"Portfolio for CMU METALS Application","text":"

    Hi there! \ud83d\udc4b

    This site is a temporary portfolio for CMU METALS application.

    "},{"location":"Other/portfolio/#frontend-works","title":"Frontend Works","text":"Glyph

    Gun violence in US visualization

    "},{"location":"Other/portfolio/#graphic-design","title":"Graphic Design","text":"Calendar Card1 Card2 Card3

    logo

    "},{"location":"Other/tools/","title":"\u6211\u7684\u5de5\u5177\u7bb1\uff01","text":"

    \u8bb0\u5f55\u4e00\u70b9\u597d\u7528\u7684\u5de5\u5177

    "},{"location":"Other/tools/#workflow","title":"\u6211\u7684workflow","text":""},{"location":"Other/tools/#notionobsidian","title":"\u9009\u62e9Notion\u548cObsidian","text":"

    \u5148\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u7ed3\u8bba

    \u4f18\u70b9/\u5de5\u5177 Notion Obsidian \u8bed\u6cd5 \u81ea\u5df1\u7684\u4e00\u5957\u8bed\u6cd5\uff0c\u90e8\u5206\u662fmarkdown \u7eafmarkdown \u4e66\u5199\u901f\u5ea6 \u6162 \u5feb \u6587\u6863\u6574\u9f50\u7a0b\u5ea6 \u9ad8 \u4f4e \u90e8\u7f72\u5230mkdocs\u96be\u6613 \u6613\uff0c\u53ef\u76f4\u63a5\u7528 \u96be\uff0c\u9700\u8c03\u6574\u5f88\u591a\u683c\u5f0f \u5bfc\u51fa\u4e2d\u6587\u652f\u6301\u7a0b\u5ea6 \u53ea\u6709\u4e09\u79cd\u5b57\u4f53\uff0c\u90e8\u5206\u4e2d\u6587\u7f3a\u5b57 \u5b57\u4f53\u591a\uff0c\u652f\u6301\u6bd4\u8f83\u597d

    \u76ee\u524d\u6211\u9009\u62e9\u7684 workflow: \u5b8c\u5168\u629b\u5f03 Ob \u4e86\uff01

    graph TD\n    \u542c\u5199 --> Notion \n    Notion -- \u6709\u65f6\u95f4 --> mkdocs\n
    "},{"location":"Other/tools/#todo-list","title":"TODO list \u7528\u4ec0\u4e48\u505a","text":"

    TODO

    "},{"location":"Other/tools/#_2","title":"\u6587\u732e\u7ba1\u7406\u5de5\u5177","text":"

    TODO

    \u5176\u5b9e\u4ed3\u5e93\u91cc\u672c\u6587\u4ef6\u5939\u4e0b\u7684asset\u91cc\u73b0\u5728\u6709\u4e2a\u600e\u4e48\u914d\u7f6ezotero\u7684ppt\uff0c\u592a\u61d2\u6ca1\u65f6\u95f4\u6574\u8fc7\u6765\uff0c\u53ef\u4ee5\u5148\u53bb\u4ed3\u5e93\u91cc\u627e\u627eorz

    "},{"location":"Other/tools/#_3","title":"\u96f6\u6563\u5de5\u5177","text":""},{"location":"Other/tools/#_4","title":"\u4e8c\u7ef4\u7801\u751f\u6210\u5668","text":"

    \u751f\u6210\u957f\u5f97\u4e0d\u50cf\u4e8c\u7ef4\u7801\u7684\u4e8c\u7ef4\u7801 \u76f4\u63a5\u626b\u4e0b\u9762\u7684\u4e8c\u7ef4\u7801\u53ef\u4ee5\u8fdb\u5165\u7f51\u7ad9

    "},{"location":"Other/tools/#_5","title":"\u5728\u7ebf\u6253\u65f6\u95f4\u8f74\u5de5\u5177","text":"

    https://judes.me/lrc_editor/

    "},{"location":"Other/zju_ling_cs/","title":"ZJU English Major to CS&NLP","text":"

    \u26a0\ufe0f \u611f\u89c9\u5f53\u65f6\u5199\u5f97\u4e0d\u662f\u5f88\u597d\uff0c\u73b0\u5728\u5f88\u591a\u89c2\u5ff5\u53c8\u6709\u4e9b\u6539\u53d8\uff0c\u53ef\u80fd24\u5e74\u6625\u8282\u671f\u95f4\u7a7a\u4e0b\u6765\u4f1a\u518d\u8ba4\u771f\u6539\u4e00\u4e0borz

    "},{"location":"Other/zju_ling_cs/#_1","title":"\u672c\u6587\u6863\u662f\u4ec0\u4e48\uff1f","text":"

    \u7b14\u8005\u8f6c\u4e13\u4e1a\u8e29\u8fc7\u7684\u5751\u548c\u5bf9\u540e\u8f88\u7684\u5efa\u8bae\uff0c\u771f\u5fc3\u60f3\u5efa\u7acb\u8d77ZJU\u5185\u90e8\u826f\u597d\u7684\u4f20\u5e2e\u5e26\u6c1b\u56f4\u3002

    "},{"location":"Other/zju_ling_cs/#_2","title":"\u89c2\u5ff5&\u4e60\u60ef\u95ee\u9898","text":"

    \u5728\u5177\u4f53\u5efa\u8bae\u524d\u9996\u5148\u56de\u7b54\u4e00\u4e9b\u5e38\u6709\u7684\u62c5\u5fe7+\u505a\u4e00\u4e9b\u4e60\u60ef\u65b9\u9762\u7684\u63d0\u9192

    "},{"location":"Other/zju_ling_cs/#cs","title":"\u6211\u80fd\u8f6c\u5230CS\u5417\uff1f","text":"

    \u80fd\u3002\u6709\u5982\u4e0b\u6848\u4f8b\uff08\u4e0d\u4ee3\u8868\u6240\u6709\u4eba\u613f\u610f\u88ab\u8054\u7cfb\u5230\uff0c\u4e0d\u4fdd\u8bc1\u63d0\u4f9b\u8054\u7cfb\u65b9\u5f0f\uff09

    "},{"location":"Other/zju_ling_cs/#nlp","title":"NLP\u4e0d\u8981\u8bed\u8a00\u5b66\u540c\u5b66\u5417\uff1f","text":""},{"location":"Other/zju_ling_cs/#_3","title":"\u660e\u786e\u4e00\u4e2a\u5341\u5e74\u5230\u4e09\u5341\u5e74\u7684\u957f\u8fdc\u89c4\u5212\uff0c\u4e3b\u8981\u662f\u4ee5\u4e0b\u51e0\u4e2a\u95ee\u9898","text":"\u95ee\u9898 \u6211\u7684\u56de\u7b54 \u6211\u8981\u5728\u54ea\u91cc\u751f\u6d3b\uff0c\u56fd\u5185\u8fd8\u662f\u56fd\u5916\uff1f \u6211\u8f6cCS\u662f\u66f4\u591a\u56e0\u4e3a\u559c\u6b22\u7406\u5de5\u79d1\uff0c\u8fd8\u662f\u56e0\u4e3a\u559c\u6b22\u5de5\u8d44\uff1f \u6211\u8981\u8fdb\u5de5\u4e1a\u754c\uff0c\u53bb\u79d1\u6280\u4e92\u8054\u7f51\u516c\u53f8\u5de5\u4f5c\uff1b\u8fd8\u662f\u7559\u5728\u5b66\u672f\u754c\uff0c\u5728\u9ad8\u6821\u6216\u7814\u7a76\u6240\u5de5\u4f5c\uff1f \u6211\u8981\u505aCS\u9664NLP\u5176\u5b83\u7684\u65b9\u5411\uff0c\u5982\u7cfb\u7edf\u3001\u7f51\u7edc\u3001\u5b89\u5168\u3001CV\u6216\u7eaf\u6df1\u5ea6\u5b66\u4e60\u7406\u8bba\u65b9\u5411\uff1b\u8fd8\u662f\u505a\u504f\u6df1\u5ea6\u5b66\u4e60\u7684NLP\u65b9\u5411\uff1b\u8fd8\u662f\u505a\u504f\u8bed\u8a00\u5b66\u7684NLP\u65b9\u5411\uff1f \u6211\u6709\u591a\u5c11\u7ecf\u8d39\uff1f \u6211\u591a\u5c11\u5e74\u5185\u9700\u8981\u8f6c\u597d\u4e13\u4e1a\uff1f"},{"location":"Other/zju_ling_cs/#_4","title":"\u89c4\u5212\u4eba\u751f\u4e2d\u8be5\u505a/\u4e0d\u8be5\u505a\u7684\u4e8b\u7684\u4e24\u4e2a\u51c6\u5219","text":""},{"location":"Other/zju_ling_cs/#cs_1","title":"\u628a\u81ea\u5df1\u770b\u6210CS\u4eba","text":""},{"location":"Other/zju_ling_cs/#cs_2","title":"CS\u6709\u8001\u5e08\u540c\u5b66\u770b\u4e0d\u8d77\u6211\u600e\u4e48\u529e\uff1f","text":""},{"location":"Other/zju_ling_cs/#cs_3","title":"\u5b66\u4e0d\u597dCS\uff0c\u662f\u4e0d\u662f\u56e0\u4e3a\u5b66\u82f1\u8bed\u8bfe\u4f7f\u6211\u53d8\u4e0d\u806a\u660e\u4e86\uff1f","text":"

    \u4e0d\u662f\u7684\u3002 - \u7406\u8bba\u4e0a\u662f\u5b8c\u5168\u53ef\u4ee5\u5b66\u597d\u7684\u3002NLP\u5708\u6709\u5f88\u591a\u7814\u7a76\u8005\u8bfb\u8fc7\u8bed\u8a00\u5b66\u548cCS\u53cc\u672c\u79d1\uff0c\u4ee3\u8868AP\u6709AllenNLP Noah Smitch, Colimbia University Zhou Yu\uff08ZJU\u7684\u672c\u79d1\uff09. \u8bfb\u8bed\u8a00\u5b66\u6ca1\u6709\u803d\u8bef\u4ed6\u4eec\u7684\u8111\u5b50\uff0c\u53cd\u800c\u662f\u4e00\u4e2a\u5f88\u597d\u7684idea\u6765\u6e90\u3002\u6211\u611f\u89c9\u6709\u5f88\u591a\u5929\u624d\u7684\u6848\u4f8b\u53ef\u4ee5\u8bc1\u660e\u4eba\u7684\u77e5\u8bc6\u5bb9\u91cf\u548c\u5b66\u4e60\u80fd\u529b\u4e0a\u9650\u662f\u8d85\u51fa\u5927\u5bb6\u60f3\u8c61\u7684\uff0c\u5b66\u4e24\u4e2a\u4e13\u4e1a\u8fd9\u4ef6\u5c0f\u4e8b\u8fdc\u8fdc\u5728\u8fd9\u4e2a\u4e0a\u9650\u4e4b\u4e0b\u3002\u6211\u6c38\u8fdc\u8ba4\u4e3a\u6bc5\u529b\u548c\uff08\u5bf9\u81ea\u5df1\u4eba\u751f\u4e0a\u9650\u7684\uff09\u60f3\u8c61\u529b\u6bd4\u5f53\u524d\u80fd\u529b\u66f4\u6709\u51b3\u5b9a\u4f5c\u7528\u3002 - \u5b9e\u9645\u82f1\u8bed\u4e13\u4e1a\u53bbCS\u53cc\u4e13\u4e1a\u5bb9\u6613\u5403\u4f4e\u7ee9\u70b9\u7684\u539f\u56e0\uff0c\u5f80\u5f80\u4e0d\u662f\u80fd\u529b\u667a\u529b\u4e0d\u8db3\uff0c\u800c\u662f\u6709\u4fe1\u606f\u5dee\uff1a\u751f\u6d3b\u5728\u6587\u79d1\u7684\u6563\u6f2b\u73af\u5883\u4e2d\u96be\u4ee5\u77e5\u9053\u5927\u90e8\u5206\u540c\u5b66\u7684\u81ea\u5b66\u8fdb\u5ea6\uff0c\u548c\u5982\u679c\u67d0\u4e9b\u8bfe\u7a0b\u6709\u5b9e\u8df5\u4e0a\u7684\u5751\uff0c\u6ca1\u6709\u4e0e\u5927\u90e8\u961f\u4e00\u8d77\u5b66\u4e60\u7684\u540c\u5b66\u5c31\u96be\u4ee5\u77e5\u9053\u600e\u6837\u7075\u6d3b\u5e94\u5bf9\u3002\u6240\u4ee5\u5efa\u8bae\u4e0e\u540c\u5b66\u4e00\u8d77\u5b66\u4e60\uff0c\u53c2\u89c1\u4e0b\u4e00\u6761\u3002

    "},{"location":"Other/zju_ling_cs/#cscs","title":"\u8981\u62e5\u6709\u4e00\u4e2a\u6216\u51e0\u4e2a\u540c\u6837\u8de8\u4e13\u4e1a\u5b66CS\u7684\u670b\u53cb\uff0c\u6216\u76f4\u63a5\u878d\u5165\u540c\u4e00\u7ea7\u7684CS\u672c\u79d1\u751f\u5708\u5b50\u91cc\u3002\u5982\u679c\u5b9e\u5728\u6ca1\u6709\uff0c\u4e00\u4e9b\u5176\u5b83\u5de5\u79d1\u7684\u540c\u5b66\u4e5f\u53ef\u4ee5\u3002","text":"

    \u540c\u5b66\u7684\u7528\u5904\u6709\uff1a - \u5e2e\u52a9\u4f60\u8ddf\u4e0a\u5b66\u4e60\u8282\u594f\u3002CS\u7684\u751f\u6d3b\u8282\u594f\u662f\u82f1\u8bed\u4e13\u4e1a\u76842\u500d\uff0c\u662f\u7406\u79d1\u4e13\u4e1a\u76841.5\u500d\uff0c\u5982\u679c\u51b3\u5b9a\u8f6c\u4e13\u4e1a\u662f\u9700\u8981\u4e3b\u52a8\u63d0\u9ad8\u4e00\u4e0b\u751f\u6d3b\u8282\u594f\u7684\uff0c\u505a\u4e8b\u79ef\u6781\u4e00\u70b9\uff0c\u544a\u522b\u62d6\u5ef6\u3002 - \u4e92\u76f8\u63a8\u8350\u597d\u7684\u81ea\u5b66\u8d44\u6599\uff0c\u4e92\u76f8\u5206\u4eab\u7b14\u8bb0\u548c\u8ba8\u8bba\u9898\u76ee\uff0c\u5206\u5de5\u6574\u7406\u671f\u672b\u590d\u4e60\u8d44\u6599\uff0c\u671f\u672b\u4e92\u76f8\u63d0\u95ee\uff0c\u5f62\u6210\u81ea\u5b66\u6c1b\u56f4\uff0c\u8282\u7701\u4e00\u4e9b\u8e29\u5751\u65f6\u95f4\u3002 - \u5982\u679c\u67d0\u4e9b\u8bfe\u7a0b\u5b89\u6392\u6709\u6559\u5b66\u4e8b\u6545\uff0c\u4f60\u53ef\u4ee5\u53ca\u65f6\u77e5\u9053\u5927\u90e8\u5206\u540c\u5b66\u662f\u600e\u6837\u5e94\u5bf9\u7684\uff0c\u53ca\u65f6\u8c03\u6574\u81ea\u5df1\u7684\u5e94\u5bf9\u63aa\u65bd\uff0c\u9632\u6b62\u5982\u679c\u6210\u7ee9\u5360\u6bd4\u7a81\u7136\u8c03\u6574\uff0c\u81ea\u5df1\u5c06\u52aa\u529b\u82b1\u5728\u4e86\u6700\u540e\u5360\u6210\u7ee9\u6bd4\u91cd\u5f88\u5c0f\u7684\u5730\u65b9\u3002

    "},{"location":"Other/zju_ling_cs/#_5","title":"\u8981\u591a\u8bb0\u7b14\u8bb0","text":"

    \u8bb0\u7b14\u8bb0\u662f\u8d39\u66fc\u5b66\u4e60\u6cd5\u7684\u6295\u5165\u4ea7\u51fa\u6bd4\u6700\u9ad8\u7684\u5b9e\u8df5\u5f62\u5f0f\uff0c\u5373\u65e2\u5e2e\u52a9\u68c0\u67e5\u7406\u89e3\uff0c\u7b14\u8bb0\u53c8\u9020\u798f\u540e\u4eba\u3002\u4f60\u53ef\u4ee5\u79c9\u627f\u5f00\u6e90\u7cbe\u795e\uff0c\u50cf\u524d\u8f88\u4e00\u6837\u591a\u5c06\u7b14\u8bb0\u516c\u5e03\u9020\u798f\u540e\u4eba\uff08\u4e0d\u8fc7\u8bf7\u9075\u5b88\u8bda\u4fe1\u5b88\u5219\uff09\u3002\u975e\u5e38\u5e0c\u671bZJU\u80fd\u9010\u6e10\u5f62\u6210\u8f83\u597d\u7684\u4f20\u5e2e\u5e26\u6c1b\u56f4\uff0c\u8ba9\u540e\u8f88\u4e5f\u6709\u826f\u597d\u6821\u53cb\u8d44\u6e90\u53ef\u4eab\u7528\u3002

    "},{"location":"Other/zju_ling_cs/#_6","title":"\u6211\u53ef\u4ee5\u4ee5\u600e\u6837\u7684\u8eab\u4efd\u672c\u79d1\u6bd5\u4e1a\uff1f\u6211\u6709\u54ea\u4e9b\u53ef\u884c\u7684\u51fa\u8def\uff1f","text":"

    \u4ee5\u4e0b\u8fd9\u4e9b\u90fd\u662f\u53ef\u80fd\u505a\u5230\u7684\uff0c\u6211\u4e5f\u5206\u522b\u5217\u51fa\u4e86\u6211\u8ba4\u4e3a\u9700\u8981\u51c6\u5907\u7684\u80cc\u666f\u3002 - \u51fa\u56fdms\uff1a\u7ee9\u70b9\uff0c\u6691\u7814/\u5b9e\u4e60 - \u51fa\u56fd\u76f4\u63a5phd\uff1a\u6691\u7814\uff0cpaper - \u672c\u6821\u76f4\u535a\uff1a\u7ee9\u70b9\uff0c\u8fdb\u672c\u6821\u7ec4\uff0c\u590f\u4ee4\u8425\uff0cpaper - \u8de8\u6821\u76f4\u535a\uff1a\u7ee9\u70b9\uff0c\u5bf9\u65b9\u6821\u590f\u4ee4\u8425\uff0cpaper - \u5de5\u4f5c\uff1a\u5237\u9898\uff0c\u5b9e\u4e60 \u5176\u4e2d\u6211\u8ba4\u4e3a\u503c\u5f97\u6ce8\u610f\u7684\u8fd8\u6709\uff0c\u5177\u4f53\u6700\u597d\u7531\u8bfb\u8005\u518d\u54a8\u8be2\u76f8\u5e94\u8eab\u4efd\u7684\u4eba\u7684\u5efa\u8bae\u3002\u672c\u6761\u9002\u7528\u524d\u9762\u6240\u8ff0\u201c20\u4e2a\u4eba\u5efa\u8bae\u201d\u51c6\u5219\u3002

    "},{"location":"Other/zju_ling_cs/#_7","title":"\u8bfe\u7a0b","text":""},{"location":"Other/zju_ling_cs/#cs_4","title":"CS\u5fc5\u4fee\u8bfe","text":"

    \u9996\u5148\u8981\u660e\u786e\u4e00\u4e2a\u8ba4\u77e5\u95ee\u9898\uff1a\u8bfbCS\u53cc\u5b66\u4f4d\u662f\u4e00\u4e2a\u539f\u5b50\u6027\u7684\u4e8b\u52a1\uff0c\u8981\u4e48\u4e0d\u8bfb\uff0c\u8981\u4e48\u6309\u9700\u6c42\u8bfb\u5b8c\u6216\u8f85\u4fee\u6216\u53cc\u5b66\u4f4d\uff0c\u8fd9\u4e24\u79cd\u9009\u62e9\u90fd\u662f\u6295\u5165\u4ea7\u51fa\u6bd4\u8f83\u9ad8\u7684\uff1b\u6295\u5165\u4ea7\u51fa\u6bd4\u6700\u4f4e\u7684\u662f\u8bfb\u4e00\u534a\uff08\u5fae\u8f85\u4fee\u6216\u53cc\u4e13\u4e1a\uff09\u3002 \u8be5\u56fe\u4e2d\u9664\u6570\u7406\u57fa\u7840\u6a21\u5757\u4e0d\u662f\u53cc\u5b66\u4f4d\u5fc5\u4fee\uff0c\u5176\u5b83\u662f\u5fc5\u4fee\u3002 \uff08\u8fd9\u4e2a\u56fe\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u6709\u4e2a\u7ea2\u5708\uff0c\u627e\u4e0d\u5230\u539f\u56fe\u4e86\uff0c\u6279\u8bc4cyh\u540c\u5b66\u4e71\u753b\uff09

    \u9009\u4e0d\u4e0aCS\u7684\u8bfe\u600e\u4e48\u529e\uff1f - \u6700\u6709\u6548\uff1a\u8865\u9009+\u5728\u8865\u9009\u7684\u51e0\u5929\u91cc\u7ebf\u4e0b\u53bb\u9009\u8bfe\u529e\u6216\u7ed9\u9009\u8bfe\u529e\u53d1\u90ae\u4ef6\u3002\u674e\u6653\u8001\u5e08\u548c\u5f20\u4f20\u534e\u8001\u5e08\u90fd\u5f88nice\uff0c\u8868\u793a\u81ea\u5df1\u5f88\u60f3\u9009\u8bfe\uff0c\u8ddf\u8001\u5e08\u8bf4\u660e\u539f\u56e0\u3002 - \u7b2c\u4e8c\u6709\u6548\uff1a\u5982\u679c\u4efb\u8bfe\u8001\u5e08\u5728\u8ba1\u9662\u8bdd\u8bed\u6743\u8f83\u5927\uff0c\u8bf7\u4efb\u8bfe\u8001\u5e08\u5e2e\u5fd9\u8ddf\u9009\u8bfe\u529e\u8bf4\uff0c\u80fd\u4fdd\u8bc1\u4f60\u9009\u4e0a\u8be5\u8001\u5e08\u7684\u8bfe\u3002 - \u7b2c\u4e09\u6709\u6548\uff1a\u9009\u8bfe\u65f6\u4e0eCS\u7684\u540c\u5b66\u5546\u91cf\uff0c\u505a\u51fa\u65f6\u95f4\u6b63\u597d\u7684\u4e00\u4e9b\u8bfe\u8868\u3002\u53ef\u80fd\u6d89\u53ca\u5230\u201c\u7528\u4e00\u4e9b\u8bfe\u5835\u4f4f\u53e6\u4e00\u4e9b\u8bfe\u201d\u8fd9\u79cd\u590d\u6742\u64cd\u4f5c\uff0c\u6240\u4ee5\u5408\u4f5c\u6bd4\u8f83\u5212\u7b97\u3002

    \u600e\u4e48\u5b66\uff1f - ZJU\u8bfe\u7a0b\u5171\u4eab\u8ba1\u5212 https://github.com/QSCTech/zju-icicles - \u56fe\u7075\u73ed\u8bfe\u7a0b\u901f\u901a\u8ba1\u5212 https://github.com/ZJU-Turing/TuringCourses - \u4e00\u4f4d\u5b66\u957f\u7684\u4f18\u8d28\u7b14\u8bb0 \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4\uff01 - \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4 (xuan-insr.github.io) - \u4e00\u4f4d\u5b66\u957f\u7684\u4f18\u8d28\u7b14\u8bb0 https://github.com/Zhang-Each/CourseNoteOfZJUSE

    "},{"location":"Other/zju_ling_cs/#ai","title":"AI","text":"

    AI\u8bfe\u4e00\u822c\u6bd4CS\u8bfe\u597d\u9009\uff0c\u4f46\u662f\u5982\u679c\u9009\u4e0d\u4e0a\u4e5f\u8bf7\u9075\u7167\u4e0a\u6761\u4e2d\u7684\u5efa\u8bae\u3002 \u975e\u5fc5\u8981\u4e0d\u9009AI\u8bfe\uff0cAI\u8bfe\u6700\u5927\u7684\u6536\u83b7\u662f\u5728\u7b80\u5386\u4e0a\u4f5c\u4e3a\u4e00\u4e2a90+\u8bfe\u7a0b\u51fa\u73b0\uff0c\u57fa\u672c\u5b66\u4e0d\u5230\u4e1c\u897f\uff08\u9664\u4e86NLP\u8bfe\u6211\u611f\u89c9\u542c\u8bfe\u6536\u83b7\u633a\u5927\u7684\uff09\uff0c\u4e3b\u8981\u9760\u81ea\u5b66\u540e\u5377\u51fa\u5927\u4f5c\u4e1a\u3002

    "},{"location":"Other/zju_ling_cs/#_8","title":"\u8bed\u8a00\u5b66","text":"

    \u56e0\u4e3a\u82f1\u4e13\u57f9\u517b\u65b9\u6848\u8fd8\u662f\u8981\u6c42\u4fee\u5927\u91cf\u4e13\u4e1a\u8bfe\u7684\uff0c\u611f\u89c9\u53ef\u4ee5\u5c3d\u91cf\u628a\u8bed\u8a00\u5b66\u6a21\u5757\u591a\u4fee\u4e00\u70b9\uff0c\u6709\u4e9b\u5728\u8fdb\u7ec4\u7684\u65f6\u5019\u53ef\u80fd\u8fd8\u662f\u8ba4\u53ef\u7684\u3002 \u4ee5\u4e0b\u8bfe\u7a0b\u5982\u679c\u62ff\u4e86\u9ad8\u5206\u503c\u5f97\u5728\u7b80\u5386\u4e0a\u4e00\u63d0 - \u5f53\u4ee3\u8bed\u8a00\u5b66 - \u8bed\u97f3\u5b66 - \u53e5\u6cd5\u5b66 - \u5fc3\u7406\u8bed\u8a00\u5b66 - \u8bed\u4e49\u5b66 - \u8bed\u7528\u5b66 - \u8bed\u6599\u5e93\u8bed\u8a00\u5b66

    "},{"location":"Other/zju_ling_cs/#_9","title":"\u6570\u5b66","text":"

    \u5bf9\u4e8ePhD\u3001\u627e\u5de5\u548c\u56fd\u5185\u76f4\u535a\uff1a \u53ef\u80fd\u4e0d\u9700\u8981\u6570\u5b66\u3002\u3002\u3002\u8ba4\u4e3a\u6700\u597d\u4e0d\u8981\u989d\u5916\u9009\u6570\u5b66\u8bfe \u6211\u81f3\u4eca\u9047\u5230\u7684\u8001\u5e08\u6ca1\u6709\u56e0\u4e3a\u6211\u7b80\u5386\u4e0a\u4efb\u4f55\u6570\u5b66\u76f8\u5173\u7684\u4e1c\u897f\u800c\u5f55\u6211\u6216\u62d2\u6211\u7684\uff0c\u90fd\u662f\u53ea\u95ee\u7f16\u7a0b\u3002 CS\u4e13\u4e1a\u8bfe\u91cc\u7684\u79bb\u6563\u6570\u5b66\u548c\u8ba1\u7b97\u7406\u8bba\uff08\u548c\u53ef\u80fd\u8fd8\u6709\u6570\u903b\uff09\u5df2\u7ecf\u8db3\u591f\u57f9\u517b\u6570\u5b66\u601d\u7ef4\u3002 \u5982\u679c\u62c5\u5fc3\u6570\u636e\u5206\u6790\u548c\u7edf\u8ba1\u6280\u80fd\uff0c\u6587\u6570\u91cc\u636e\u8bf4\u5e94\u7528\u7edf\u8ba1\u5b66\u8fd9\u95e8\u8bfe\u7a0b\u6bd4\u9ad8\u7b49\u6570\u5b66\u597d\u4f7f\uff0c\u8fd8\u6709\u673a\u4f1a\u7684\u540c\u5b66\u53ef\u4ee5\u8bd5\u4e00\u4e0b\u3002

    \u5bf9\u4e8ems\uff1a \u786e\u5b9e\u6709\u4e00\u4e9b\u9879\u76ee\u8981\u6c42\u4fee\u8fc7\u4e00\u4e9b\u6570\u5b66\u8bfe\u7a0b\uff0c\u4f8b\u5982\u521a\u770b\u5230SUTD\u7684ISTD ms\u8981\u6c42\u4e24\u5b66\u671f\u5fae\u79ef\u5206\uff0c\u4e00\u5b66\u671f\u7ebf\u4ee3\u548c\u4e00\u5b66\u671f\u6982\u7edf\uff0c\u8fd9\u79cd\u65e0\u7591\u662f\u6bd4\u8f83\u4e0d\u53cb\u597d\u7684\u9879\u76ee\u4e86\u3002 \u4e5f\u6709\u6bd4\u8f83\u53cb\u597d\u7684\u9879\u76ee\uff0c\u5317\u7f8e\u4e00\u4e9b0\u57fa\u7840\u8f6c\u7801\u9879\u76ee\u53ef\u53c2\u7167OpenCSapp\uff0c\u82f1\u56fd\u7684IC\u548cUCL\u5728\u524d\u5e74\u4e5f\u5f00\u4e86\u96f6\u57fa\u7840\u8f6c\u7801\u9879\u76ee\uff0c\u4e0d\u8fc7\u51fa\u8def\u548c\u542b\u91d1\u91cf\u9700\u8981\u81ea\u5df1\u8861\u91cf\uff0c\u8fd8\u662f\u5efa\u8bae\u201c\u54a8\u8be220\u4e2a\u4eba\u201d\u51c6\u5219\u3002\u4ee3\u8868dp\u662f18\u7ea7SJTU\u82f1\u8bed\u4e13\u4e1a\uff0c4\u6bb5\u79d1\u7814\u6216\u4e92\u8054\u7f51\u5382NLP\u4ea7\u54c1\u5b9e\u4e60\uff0c\u5c11\u91cf\u9ad8\u5206\u6570\u5b66\u548c\u7f16\u7a0b\u8bfe\u7a0b\uff0c\u7ee9\u70b990+ \u2192 IC CS ms

    "},{"location":"Other/zju_ling_cs/#_10","title":"\u7ee9\u70b9","text":""},{"location":"Other/zju_ling_cs/#_11","title":"\u79d1\u7814","text":""},{"location":"Other/zju_ling_cs/#nlp_1","title":"\u5982\u4f55\u9009\u9898\uff1fNLP\u6709\u54ea\u4e9b\u65b9\u5411\u53ef\u505a\uff1f","text":"

    \u53c2\u7167\u8fd9\u4e9b\u9876\u4f1a\u90fd\u6709\u4ec0\u4e48track\uff0c\u4e0b\u9762\u662f\u6700\u8fd1\u4e00\u671f\u6bcf\u4e2atrack\u7684best paper - Best Papers - ACL 2023 (aclweb.org) - Best Paper Awards - emnlp 2022 (balhafni.github.io) - Transactions of the Association for Computational Linguistics (transacl.org) - Announcing the NAACL 2022 Best Paper Awards! - NAACL-HLT 2022

    \u7279\u522b\u5730\uff0c\u60f3\u5230NLP\u91cc\u6bd4\u8f83\u7eaf\u8bed\u8a00\u5b66\u7684\u4e3b\u9898/\u65b9\u6cd5\u4e5f\u6709\u4e00\u4e9b\uff0c\u6709\u5982\u4e0b\u51e0\u4e2a \u4e3a\u4ec0\u4e48\u8981\u8bb2\u8fd9\u4e00\u5757\u56e0\u4e3a\u62c5\u5fc3\u4f60\u5728\u9762\u8bd5\u7684\u65f6\u5019\u4f1a\u9700\u8981\u5411\u8001\u5e08\u8bc1\u660e\u4f60\u7684\u53e6\u4e00\u90e8\u5206\u4e13\u4e1a\u77e5\u8bc6\u4e5f\u662f\u6709\u7528\u7684 \u4e00\u822c\u6b27\u6d32\u7684NLP\u4f1a\u504f\u8bed\u8a00\u5b66\u4e00\u70b9 - \u5b9e\u9a8c\u8bed\u97f3\u548c\u97f3\u7cfb\u5b66 - \u7528\u8bed\u8a00\u5b66\u77e5\u8bc6\u505a\u6570\u636e\u548c\u6570\u636e\u589e\u5f3a - AI\u4e2d\u7684\u4f26\u7406\u9053\u5fb7\u95ee\u9898 - \u7a00\u6709\u8bed\u8a00\u6316\u6398

    "},{"location":"Other/zju_ling_cs/#_12","title":"\u5982\u4f55\u9009\u5bfc\uff1f","text":"

    \u56fd\u5916\u5bfc\u5e08\uff1a\u5e38\u8bfb\u6bcf\u5e74\u7684\u9876\u4f1a\u6709\u610f\u601d\u8bba\u6587\uff0c\u5e76\u53c2\u7167CSRankings: Computer Science Rankings\uff0c\u5173\u6ce8\u5b66\u672f\u5708\u517b\u597d\u53f7\u540e\u5e38\u5237Twitter \u56fd\u5185\u6821\u5185\u5bfc\u5e08\uff1a\u5982\u679c\u6709\u60f3\u8be2\u95ee\u7684\u5bfc\u5e08\u540d\u5355\u53ef\u4ee5\u90ae\u4ef6\u95ee\u6211 \u9009\u5bfc\u6216\u8005\u8054\u7cfbPhD\u7684\u65f6\u5019\u5982\u679c\u63a5\u5230\u7684\u4efb\u52a1\u662f\u4e8c\u4f5c\u4e09\u4f5c\u5f80\u540e\uff0c\u5f88\u53ef\u80fd\u662f\u6253\u767d\u5de5\uff0c\u57fa\u672c\u53ef\u4ee5\u62d2\u7edd\u3002\u9664\u975e\u4f60\u8ba4\u4e3a\u4f60\u627f\u62c5\u7684\u5de5\u4f5c\u8f83\u4e3a\u91cd\u8981\uff0c\u8001\u5e08\u53ef\u4ee5\u7ed9\u4f60\u63a8\u8350\u4fe1\uff0c\u4e8c\u4f5c\u4e09\u4f5c\u7684\u4f5c\u7528\u53ef\u80fd\u6ca1\u6709\u63a8\u8350\u4fe1\u5927\u3002 \u5982\u679c\u7533\u8bf7PhD\uff0c\u63a8\u8350\u4fe1\u7684\u529b\u5ea6\uff1a\u4f60\u4e0e\u63a8\u8350\u4eba\u7684\u4ea7\u51fa\u5f88\u91cd\u8981+\u76ee\u6807PhD\u5bfc\u8ba4\u8bc6\u7684\u4eba > \u4f60\u4e0e\u63a8\u8350\u4eba\u7684\u4ea7\u51fa\u5f88\u91cd\u8981+\u76ee\u6807PhD\u5bfc\u4e0d\u8ba4\u8bc6\u7684\u4eba > \u5176\u5b83

    "},{"location":"Other/zju_ling_cs/#_13","title":"\u7533\u8bf7","text":"

    \u56e0\u4e3a\u4fdd\u7814\u548c\u627e\u5de5\u6211\u786e\u5b9e\u4e0d\u61c2\uff0c\u8fd9\u91cc\u6682\u65f6\u53ea\u5199\u7533\u8bf7\u4e86\u3002\u540e\u7eed\u6709\u8bf7\u5171\u540c\u4f5c\u8005\u6269\u5c55\u5185\u5bb9\u7684\u8ba1\u5212\uff0c\u5982\u613f\u610f\u8d21\u732e\u8bf7\u8054\u7cfb\u6211\u3002

    "},{"location":"Other/zju_ling_cs/#check-point","title":"Check Point","text":"

    \u5927\u4e00\u6691\u5047\u7ed3\u675f\u65f6\uff1a\u4e13\u5fc3\u5b66\u4e13\u4e1a\u8bfe \u5927\u4e8c\u6691\u5047\u7ed3\u675f\u65f6\uff1a\u8fdb\u7ec4\uff0c\u5b66\u4f1apytorch\uff0c\u8bad\u8fc7\u4e00\u4e9b\u5e38\u7528\u7684\u6a21\u578b \u5927\u4e09\u6691\u5047\u7ed3\u675f\u65f6\uff1a\u4ea7\u51fa\u4e00\u4f5c\u6216\u5171\u4e00\u8bba\u6587

    "},{"location":"Other/zju_ling_cs/#_14","title":"\u6211\u8981\u4e0d\u8981\u627e\u4e2d\u4ecb\uff1f","text":"

    \u4e0d\u8981\u3002 \u539f\u56e0\u4e00\uff1aCS\u7684\u5728\u7ebf\u514d\u8d39\u8d44\u6599\u8db3\u591f\u4f7f\u7528 \u539f\u56e0\u4e8c\uff1a\u4e2d\u4ecb\u7684\u4fe1\u606f\u66f4\u65b0\u901f\u5ea6\u8d76\u4e0d\u4e0aCS\u5b66\u79d1\u7684\u53d1\u5c55\u901f\u5ea6

    "},{"location":"Other/zju_ling_cs/#_15","title":"\u6211\u7533\u8bf7\u53ef\u4ee5\u53c2\u8003\u54ea\u4e9b\u8d44\u6599\uff1f","text":"

    \u7533\u8bf7MS - \u5317\u7f8e\u7684CS master Home - Open CS Application - \u9664\u5317\u7f8e\u5916\u7684\u5176\u5b83CS master Global CS (global-cs-application.github.io) - \u4e00\u4ea9\u4e09\u5206\u5730/\u5bc4\u6258\u5bb6\u56ed\u7b49\u8bba\u575b - CC98\u4e0a\u6bcf\u4e00\u5e74CS\u7684\u98de\u8dc3\u624b\u518c

    \u7533\u8bf7PhD - \u6b27\u7f8eNLP\u5708\u5bf9PhD\u7533\u8bf7\u7684\u5efa\u8bae https://github.com/zhijing-jin/nlp-phd-global-equality - \u4e86\u89e3\u5b66\u79d1\u4f18\u52bf\u5b66\u6821\u548c\u5bfc\u5e08 CSRankings: Computer Science Rankings - \u6ce8\u518c\u4e00\u4e2aTwitter\u8d26\u53f7\uff0c\u5f00\u59cb\u5173\u6ce8NLP\u5708\u7684PhD\u548cAP\uff0c\u5404\u79cd\u7533\u8bf7\u673a\u4f1a\u4ed6\u4eec\u90fd\u4f1a\u5c3d\u5feb\u53d1\u5e03\u7684\u3002\u6bd4\u5982\u4f60\u53ef\u4ee5\u5148\u4eceAndrew Ng\u3001Christopher Manning\u3001Geoffrey Hinton\u8fd9\u79cd\u8001\u6559\u6388\u5173\u6ce8\u8d77\uff0c\u7136\u540e\u5173\u6ce8\u4ed6\u4eec\u7684\u5173\u6ce8\u8fd9\u6837\u6765\u641e\u3002 - \u5173\u6ce8\u4e00\u4ea9\u4e09\u5206\u5730/CC98/\u4e00\u4e9b\u5fae\u4fe1\u516c\u4f17\u53f7/\u77e5\u4e4e\u7684\u62db\u751f\u4fe1\u606f

    "},{"location":"Other/zju_ling_cs/#_16","title":"\u6295\u9012\u6691\u7814\u6ce8\u610f\u4e8b\u9879","text":"

    \u6d41\u7a0b\u540c\u7533\u8bf7PhD \u5df2\u7ecf\u719f\u8bc6\u7684\u5bfc\u5e08\u63a8\u8350\u662f\u6700\u5feb\u7684\uff1b\u5426\u5219\u5c31\u81ea\u5df1\u6d77\u6295\uff0c\u6295\u53d1\u5e03\u8fc7\u62db\u751f\u5e7f\u544a\u6216\u4e3b\u9875\u8868\u660e\u6b63\u5728\u62db\u751f\u7684\u8001\u5e08\u662f\u6700\u5feb\u7684\u3002\u6709\u7684\u65f6\u5019\u53ef\u4ee5\u5c1d\u8bd5\u6295\u8ba4\u8bc6\u7684PhD\uff0c\u56e0\u4e3a\u6691\u7814\u671f\u95f4\u5927\u90e8\u5206\u60c5\u51b5\u8fd8\u662f\u8ddf\u7740PhD\u6253\u5de5\u3002 \u5982\u679c\u8001\u5e08\u7ed9\u4f60\u7684\u8d23\u4efb\u6bd4\u8f83\u91cd\uff0c\u4e14\u4f60\u6709\u6bd4\u8f83\u597d\u7684\u5de5\u4f5c\u73af\u5883\uff0c\u6211\u8ba4\u4e3a\u7ebf\u4e0a\u7ebf\u4e0b\u533a\u522b\u4e0d\u5927\u3002 \u60f3\u53bb\u5317\u7f8e\u5c31\u5957\u5317\u7f8e\uff0c\u6211\u89c9\u5f97\u6700\u597d\u4e0d\u8981\u627e\u8df3\u677f\uff0c\u6709\u5317\u7f8e\u7684\u7ebf\u4e0a\u6691\u7814\u4e5f\u5f88\u597d\uff0c\u53ea\u8981\u662f\u4f60\u4e00\u4f5c\uff0c\u65f6\u957f6\u4e2a\u6708\u4ee5\u4e0a\uff0c\u6bcf\u5468\u6c47\u62a5\u8fdb\u5ea6\u3002

    "},{"location":"Other/zju_ling_cs/#_17","title":"\u6295\u9012\u5b9e\u4e60\u6ce8\u610f\u4e8b\u9879","text":"

    \u9700\u8981\u5b9e\u4e60 iff \u4f60\u6253\u7b97\u627e\u5de5or\u8bfb\u5b8c\u7855\u58eb\u627e\u5de5\uff0c\u7533\u8bf7\u5b66\u672f\u7c7bms\u548cPhD\u7684\u8bdd\uff0c\u5b9e\u4e60\u4e0d\u5f3a\u6c42\u3002

    "},{"location":"Other/zju_ling_cs/#-xuan-insrgithubio","title":"- \ud83c\udff3\ufe0f\u200d\ud83c\udf08 \u603b\u89c8 - \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4 (xuan-insr.github.io) \u627e\u6691\u671f\u5b9e\u4e60\u548c\u79cb\u62db\u7684\u7ecf\u9a8c\u5e16","text":"

    http://www-cc98-org-s.webvpn.zju.edu.cn:8001/topic/4950730

    "},{"location":"Other/zju_ling_cs/#_18","title":"\u5173\u4e8e\u7b14\u8005&\u8054\u7cfb\u7b14\u8005","text":"

    \u7b14\u8005\u4f30\u8ba1\u662f\u4ece\u82f1\u8bed\u4e13\u4e1a\u8f6cNLP\u89c4\u5212\u6700\u4e0d\u987a\u3001\u8fdb\u5ea6\u6700\u66f2\u6298\u7684\u4e00\u4e2a\u3002\u8fd9\u4efd\u6587\u6863\u4e0d\u662f\u4ec0\u4e48\u6210\u529f\u7ecf\u9a8c\u5206\u4eab\uff0c\u6211\u5e76\u4e0d\u6210\u529f\uff0c\u53ea\u662f\u60f3\u628a\u6211\u8e29\u8fc7\u7684\u5751\u544a\u8bc9\u540e\u4eba\uff0c\u5e0c\u671b\u5c11\u6709\u4eba\u91cd\u8e48\u6211\u7684\u8986\u8f99\u3002\u6211\u89c9\u5f97\u6211\u7684\u9ad8\u4e2d\u548c\u672c\u79d1\u8fc7\u5f97\u592a\u574e\u5777\u4e86\uff0c\u771f\u8bda\u5730\u60f3\u5e2e\u52a9\u5b66\u5f1f\u5b66\u59b9\uff0c\u5e0c\u671b\u4f60\u4eec\u4e00\u5207\u987a\u5229\u3002\u8bfb\u8005\u53ef\u4ee5\u4ee5\u6211\u4f5c\u4e3a\u57fa\u51c6\uff0c\u5728\u56db\u5e74\u540e\u4e0d\u80fd\uff08\u5f53\u7136\u5982\u679c\u65e9\u505a\u89c4\u5212\uff0c\u4e00\u76f4\u5728\u52aa\u529b\uff0c\u4e5f\u4e0d\u4f1a\uff09\u6bd4\u6211\u66f4\u5dee\u3002\u6bd5\u7adf\u4e00\u6761\u8def\u8d70\u7684\u4eba\u591a\u4e86\uff0c\u540e\u4eba\u4e00\u5b9a\u662f\u8981\u8d8a\u8d70\u8d8a\u987a\u7684\u3002

    \u5982\u6709\u5efa\u8bae\u6216\u7591\u95ee\u8bf7\u901a\u8fc7\u90ae\u4ef6\u8054\u7cfb\u6211 RuoxiNing@outlook.com\u3002

    "}]} \ No newline at end of file +{"config":{"lang":["ja"],"separator":"[\\s\\-\uff0c\u3002]+","pipeline":["stemmer"]},"docs":[{"location":"","title":"\ud83c\udfdb\ufe0f\ud83d\udcda Mini Babel Library","text":"

    La biblioteca de Babel

    \u300c\u5b87\u5b99\uff08\u522b\u4eba\u7ba1\u5b83\u53eb\u56fe\u4e66\u9986\uff09\u7531\u8bb8\u591a\u516d\u89d2\u5f62\u7684\u56de\u5eca\u7ec4\u6210\uff0c\u6570\u76ee\u4e0d\u80fd\u786e\u5b9a\uff0c\u4e5f\u8bb8\u662f\u65e0\u9650\u7684\u300d \u2014\u2014 Jorge Luis Borges (1939)

    \u8fd9\u662f\u6211\u4e3b\u8981\u7528\u4e2d\u6587\u5199\u7684BLOG\uff0c\u5927\u90e8\u5206\u5185\u5bb9\u662f\u5b66\u4e60\u7b14\u8bb0\u3002\u6211\u7684\u7b14\u8bb0\u4e0d\u591a\uff01\u4ee5\u540e\u4e5f\u4e0d\u4f1a\u591a\u7684\ud83d\ude24(\u51fa\u5904\ud83d\udd17) \u6b22\u8fce\u6765\u770b\u6211\u7684\u7b14\u8bb0\uff01

    "},{"location":"#page-table","title":"\u9875\u8868 Page Table","text":"

    \u5728\u7f51\u4e0a\u627e\u7b14\u8bb0/\u8d44\u6e90\u7684\u65f6\u5019\uff0c\u6211\u7684\u6700\u5927\u611f\u53d7\u4e4b\u4e00\u662f\u867d\u7136\u8d44\u6e90\u5f88\u591a\u5f88\u591a\uff0c\u4f46\u662f\u5e38\u5e38\u4e0d\u77e5\u9053\u67d0\u4e2a\u8d44\u6e90\u6709\u591a\u91cd\u8981\uff0c\u65e0\u6cd5\u8bc4\u4f30\u91cc\u9762\u6db5\u76d6\u4e86\u591a\u5c11\u4e1c\u897f\u4ece\u800c\u4e0d\u77e5\u9053\u8981\u4e0d\u8981\u70b9\u5f00\uff0c\u6216\u8005\u65e0\u6cd5\u4f30\u8ba1\u5728\u671f\u672b\u6709\u9650\u7684\u65f6\u95f4\u91cc\u5e94\u8be5\u82b1\u591a\u5c11\u65f6\u95f4\u590d\u4e60\u67d0\u4e2a\u8d44\u6e90\u3002\u6211\u6b63\u5728\u52aa\u529b\u5728\u8fd9\u91cc\u5efa\u4e00\u4e2a\u5c1a\u80fd\u8bfb\u7684\u8d44\u6e90\u7684pagetable\uff0c\u4ee5\u9632\u4e0d\u5e78\u7684\u6e38\u5ba2\u4ece\u4fa7\u8fb9\u680f\u6e38\u8d70\u8fdb\u672c\u56fe\u4e66\u9986\u7684\u5783\u573e\u5806\u6f29\u6da1\ud83c\udf00\ud83c\udf0a\u3002\u5982\u679c\u6211\u76ee\u524d\u7684\u7b14\u8bb0\u5728\u8fd9\u4e2a\u7ef4\u5ea6\u4e0a\u505a\u5f97\u4e0d\u597d\uff0c\u8bf7\u8054\u7cfb\u6211\u6216\u8005\u5411\u6211\u63d0issue\u50ac\u6211\u6539 \u8c22\u8c22\uff01

    \ud83d\udd34 \ud83d\udfe1 \ud83d\udfe2 \ud83d\udd17 \u5199\u5f97\u5f88\u70c2\u6216\u4e0d\u6253\u7b97\u5199\u4e86 \u5728\u5199\u7684\u4e14\u6709\u751f\u4e4b\u5e74\u4f1a\u5199\u5b8c\u7684\u3002 \u53ef\u4ee5\u9605\u8bfb\uff01 \u540c\u7c7b\u4e00\u6837\u597d\u6216\u66f4\u597d\u7684\u8d44\u6e90"},{"location":"#cs-notes","title":"\ud83d\udcbb CS Notes","text":"\u7c7b\u522b \u8bfe.. \u7f16\u7a0b\u8bed\u8a00 \ud83d\udd34C\u5c16 \ud83d\udd34C++ \ud83d\udd17\u8431\u5b9d \ud83d\udd34Verilog \ud83d\udd17HDLBits \ud83d\udd34Python \ud83d\udfe2x86\u6c47\u7f16 \u8ba1\u7b97\u673a\u79d1\u5b66 \ud83d\udd34\u79bb\u6563\u6570\u5b66 \ud83d\udd17\u5706\u732b \ud83d\udfe1FDS \ud83d\udd34ADS \ud83d\udd34\u8ba1\u7b97\u7406\u8bba \ud83d\udd34\u7f16\u8bd1\u539f\u7406 \ud83d\udd17\u8431\u5b9d \u8f6f\u4ef6 \ud83d\udfe2OS \ud83d\udd17\u4fee\u52fe \ud83d\udfe1DBMS \ud83d\udd34\u8ba1\u7f51 \ud83d\udd34\u8f6f\u5de5 \u786c\u4ef6 \ud83d\udd34\u6570\u903b \ud83d\udd17\u4fee\u52fe \ud83d\udd34\u8ba1\u6982 \ud83d\udd34\u8ba1\u7ec4 \ud83d\udfe2\u4f53\u7cfb \u4e0d\u597d\u63cf\u8ff0 \ud83d\udd34\u6c9f\u901a\u6280\u5de7 \ud83d\udfe1\u5199\u4e2a\u722c\u866b"},{"location":"#dl-notes","title":"\ud83c\udf93 DL Notes","text":"\u7c7b\u522b \u8bfe.. DL \ud83d\udfe1RL CV NLP \ud83d\udd34Explainable NLP \ud83d\udd34Math Word Problem DM"},{"location":"#linguistics-notes","title":"\ud83c\udf33 Linguistics Notes","text":"\u7c7b\u522b \u8bfe.. \u8bed\u8a00\u5b66 \ud83d\udfe1\u8bed\u97f3\u5b66 \ud83d\udd34\u97f3\u7cfb\u5b66 \ud83d\udfe1\u5f62\u6001\u5b66 \ud83d\udfe1\u53e5\u6cd5\u5b66 \ud83d\udd17\u5706\u732b \ud83d\udfe2\u8bed\u4e49\u5b66 \ud83d\udfe2\u8bed\u7528\u5b66 \u4e0d\u597d\u63cf\u8ff0 \ud83d\udfe2\u8bed\u8a00\u54f2\u5b66"},{"location":"#_1","title":"\ud83d\udcad \u8bf4\u778e\u8bdd\u4e86","text":"\u7c7b\u522b \u5e16\u5b50.. \u751f\u5b58\u7ecf\u9a8c.. ZJU\u751f\u5b58\u7ecf\u9a8c.. \ud83d\udfe2\u4ece\u82f1\u4e13\u8f6cCS\u548cNLP\u7684\u5efa\u8bae\u5e16 \u5347\u5b66\u7ecf\u9a8c.. \ud83d\udfe124fall\u7533\u8bf7\u8bb0\u5f55"},{"location":"#_2","title":"\u8d44\u6e90\u6307\u8def","text":"\u7ad9 \u5b9a\u4f4d\u662f \u672c\u7ad9\uff1a# \u63ba\u6742\u81ea\u5df1\u89c2\u70b9\u7684\u7b14\u8bb0 + \u5fc3\u5f97 \u4ed3\u5e93\uff1a\ud83d\udd17ZJU_COURSE_MATERIALS \u5ba2\u89c2\u901a\u7528\u7684\u4e00\u4e2aZJU\u8bfe\u7a0b\u8d44\u6599\u5de5\u5177\u7bb1 \u53cb\u94fe \u6765\u81ea\u4e8e \u5185\u5bb9 \u63a8\u8350\u8bed mem \u7684\u5c0f\u7ad9 memset0 \u5c0f\u670b\u53cb\uff01 \u7b97\u6cd5\u7b14\u8bb0/ZJU \u8bfe\u7a0b\u7b14\u8bb0 \u8c22\u8c22\u7b2c\u4e00\u4f4d\u627e\u6211\u6362\u53cb\u94fe\u7684\u5c0f\u670b\u53cb\uff01\u662f OIer\uff0c\u7b97\u6cd5\u7b14\u8bb0\u91cc\u7684\u4e00\u4e9b\u9898\u76ee\u662f\u4e0d\u592a\u5e38\u89c1\u7684\u8d44\u6e90"},{"location":"#_3","title":"\u8054\u7cfb\u4f5c\u8005","text":"

    \ud83d\udceb \u90ae\u7bb1 | \ud83e\uddd1\u200d\ud83d\udcbb \u4e3b\u9875

    "},{"location":"CS/","title":"\u7d22\u5f15","text":"

    \u672c\u7ae0\u8282\u5305\u62ec\u8ba1\u7b97\u673a\u79d1\u5b66\u7b14\u8bb0

    "},{"location":"CS/libgraphics/","title":"C\u5927\u7a0b libgraphics \u6587\u6863 \u4f7f\u7528\u8bb0\u5f55","text":"

    \u26a0\ufe0f \u6ca1\u5199\u5b8c TODO

    "},{"location":"CS/libgraphics/#_1","title":"\u5df2\u77e5\u95ee\u9898","text":""},{"location":"CS/libgraphics/#devc","title":"DevC++\u56fe\u5f62\u7f16\u7a0b\u8fc7\u7a0b","text":""},{"location":"CS/libgraphics/#_2","title":"\u51fd\u6570\u5e93","text":"

    graphics.h \u4ec5\u63d0\u4f9b\u4ee5\u4e0b\u5c11\u91cf\u753b\u56fe\u51fd\u6570\u63a5\u53e3

    InitGraphics();\nMovePen(x, y);\nDrawLine(dx, dy);\nDrawArc(r, start, sweep);\nGetWindowWidth();\nGetWindowHeight();\nGetCurrentX();\nGetCurrentY();\n

    \u6211\u4eec\u5c06\u5728\u4e0b\u9762\u4ecb\u7ecd\u8fd9\u4e9b\u63a5\u53e3\u7684\u7528\u6cd5\u3002

    "},{"location":"CS/libgraphics/#_3","title":"\u521d\u59cb\u5316\u64cd\u4f5c","text":"

    \u5728main.c\u91cc\u9700\u8981\u8fdb\u884c\u5982\u4e0b\u521d\u59cb\u5316

    #include \"graphics.h\"\n#include \"extragraph.h\"\n#include \"imgui.h\"\nvoid Main()        // \u6ce8\u610f\u8fd9\u91cc\u9700\u8981\u4f7f\u7528\u5927\u5199Main\n{\nSet WindowTitle(\"Your Title\");\nInitGraphics();  // \u8c03\u7528\u4e86\u56fe\u5f62\u6a21\u5f0f\n}\n

    InitGraphics(); \u8fd9\u4e2a\u51fd\u6570\u4f1a\u6253\u5f00\u4e00\u4e2a\u7a7a\u7684\u56fe\u5f62\u7a97\u53e3\u3002

    "},{"location":"CS/libgraphics/#_4","title":"\u7a97\u53e3","text":"

    \u4ee5\u4e0b\u56db\u4e2a\u51fd\u6570\u90fd\u4e0d\u9700\u8981\u4f20\u5165\u53c2\u6570\uff0c\u5206\u522b\u8fd4\u56de\u7a97\u53e3\u5bbd\u3001\u9ad8\uff0c\u5f53\u524dX\u3001Y\u5750\u6807\u3002

    GetWindowWidth();\nGetWindowHeight();\nGetCurrentX();\nGetCurrentY();\n
    "},{"location":"CS/libgraphics/#_5","title":"\u597d\u7684\u7f16\u5199\u4e60\u60ef","text":"

    \u5e94\u8be5\u5148\u5b9a\u4e49\u4e00\u4e9b\u5e38\u91cf\uff0c\u7ed9\u8fd9\u4e9b\u5e38\u91cf\u53d6\u540d\u5b57

    #define HouseHeight 2.0\n#define HouseWidth 3.0\n#define AtticHeight 0.7\n#define DoorWidth 0.4\n#define DoorKnobRadius 0.03\n#define DoorKnobInset 0.07\n#define PaneHeight 0.25\n#define PaneWidth 0.2\n#define FirstFloorWindows 0.3\n#define SecondFloorWindows 1.25\n
    "},{"location":"CS/libgraphics/#_6","title":"\u753b\u56fe\u5f62\u7684","text":""},{"location":"CS/libgraphics/#movepen","title":"MovePen","text":"

    \u5c06\u7b14\u79fb\u52a8\u5230(x, y)\u8be5\u5750\u6807\u3002\u6ce8\u610f\u5f53\u753b\u56fe\u5f62\u65f6\uff0c\u540e\u9762\u51e0\u4e2a\u51fd\u6570\u7684\u76f8\u5bf9\u4f4d\u79fb\uff0c\u90fd\u662f\u76f8\u5bf9\u4e8e\u8fd9\u4e2a\u51fd\u6570\u8bbe\u7f6e\u7684\u7b14\u5750\u6807\u79fb\u52a8\u7684\u3002

    MovePen(double x, double y);\n
    "},{"location":"CS/libgraphics/#drawline","title":"DrawLine","text":"

    \u5728\u753b\u7ebf\u4e4b\u524d\u4e00\u5b9a\u8981MovePen();

    DrawLine(double dx, double dy);\n

    \u753b\u7ebf\u7684\u65b9\u5411\uff1a

    \u6a2a\u5750\u6807\u6700\u5de6\u8fb9\u662f0\uff0c\u5411\u53f3\u589e\u5927

    \u7eb5\u5750\u6807\u6700\u4e0b\u9762\u662f0\uff0c\u5411\u4e0a\u589e\u5927

    \u53ef\u4ee5\u7406\u89e3\u4e3a\u6211\u4eec\u5728\u7b2c\u4e00\u8c61\u9650

    "},{"location":"CS/libgraphics/#drawarc","title":"DrawArc","text":"

    \u5728\u753b\u5f27\u4e4b\u524d\u4e00\u5b9a\u8981MovePen();

    DrawArc(double r, double start, double sweep);\n
    "},{"location":"CS/libgraphics/#_7","title":"\u6211\u4eec\u5e94\u5f53\u628a\u753b\u77e9\u5f62\u5c01\u88c5\u6210\u4e00\u4e2a\u65b0\u7684\u51fd\u6570","text":"
    void DrawBox (double x, double y, double width, double height)\n{\nMovePen(x, y);\nDrawLine(0, height);\nDrawLine(width, 0);\nDrawLine(0, height);\nDrawLine(-width, 0);\n}\n
    void DrawCenteredBox(double x, double y, double width, double height)\n{\nDrawBox(w - width/2, y - height/2, width, height);\n}\n
    "},{"location":"CS/libgraphics/#_8","title":"\u753b\u5706\u7684\u51fd\u6570","text":"
    void DrawCenteredCircle(double x, double y, double r)\n{\nMovePen(x + r, y);\nDrawArc(r, 0, 360);\n}\n
    "},{"location":"CS/libgraphics/#_9","title":"\u6587\u5b57","text":"

    \u4ece\u5f53\u524d\u4f4d\u7f6e\u5f00\u59cb\u8f93\u51fa\u6587\u672c\u4e32

    DrawTextString(string);\n

    \u8fd9\u4e2a\u51fd\u6570\u7528\u4e8e\u83b7\u53d6\u67d0\u4e2a\u5b57\u7b26\u4e32\u957f\u5ea6

    double stringLen = TextStringWidth(string); 
    "},{"location":"CS/libgraphics/#_10","title":"\u67e5\u770b\u56de\u8c03\u51fd\u6570\u7c7b\u578b","text":"
    typedef void(* KeyboardEventCallback)(int key, int event);\n
    "},{"location":"CS/libgraphics/#_11","title":"\u5b9a\u65f6\u5668","text":""},{"location":"CS/libgraphics/#_12","title":"\u65f6\u95f4\u56de\u8c03\u51fd\u6570","text":"
    registerTimerEvent(mytimer);  //\u83b7\u53d6\u7535\u8111\u65f6\u949f\u4fe1\u606f\u8fd4\u56de\u7ed9mytimer\nstartTimer(0, (int)(1000/speed));  // \u8981\u8ba8\u8bba\u4f20\u8fdb\u6765\u7684timer\u662f\u4ec0\u4e48\n
    "},{"location":"CS/libgraphics/#_13","title":"\u5b9a\u65f6\u5668\u6d88\u606f\u56de\u8c03\u51fd\u6570","text":"
    void TimerEventProcess(int timerID);\n

    \u793a\u4f8b

    typedef enum\n{\nLabelTimer,\nBoxTimer,\n} MyTimer;\n
    void mytimer(int  timerID)\n{\nswitch (timerID)\n{\ncase LabelTimer:\nlabel_x += 0.5;\nif (label_x > 5.0) label_x = 1.0;\ndisplay();\nbreak;\ncase BoxTimer:\nbox_y += 0.5;\nif (box_y > 5.0) box_y = 1.0;\ndisplay();\nbreak;\nbreak;\n}\n}\n
    registerTimerEvent(mytimer);\nstartTimer(LabelTimer, 100);\nstartTimer(BoxTimer, 200);\n
    "},{"location":"CS/libgraphics/#_14","title":"\u9f20\u6807","text":""},{"location":"CS/libgraphics/#_15","title":"\u9f20\u6807\u6d88\u606f\u56de\u8c03\u51fd\u6570","text":"
    void MouseEventProcess(int x, int y, int button, int event);\n

    x, y - \u4f4d\u7f6e\u5750\u6807

    button - \u6309\u4e0b\u7684\u662f\u54ea\u4e2a\u952e

    event - \u6309\u4e0b\uff0c\u677e\u5f00\uff0c\u79fb\u52a8\u7b49\u4e8b\u4ef6

    void myMouseEvent (int x, int y, int button, int event)\n{\nmouse_x = ScaleXInches(x);   // \u8fd9\u4e2a\u51fd\u6570\u5728extragraph\u5e93\u91cc\nmouse_y = ScaleYInches(y);\ndisplay();\n}\n

    \u9700\u8981\u5728Main()\u91cc\u6dfb\u52a0\u8fd9\u4e00\u884c

    registerMouseEvent(myMouseEvent);\n

    \u5728display()\u91cc

    void display()\n{\ndouble w = 1.0;\ndouble h = GetFontHeight() * 2;\n// \u6e05\u9664\u5c4f\u5e55\nDisplayClear();\n// draw a square\nSetPenColor(\"Red\");\ndrawLabel(label_x, label_y, \"Lable is Here\");\n//draw a rect/box to trace the mouse\n//drawRectangle(mouse_x, mouse_y, w, h, 0);\nSetPenColor(\"Blue\");\ndrawBox(mouse_x, mouse_y, w, h, 1, \"This box follows the mouse\", 'L', \"Red\");\n}\n
    "},{"location":"CS/libgraphics/#linkedlist","title":"\u4f7f\u7528linkedlist\u5e93","text":"
    #include \"linkedlist.h\"\n

    \u521b\u5efa\u4e00\u4e2a linkedlist \u540d\u53eb g_polylines

    linkedlistADT g_polylines = NULL;\ng_polylines = NewLinkedList();\ndisplay();\n
    void display()\n{\nlinkedlistADT poly = NextNode(g_polylines, g_polylines);\nSetPenColor(\"Blue\");\nif (poly) {\nPoint * p = (Point*) NodeObj(g_polylines, poly);\ndouble lx = p->x;\ndouble ly = p->y;\nMovePen(lx, ly);\nwhile (poly = NextNode(g_polylines, poly))\n{\np = (Point*) NodeObj(g_polylines, poly);\nDrawLine(p->x - lx, p->y - ly);\nlx = p->x;\nly = p->y;\n}\n}\n}\n
    "},{"location":"CS/libgraphics/#button","title":"\u4f7f\u7528button\u548c\u952e\u76d8","text":"

    \u8fd9\u6b21\u9700\u8981\u7528\u5230\u7684\u5e93

    #include <windows.h>\n#include <winuser.h>\n#include \"graphics.h\"\n#include \"extgraph.h\"\n#include \"imgui.h\"\n#include \"linkedlist.h\"\n
    "},{"location":"CS/libgraphics/#_16","title":"\u5b57\u7b26\u8f93\u5165\u56de\u8c03\u51fd\u6570","text":"
    void charEventProcess(char c);\n

    c - \u8f93\u5165\u5b57\u7b26\u7684ASCII\u7801

    "},{"location":"CS/libgraphics/#_17","title":"\u952e\u76d8\u56de\u8c03\u51fd\u6570","text":"
    void KeyboardEventProcess(int key, int event);\n

    key - \u54ea\u4e2a\u952e

    event - \u6309\u4e0b\u8fd8\u662f\u677e\u5f00

    \u793a\u4f8b

    \u5728Main()\u4e2d

    \n
    void myKeyboardEvent(int key, int event)\n{\nuiGetKeyboard(key, event); // needed for using simpleGUI\ndisplay();\nswitch (event)\n{\ncase KEY_UP:\nif (key == VK_F1)\ng_add_point = !g_add_point;\nbreak;\ndefault:\nbreak;\n}\n}\n
    "},{"location":"CS/libgraphics/#_18","title":"\u989c\u8272\u5e93","text":"

    \u81ea\u5e26\u7684\u989c\u8272\u5217\u8868

    char colorlist[100][100] = {\u201dBlack\u201d, \u201cDark Gray\u201d, \u201cGray\u201d, \u201cLight Gary\u201d, \u201cWhite\u201d, \u201cBrown\u201d, \u201cRed\u201d, \u201cOrange\u201d, \u201cYellow\u201d, \u201cGreen\u201d, \u201cBlue\u201d, \u201cViolet\u201d, \u201cMagenta\u201d, \u201cCyan\u201d};\nconst int colorNumber = 14;\n

    \u81ea\u5b9a\u4e49\u989c\u8272

    \u989c\u8272\u4f1a\u88ab\u52a0\u5165\u989c\u8272\u5e93\uff0cRGB\u7684\u53d6\u503c\u8303\u56f4\u90fd\u662f[0, 1]\u800c\u4e0d\u662f[0, 256)

    DefineColor(\"Color Name\", R, G, B);\n
    "},{"location":"CS/libgraphics/#libgraphics","title":"libgraphics\u5176\u5b83\u5e38\u7528\u7684\u4e1c\u897f","text":""},{"location":"CS/x86assm/","title":"x86\u6c47\u7f16","text":""},{"location":"CS/x86assm/#lab","title":"Lab\u8bb0\u5f55","text":"

    Failure

    Lab\u5df2\u7ecf\u5168\u90e8\u6362\u6389\uff0c\u8fd9\u90e8\u5206\u4f5c\u4e1a\u4ecb\u7ecd\u65e0\u6cd5\u53c2\u8003\u4e86\u3002

    "},{"location":"CS/x86assm/#6","title":"6\u79cd\u5bfb\u5740\u65b9\u5f0f\u4e0e\u5176\u4f5c\u7528","text":"\u8bf4\u660e \u793a\u4f8b \u4f5c\u7528 \u7acb\u5373\u5bfb\u5740 mov eax,56H \u901a\u5e38\u7528\u4e8e\u8d4b\u503c \u76f4\u63a5\u5bfb\u5740 mov eax,[1255887H] \u901a\u5e38\u7528\u4e8e\u5904\u7406\u53d8\u91cf \u5bc4\u5b58\u5668\u5bfb\u5740 mov eax,[edi] \u5730\u5740\u5728\u5bc4\u5b58\u5668\u4e2d \u5bc4\u5b58\u5668\u76f8\u5bf9\u5bfb\u5740 mov eax,[edi+20H] \u5e38\u7528\u4e8e\u8bbf\u95ee\u6570\u7ec4\u548c\u7ed3\u6784 \u57fa\u5740\u52a0\u53d8\u5740\u5bfb\u5740 mov eax,[EBP+ESI] \u5e38\u7528\u4e8e\u8bbf\u95ee\u6570\u7ec4 \u76f8\u5bf9\u57fa\u5740\u52a0\u53d8\u5740\u5bfb\u5740 mov eax,[EBX+EDI-10H] \u5e38\u7528\u4e8e\u8bbf\u95ee\u7ed3\u6784"},{"location":"CS/x86assm/#obj-dump","title":"obj dump","text":"

    \u6e90\u4ee3\u7801\u6587\u4ef6\u540dmytest.c

    gcc -c -g -o mytest mytest.c\nobjdump -s -d main.o > main.o.txt\n

    \u76ee\u6807\u6587\u4ef6\u53cd\u6c47\u7f16\uff0c\u540c\u65f6\u663e\u793a\u6e90\u4ee3\u7801

    gcc -g -c -o main.o main.c\nobjdump -S -d main.o > main.o.txt\n

    \u663e\u793a\u6e90\u4ee3\u7801\u7684\u540c\u65f6\u663e\u793a\u884c\u53f7

    objdump -j .text -ld -C -S main.o > main.o.txt\n

    \u53ef\u6267\u884c\u6587\u4ef6\u53cd\u6c47\u7f16

    gcc -o main main.c\nobjdump -s -d main > main.txt\n

    \u540c\u65f6\u663e\u793a\u6e90\u4ee3\u7801

    gcc -g -o main main.c\nobjdump -S -d main > main.txt\n
    "},{"location":"CS/x86assm/#_1","title":"\u671f\u672b\u8003\u8bd5","text":"
    1. \u662f\u975e\u9898(10\u4e2a\uff0c\u6bcf\u98981\u5206\uff0c\u517110\u5206)
    2. \u586b\u7a7a(15\u4e2a\uff0c\u6bcf\u7a7a2\u5206\uff0c\u517130\u5206)\uff1a
    3. \u7a0b\u5e8f\u586b\u7a7a\u9898(3\u9898\uff0c\u6bcf\u989810\u5206\uff0c\u517130\u5206)

      \u4e00\u822c\u90fd\u4f1a\u7528stack\u538b\u5165\u53c2\u6570 \u4f1a\u7ed9\u51fac\u8bed\u8a00\u7684\u539f\u578b\uff08\uff1f\uff0c\u53c2\u6570\u7684\u538b\u5165\u987a\u5e8f\u4ece\u53f3\u5230\u5de6\uff0ccaller\u6e05\u7406 pascal\uff0c\u4ece\u5de6\u5230\u53f3\uff0ccallee\u6e05\u7406 stdcall\uff0c\u4ece\u53f3\u5230\u5de6\uff0ccaller\u6e05\u7406 \u90fd\u7528ax\u8fd4\u56de\u53c2\u6570 \u4e00\u822c\u4e24\u4e2a\u7a7a\u4e0d\u53ef\u4ee5\u4ea4\u6362\u3002\u3002\u3002 \u5148\u81ea\u5df1\u5199\u4e00\u904d\u518d\u586b \uff08\u4e00\u822c20\u51e0\u884c\u7684\u7a0b\u5e8f\uff09

    4. \u7a0b\u5e8f\u9605\u8bfb(2\u9898\uff0c\u6bcf\u98985\u5206\uff0c\u517110\u5206) \u4f1a\u95ee\u8fd0\u884c\u7ed3\u679c\u548c\u4e2d\u95f4\u7ed3\u679c\uff08#\uff09\uff08\u5982\u679c\u6709\u5faa\u73af\uff0c\u6bcf\u6b21\u5faa\u73af\u5230\u90fd\u8981\u5199\uff0c\u4f46\u662f\u4e0d\u4f1a\u592a\u591a\uff09

    \u4e0d\u4f1a\u6709\u76f4\u63a5\u624b\u5199\u4e00\u6574\u4e2a\u7a0b\u5e8f\u7684\u9898

    \u91cd\u70b9\uff1a \u51fd\u6570\u53c2\u6570\u4f20\u9012\uff0c\u5982\u4f55\u6784\u9020\u4e00\u4e2a\u5806\u6808\u6846\u67b6\uff0cebp\u3002\u3002 \u9700\u8981\u770b\u61c2\u662f\u4e0d\u662f\u9012\u5f52\uff0c \u6709\u4e00\u4e2a\u7a0b\u5e8f\u586b\u7a7a\u4f1a\u51fa\u5355\u6b65\u8c03\u8bd5\uff0c\u8fb9\u89e3\u5bc6\u8fb9\u52a0\u5bc6\u90a3\u4e2a\u3002\u3002 \u4e0d\u4f1a\u8003\u4fdd\u62a4\u6a21\u5f0f\u3002

    "},{"location":"CS/x86assm/#_2","title":"\u590d\u4e60","text":""},{"location":"CS/x86assm/#intel-808680386-cpu","title":"Intel 8086/80386 CPU \u529f\u80fd\u7ed3\u6784","text":""},{"location":"CS/x86assm/#_3","title":"\u5de5\u4f5c\u65b9\u5f0f","text":"
    1. \u4ece\u5b58\u50a8\u5668\u4e2d\u53d6\u4e00\u6761\u6307\u4ee4
    2. \u5206\u6790\u6307\u4ee4\u7684\u64cd\u4f5c\u7801
    3. \u4ece\u5b58\u50a8\u5668\u4e2d\u8bfb\u53d6\u64cd\u4f5c\u6570
    4. \u6267\u884c\u6307\u4ee4
    5. \u5199\u5165\u7ed3\u679c\u96c6
    6. \u56de\u52301

    \u8fd0\u7b97\u5668\u8fdb\u884c\u4fe1\u606f\u5904\u7406\uff0c\u5bc4\u5b58\u5668\u8fdb\u884c\u4fe1\u606f\u5b58\u50a8\uff0c\u63a7\u5236\u5668\u63a7\u5236\u5404\u79cd\u5668\u4ef6\u5de5\u4f5c\uff0c\u603b\u7ebf\u8fde\u63a5\u5404\u79cd\u5668\u4ef6\u3002

    "},{"location":"CS/x86assm/#163280x86-view","title":"16\u4f4d\u548c32\u4f4d\u768480x86\u7684\u533a\u522b - \u64cd\u4f5c\u7cfb\u7edfview","text":""},{"location":"CS/x86assm/#_4","title":"\u903b\u8f91\u5730\u5740\u4e0e\u7269\u7406\u5730\u5740\u8f6c\u6362\uff1a","text":"

    1234h:0058h \u8f6c\u5316\u6210\u7269\u7406\u5730\u5740=12340h+0058h=12398h \u8865\u7801

    "},{"location":"CS/x86assm/#_5","title":"\u6807\u5fd7\u4f4d","text":"

    \u72b6\u6001\u6807\u5fd7\uff1aCF ZF SF OF AF PF \u63a7\u5236\u6807\u5fd7\uff1aDF(direction flags) TF(trace/trap flag) IF(interrupt flag)

    "},{"location":"CS/x86assm/#_6","title":"\u6570\u636e\u5728\u5185\u5b58\u4e2d\u7684\u5b58\u653e\u89c4\u5f8b\uff1a","text":"

    \u5c0f\u7aef\u683c\u5f0f\u3002\u4f4e\u5b57\u8282\u5728\u524d\uff0c\u9ad8\u5b57\u8282\u5728\u540e\u3002 \u8bbeds=1000h, bx=2000h, ax=1234h Mov ds:[bx], ax \u6267\u884c\u540e1000:2001\u6307\u5411\u7684\u5b57\u8282=12h

    "},{"location":"CS/x86assm/#_7","title":"\u5bc4\u5b58\u5668","text":"

    \u603b\u7ed3

    \u5bc4\u5b58\u5668 \u7c7b\u522b \u7528\u9014 AX \u6570\u636e\u5bc4\u5b58\u5668 \u7b97\u672f\u8fd0\u7b97\u4e2d\u7684\u4e3b\u8981\u5bc4\u5b58\u5668\uff0c\u5728\u4e58\u9664\u8fd0\u7b97\u4e2d\u7528\u6765\u5236\u5b9a\u88ab\u9664\u6570\uff0c\u4e5f\u662f\u4e58\u9664\u8fd0\u7b97\u540e\u7ed3\u679c\u7684\u9ed8\u8ba4\u5b58\u50a8\u5355\u5143\u3002\u53e6\u5916I/O\u6307\u4ee4\u5747\u4f7f\u7528\u8be5\u5bc4\u5b58\u5668\u4e0eI/O\u8bbe\u5907\u4f20\u9001\u4fe1\u606f\u3002 BX \u6570\u636e\u5bc4\u5b58\u5668 \u6307\u4ee4\u5bfb\u5740\u65f6\u5e38\u7528\u505a\u57fa\u5740\u5bc4\u5b58\u5668\uff0c\u5b58\u5165\u504f\u79fb\u91cf\u6216\u504f\u79fb\u91cf\u7684\u6784\u6210\u6210\u5206 CX \u6570\u636e\u5bc4\u5b58\u5668 \u5728\u5faa\u73af\u6307\u4ee4\u64cd\u4f5c\u6216\u4e32\u5904\u7406\u6307\u4ee4\u4e2d\u9690\u542b\u8ba1\u6570 DX \u6570\u636e\u5bc4\u5b58\u5668 \u5728\u53cc\u5b57\u8282\u957f\u8fd0\u7b97\u4e2d\u4e0eAX\u6784\u621032\u4f4d\u64cd\u4f5c\u6570\uff0cDX\u4e3a\u9ad816\u4f4d\u3002\u5728\u67d0\u4e9bI/O\u6307\u4ee4\u4e2d\uff0cDX\u88ab\u7528\u6765\u5b58\u653e\u7aef\u53e3\u5730\u5740 SP \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u59cb\u7ec8\u662f\u6808\u9876\u7684\u4f4d\u7f6e\uff0c\u4e0eSS\u5bc4\u5b58\u5668\u4e00\u8d77\u6784\u6210\u6808\u9876\u6570\u636e\u7684\u7269\u7406\u5730\u5740 BP \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u7cfb\u7edf\u9ed8\u8ba4\u5176\u6307\u5411\u5806\u6808\u4e2d\u67d0\u4e00\u5355\u5143\uff0c\u5373\u63d0\u4f9b\u6808\u4e2d\u8be5\u5355\u5143\u7684\u504f\u79fb\u91cf\u3002\u52a0\u6bb5\u524d\u7f00\u540e\uff0cBP\u53ef\u4f5c\u4e3a\u975e\u5806\u6808\u6bb5\u7684\u5730\u5740\u6307\u9488 SI \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u4e0eDS\u8054\u7528\uff0c\u6307\u793a\u6570\u636e\u6bb5\u4e2d\u67d0\u64cd\u4f5c\u7684\u504f\u79fb\u91cf\u3002\u5728\u505a\u4e32\u5904\u7406\u65f6\uff0cSI\u6307\u793a\u6e90\u64cd\u4f5c\u6570\u5730\u5740\uff0c\u5e76\u6709\u81ea\u52a8\u589e\u91cf\u548c\u81ea\u52a8\u51cf\u91cf\u7684\u529f\u80fd\u3002\u53d8\u5740\u5bfb\u5740\u65f6\uff0cSI\u4e0e\u67d0\u4e00\u4f4d\u79fb\u91cf\u5171\u540c\u6784\u6210\u64cd\u4f5c\u6570\u7684\u504f\u79fb\u91cf DI \u6307\u9488\u53ca\u53d8\u5740\u5bc4\u5b58\u5668 \u4e0eDS\u8054\u7528\uff0c\u6307\u793a\u6570\u636e\u6bb5\u4e2d\u67d0\u64cd\u4f5c\u6570\u7684\u504f\u79fb\u91cf\uff0c\u6216\u4e0e\u67d0\u4e00\u4f4d\u79fb\u91cf\u5171\u540c\u6784\u6210\u64cd\u4f5c\u6570\u7684\u504f\u79fb\u91cf\uff0c\u4e32\u5904\u7406\u64cd\u4f5c\u65f6\uff0cDI\u6307\u793a\u9644\u52a0\u6bb5\u4e2d\u76ee\u7684\u5730\u5740\uff0c\u5e76\u6709\u81ea\u52a8\u589e\u91cf\u548c\u51cf\u91cf\u7684\u529f\u80fd\u3002 CS \u6bb5\u5bc4\u5b58\u5668 \u5b58\u653e\u5f53\u524d\u7a0b\u5e8f\u7684\u6307\u793a\u4ee3\u7801 DS \u6bb5\u5bc4\u5b58\u5668 \u5b58\u653e\u7a0b\u5e8f\u6240\u8bbe\u8ba1\u7684\u6e90\u6570\u636e\u6216\u7ed3\u679c SS \u6bb5\u5bc4\u5b58\u5668 \u4ee5\u201c\u5148\u5165\u540e\u51fa\u201d\u4e3a\u539f\u5219\u7684\u6570\u636e\u533a ES \u6bb5\u5bc4\u5b58\u5668 \u8f85\u52a9\u6570\u636e\u533a\uff0c\u5b58\u653e\u4e32\u6216\u5176\u5b83\u6570\u636e IP \u63a7\u5236\u5bc4\u5b58\u5668 \u5b83\u59cb\u7ec8\u6307\u5411\u5f53\u524d\u5c06\u8981\u6267\u884c\u6307\u4ee4\u5728\u4ee3\u7801\u6bb5\u4e2d\u7684\u504f\u79fb\u91cf FR \u63a7\u5236\u5bc4\u5b58\u5668 \u63a7\u5236\u6807\u5fd7\u4f4d

    "},{"location":"CS/x86assm/#_8","title":"\u901a\u7528\u5bc4\u5b58\u5668","text":"

    IA-32\u67b6\u6784\u4e2d\u4e00\u5171\u67094\u4e2a32\u4f4d\u5bc4\u5b58\u5668\uff0c\u7528\u4e8e\u4fdd\u5b58\u4e34\u65f6\u6570\u636e\uff0c\u8fd94\u4e2a\u901a\u7528\u5bc4\u5b58\u5668\u53ef\u4ee5\u5f53\u4f5c16\u4f4d\u7528\uff0c\u4e5f\u53ef\u4ee5\u4f5c8\u4f4d\u7528\u3002

    AX BX CX DX\uff1a\u6570\u636e\u5bc4\u5b58\u5668\uff0c\u6bcf\u4e2a\u6570\u636e\u5bc4\u5b58\u5668\u90fd\u53ef\u4ee5\u62c6\u6210\u4e24\u4e2a 8 \u4f4d\u5bc4\u5b58\u5668\u72ec\u7acb\u4f7f\u7528\uff0c\u5982 AX \u53ef\u62c6\u5206\u4e3a AH \u548c AL\uff0cBX \u62c6\u5206\u4e3a BH \u548c BL \u7b49\u3002H \u548c L \u5206\u522b\u8868\u793a\u9ad8 8 \u4f4d\u548c\u4f4e 8 \u4f4d\u3002

    AX(accumulator)\uff1a\u7d2f\u52a0\u5668\u3002\u5728\u4e58\u9664\u6cd5\u8fd0\u7b97\u3001\u4e32\u8fd0\u7b97\u3001 I/O \u6307\u4ee4\u4e2d\u90fd\u4f5c\u4e3a\u4e13\u7528\u5bc4\u5b58\u5668\uff1b BX (base)\uff1a\u57fa\u5740\u5bc4\u5b58\u5668\uff0c\u5e38\u7528\u4e8e\u5b58\u6863\u5185\u5b58\u5730\u5740\u3002

    CX (count)\uff1a\u8ba1\u6570\u5bc4\u5b58\u5668\u3002\u5e38\u7528\u4e8e\u5b58\u653e\u5faa\u73af\u8bed\u53e5\u7684\u5faa\u73af\u6b21\u6570\uff0c\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e2d\u4e5f\u5e38\u7528\u3002

    DX (data)\uff1a\u6570\u636e\u5bc4\u5b58\u5668\u3002\u5e38\u5e38\u548cEAX\u4e00\u8d77\u4f7f\u7528\u3002

    "},{"location":"CS/x86assm/#_9","title":"\u53d8\u5740\u5bc4\u5b58\u5668","text":"

    \u5b58\u653e\u5728\u53d8\u52a8\u7684\u5185\u5b58\u5730\u5740

    ESI(source index): \u6e90\u53d8\u5740\u5bc4\u5b58\u5668\uff0c\u901a\u5e38\u5b58\u653e\u8981\u5904\u7406\u7684\u6570\u636e\u7684\u5185\u5b58\u5730\u5740\u3002

    EDI(destination index)\uff1a\u76ee\u7684\u53d8\u5740\u5bc4\u5b58\u5668\uff0c\u901a\u5e38\u5b58\u653e\u5904\u7406\u540e\u7684\u6570\u636e\u7684\u5185\u5b58\u5730\u5740\u3002

    ESI\u548cEDI\u5e38\u7528\u6765\u914d\u5408\u4f7f\u7528\u5b8c\u6210\u6570\u636e\u7684\u8d4b\u503c\u64cd\u4f5c

    rep movs dword ptr[edi], dword ptr[esi];\n

    \u8fd9\u53e5\u7684\u610f\u601d\u662f\u628aESI\u6307\u5411\u7684\u5185\u5b58\u5730\u5740\u4e2d\u7684\u5185\u5bb9\u590d\u5236\u5230EDI\u6240\u6307\u5411\u7684\u5185\u5b58\u4e2d\uff0c\u6570\u636e\u957f\u5ea6\u5728ECX\u4e2d\u6307\u5b9a\u3002

    "},{"location":"CS/x86assm/#_10","title":"\u6307\u9488\u5bc4\u5b58\u5668","text":"

    ESP\uff08stack pointer\uff09\uff1a\u5806\u6808\u6307\u9488\u5bc4\u5b58\u5668\u3002SS\uff1aSP\u6307\u5411\u5806\u6808\u7684\u6808\u9876\uff0c\u56e0\u6b64\u867d\u7136\u662f\u901a\u7528\u5bc4\u5b58\u5668\uff0c\u4f46\u4e0d\u5e94\u968f\u4fbf\u6539\u53d8SP\u7684\u503c\u3002\u4e0d\u53ef\u4ee5\u4f5c\u4e3a\u901a\u7528\u5bc4\u5b58\u5668\u4f7f\u7528\uff0cESP\u5b58\u653e\u5f53\u524d\u5806\u6808\u6808\u9876\u7684\u5730\u5740\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0cESP\u548cEBP\u8054\u5408\u4f7f\u7528\u6765\u8bbf\u95ee\u51fd\u6570\u4e2d\u7684\u53c2\u6570\u548c\u5c40\u90e8\u53d8\u91cf\u3002 EBP\uff08base pointer\uff09\uff1a\u57fa\u5740\u6307\u9488\u5bc4\u5b58\u5668\u3002\u53ef\u4ee5\u4f5c\u4e3a\u901a\u7528\u5bc4\u5b58\u5668\u7528\u4e8e\u5b58\u653e\u64cd\u4f5c\u6570\uff0c\u5e38\u7528\u6765\u4ee3\u66ff\u5806\u6808\u6307\u9488\u8bbf\u95ee\u5806\u6808\u7684\u6570\u636e\u3002 EIP\uff1a\u6307\u4ee4\u6307\u9488\u5bc4\u5b58\u5668\uff0c\u603b\u662f\u6307\u5411\u4e0b\u4e00\u6761\u8981\u6267\u884c\u7684\u6307\u4ee4\u7684\u5730\u5740\u3002 \u5e38\u89c1\u7684\u8bbf\u95ee\u5806\u6808\u6307\u4ee4\uff1a

    push ebp\nmov ebp, esp\nsub esp, 78\npush esi\npush edi\ncmp dword ptr [ebp+8], 0\n

    ss\u6808\u6bb5\u5bc4\u5b58\u5668 sp\u6808\u9876\u6307\u9488\u5bc4\u5b58\u5668 bp\u9ed8\u8ba4\u7684\u6808\u5bfb\u5740\u5bc4\u5b58\u5668

    "},{"location":"CS/x86assm/#_11","title":"\u6807\u5fd7\u5bc4\u5b58\u5668","text":"

    \u6807\u5fd7\u5bc4\u5b58\u5668EFLAGS\u4e00\u5171\u670932\u4f4d\uff0c\u5728\u8fd932\u4f4d\u4e2d\u5927\u90e8\u5206\u662f\u4fdd\u7559\u7ed9\u7f16\u5199\u64cd\u4f5c\u7cfb\u7edf\u7684\u4eba\u7528\u7684\u3002

    IP (instruction pointer)\uff1a\u6307\u4ee4\u6307\u9488\u5bc4\u5b58\u5668\u3002\u4ee3\u7801\u6bb5\u5bc4\u5b58\u5668 CS \u548c\u6307\u4ee4\u6307\u9488\u5bc4\u5b58\u5668 IP \u662f 8086CPU \u4e2d\u6700\u5173\u952e\u7684\u4e24\u4e2a\u5bc4\u5b58\u5668\u3002\u5b83\u4eec\u5206\u522b\u7528\u6765\u63d0\u4f9b\u5f53\u524d\u6307\u4ee4\u7684\u6bb5\u5730\u5740\u548c\u504f\u79fb\u5730\u5740\u3002\u5373\u4efb\u610f\u65f6\u523b\uff0c8086CPU \u5c06 CS:IP \u6307\u5411\u7684\u5185\u5bb9\u5f53\u505a\u547d\u4ee4\u6267\u884c\u3002\u6bcf\u6761\u6307\u4ee4\u8fdb\u5165\u6307\u4ee4\u7f13\u51b2\u5668\u540e\u3001\u6267\u884c\u524d\uff0cIP += \u6240\u8bfb\u53d6\u6307\u4ee4\u7684\u957f\u5ea6\uff0c\u4ece\u800c\u6307\u5411\u4e0b\u4e00\u6761\u6307\u4ee4\u3002\u7528\u6237\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee IP \u5bc4\u5b58\u5668\u3002

    FL (flags)\uff1a\u6807\u5fd7\u5bc4\u5b58\u5668\u3002\u4e0e\u5176\u4ed6\u5bc4\u5b58\u5668\u4e00\u6837\uff0c\u6807\u5fd7\u5bc4\u5b58\u5668\u4e5f\u6709 16 \u4f4d\uff0c\u4f46\u662f\u6807\u5fd7\u5bc4\u5b58\u5668\u53ea\u7528\u5230\u5176\u4e2d\u7684 9 \u4f4d\u3002\u8fd9 9 \u4f4d\u5305\u62ec 6 \u4e2a\u72b6\u6001\u6807\u5fd7\u548c 3 \u4e2a\u63a7\u5236\u6807\u5fd7\uff0c\u53c2\u89c1\u4e0b\u9762\u7684\u201c\u6807\u5fd7\u4f4d\u201d\u3002

    OF\uff08Overflow Flag\uff09:\u6ea2\u51fa\u6807\u5fd7\uff0c\u6ea2\u51fa\u65f6\u4e3a1\uff0c\u5426\u5219\u7f6e0\u3002\u4e24\u4e2a\u6b63\u6570\u76f8\u52a0\u53d8\u8d1f\uff0c\u6216\u4e24\u4e2a\u8d1f\u6570\u76f8\u52a0\u53d8\u6b63\u4f1a\u6ea2\u51fa\u3002#

    DF \uff08Direction Flag\uff09:\u65b9\u5411\u6807\u5fd7\uff0c\u5728\u4e32\u5904\u7406\u6307\u4ee4\u4e2d\u63a7\u5236\u4fe1\u606f\u7684\u65b9\u5411\u30020:\u6b63\u65b9\u5411\uff0c1\uff1a\u53cd\u65b9\u5411\u3002cld\uff0cstd\u3002#

    IF (Interrupt Flag) :\u4e2d\u65ad\u6807\u5fd7\u3002\u7981\u6b62\u4e2d\u65ad0\uff0c\u5141\u8bb8\u4e2d\u65ad1\u3002cli\uff0csti\u3002#

    AF (Auxiliary carry Flag) :\u8f85\u52a9\u8fdb\u4f4d\u6807\u5fd7\uff0c\u6709\u8fdb\u4f4d\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002

    ZF (Zero Flag) :\u96f6\u6807\u5fd7\uff0c\u8fd0\u7b97\u7ed3\u6784\u4e3a0\u65f6ZF\u4f4d\u4f4d\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002

    SF (Sign Flag):\u7b26\u53f7\u6807\u5fd7\uff0c\u7ed3\u679c\u4e3a\u8d1f\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002#

    CF (Carry Flag): \u8fdb\u4f4d\u6807\u5fd7\uff0c\u8fdb\u4f4d\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002\u914d\u5957\u7684clc\uff0cstc\u4e24\u6761\u8bbe\u7f6e\u6307\u4ee4\uff1a\u6e05\u9664\u548c\u7f6e1\u3002#

    PF (Parity Flag): \u5947\u5076\u6807\u5fd7\u3002\u7ed3\u679c\u64cd\u4f5c\u6570\u4e2d1\u7684\u4e2a\u6570\u4e3a\u5076\u6570\u65f6\u7f6e1\uff0c\u5426\u5219\u7f6e0\u3002

    TF\uff1a\u5355\u6b65\u8c03\u8bd5\u8981\u7528\u3002#

    EFLAGS\u662f\u5b9e\u73b0\u6761\u4ef6\u5224\u65ad\u548c\u903b\u8f91\u5224\u65ad\u7684\u4e00\u79cd\u673a\u5236\uff0c\u5728\u6c47\u7f16\u8bed\u8a00\u4e2d\u4e00\u822c\u4e0d\u76f4\u63a5\u8bbf\u95eeEFLAGS\u5bc4\u5b58\u5668\uff0c\u800c\u662f\u901a\u8fc7\u6307\u4ee4\u7684\u64cd\u4f5c\u9690\u542b\u8bbf\u95eeEFLAGS\u5bc4\u5b58\u5668\u3002

    cmp dword ptr [ebp+8], 0. // \u5f71\u54cd\u6807\u5fd7\u4f4dCF\uff0cZF\uff0cSF\uff0cOF\uff0cAF\u548cPF\nJz 99495898 //\u5982\u679cZF\u7b49\u4e8e1\uff0c\u5219\u8df3\u8f6c\u523000405898 
    "},{"location":"CS/x86assm/#_12","title":"\u6307\u4ee4","text":"

    \u603b\u7ed3

    \u6307\u4ee4 \u4f5c\u7528 \u53c2\u6570 \u6539\u53d8\u6807\u5fd7\u4f4d mov \u8d4b\u503c \u88ab\u8d4b\u503c\u5bc4\u5b58\u5668\uff0c\u3010\u5bc4\u5b58\u5668\uff0c\u5185\u5b58\uff0c\u503c\u3011 no xchg \u6570\u636e\u4ea4\u6362 \u3010\u5bc4\u5b58\u5668\uff0c\u5185\u5b58\u3011\uff0c\u3010\u5bc4\u5b58\u5668\uff0c\u5185\u5b58\u3011 no push \u8fdb\u6808 \u6e90\u64cd\u4f5c\u6570\u3010\u5bc4\u5b58\u5668\u3011 pop \u51fa\u6808 \u76ee\u7684\u64cd\u4f5c\u6570\u3010\u5bc4\u5b58\u5668\u3011 pushf \u6807\u5fd7\u4f4d\u8fdb\u6808 \u65e0 popf \u6807\u5fd7\u4f4d\u51fa\u6808 \u65e0 lea Load effect address\uff0c\u5bfb\u5740\uff0c\u53d6\u504f\u79fb\u5730\u5740 lds \u5f53\u6307\u4ee4\u6307\u5b9a\u7684\u662f16\u4f4d\u5bc4\u5b58\u5668\u65f6\uff0c\u628a\u6e90\u64cd\u4f5c\u6570\u5b58\u50a8\u5355\u5143\u4e2d\u5b58\u653e\u7684\u5341\u516d\u4f4d\u504f\u79fb\u5730\u5740\u53d6\u51fa\u5b58\u653e\u5728\u5bc4\u5b58\u5668\u4e2d\uff0c\u7136\u540e\u628a\u6e90\u64cd\u4f5c\u6570+2\u7684\u5341\u516d\u4f4d\u6570\u88c5\u5165\u6307\u4ee4\u6307\u5b9a\u7684\u6bb5\u5bc4\u5b58\u5668\u3002\u5f53\u6307\u4ee4\u6307\u5b9a\u7684\u662f32\u4f4d\u5bc4\u5b58\u5668\u65f6 \u628a\u6e90\u64cd\u4f5c\u6570\u5b58\u50a8\u5355\u5143\u4e2d\u5b58\u653e\u768432\u4f4d\u504f\u79fb\u5730\u5740\u88c5\u5165\u5bc4\u5b58\u5668 \u7136\u540e\u628a \u6e90\u64cd\u4f5c\u6570+4 \u768416\u4f4d\u6570\u88c5\u5165\u6bb5\u5bc4\u5b58\u5668\u3002mem\u6307\u5411\u7684\u5730\u5740,\u9ad8\u4f4d\u5b58\u653e\u5728DS\u4e2d,\u4f4e\u4f4d\u5b58\u653e\u5728reg\u4e2d. LDS reg,mem les \u628a\u5185\u5b58\u4e2d\u6307\u5b9a\u4f4d\u7f6e\u7684\u53cc\u5b57\u64cd\u4f5c\u6570\u7684\u4f4e\u4f4d\u5b57\u88c5\u5165\u6307\u4ee4\u4e2d\u6307\u5b9a\u7684\u5bc4\u5b58\u5668\u3001\u9ad8\u4f4d\u5b57\u88c5\u5165ES\u5bc4\u5b58\u5668\u3002 cbw 8\u4f4d\u6570\u6269\u5c55\u4e3a16\u4f4d\u6570\uff0c\u6709\u7b26\u53f7\u6269\u5145 no cwd \u5b57(16\u4f4d)\u6269\u5c55\u4e3a\u53cc\u5b57(32\u4f4d)\uff0c\u6709\u7b26\u53f7\uff1f no add \u52a0 OPRDS\uff0cOPRDD adc \u5e26\u8fdb\u4f4d\u52a0\uff08\u7ed3\u679c\u542b\u6807\u5fd7\u4f4dCF\u7684\u503c\uff0c=OPRDS\uff0bOPRDD\uff0bCF\uff09 OPRDS\uff0cOPRDD sub \u51cf OPRDD\uff0cOPRDS sbb \u5e26\u8fdb\u4f4d\u51cf\uff08\u7ed3\u679c\u542b\u6807\u5fd7\u4f4dCF\u7684\u503c\uff0c=OPRDD\uff0dOPRDS\uff0dCF\uff09 OPRDD\uff0cOPRDS inc \u81ea\u589e1 \u5bc4\u5b58\u5668 dec \u81ea\u51cf1 \u5bc4\u5b58\u5668 mul 32\u4f4d\uff1a\u88ab\u4e58\u6570\u9ed8\u8ba4\u4e3aEAX\uff0c\u90a3\u4e48\u4e58\u79ef\u5c06\u5b58\u653e\u5728EDX\uff1aEAX\u4e2d 32\u4f4d\u4e58\u6570 16\u4f4d\uff1a\u88ab\u4e58\u6570\u9ed8\u8ba4\u4e3aAX\u90a3\u4e48\u4e58\u79ef\u5c06\u653e\u5728DX\uff1aAX\u4e2di 16\u4f4d\u4e58\u6570 8\u4f4d\uff1a\u88ab\u4e58\u6570\u9ed8\u8ba4\u4e3aAL\uff0c\u90a3\u4e48\u4e58\u79ef\u5c06\u653e\u5728AX 8\u4f4d\u4e58\u6570 div 32\u4f4d\uff1a\u88ab\u9664\u6570\u5c06\u662fEDX\uff1aEAX\uff0c \u6700\u7ec8\u7684\u5546\u5c06\u5b58\u653e\u5728EAX\uff0c \u4f59\u6570\u5c06\u5b58\u653e\u5728EDX\u4e2d 32\u4f4d\u4e58\u6570 16\u4f4d\uff1a\u88ab\u9664\u6570\u4e3aEAX\uff0c\u6700\u7ec8\u5f97\u5230\u7684\u5546\u653e\u5728AX\uff0c\u4f59\u6570\u653e\u5728EAX\u7684\u9ad816\u4f4d 16\u4f4d\u4e58\u6570 8\u4f4d\uff1a\u88ab\u9664\u6570\u662f16\u4f4d\uff0c\u6700\u7ec8\u5f97\u5230\u7684\u5546\u5c06\u653e\u5728AL\u4e2d\uff0c\u4f59\u6570\u653e\u5728AH\u4e2d 8\u4f4d\u4e58\u6570 imul \u65e0\u7b26\u53f7\u4e58 idiv \u65e0\u7b26\u53f7\u9664 xlat \u6362\u7801\u6307\u4ee4\uff0c\u4ee5bx\u4e3a\u9996\u5730\u5740\u7684\uff0c\u504f\u79fb\u5730\u5740\u4e3aal\u7684\u5185\u5bb9\u9001\u7ed9al\u3002 in \u7aef\u53e3\u8bfb\u5199\u6307\u4ee4 IN AL,21H\uff1b\u8868\u793a\u4ece21H\u7aef\u53e3\u8bfb\u53d6\u4e00\u5b57\u8282\u6570\u636e\u5230AL out \u7aef\u53e3\u8bfb\u5199\u6307\u4ee4 and \u6309\u4f4d\u4e0e or \u6309\u4f4d\u6216 xor \u6309\u4f4d\u5f02\u6216 not \u64cd\u4f5c\u6570\u6309\u4f4d\u53d6\u53cd neg \u64cd\u4f5c\u6570\u6309\u4f4d\u53d6\u53cd\u52a0\u4e00 test \u5bf9\u4e24\u4e2a\u64cd\u4f5c\u6570\u8fdb\u884c\u6309\u4f4d\u4e0e\u64cd\u4f5c\u3002\u4e0eand\u4e0d\u540c\uff0c\u4e0d\u5f71\u54cd\u76ee\u6807\u64cd\u4f5c\u6570\u7684\u503c\u3002 shl \u903b\u8f91\u5de6\u79fb\uff0c\u5c06\u4e00\u4e2a\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\u6216\u5355\u5143\u4e2d\u7684\u6570\u636e\u5411\u5de6\u79fb\u4f4d\uff0c\u5c06\u6700\u540e\u79fb\u51fa\u7684\u4e00\u4f4d\u5199\u5165cf\u4e2d\u3002\u6700\u4f4e\u4f4d\u75280\u8865\u5145\u3002 shr \u903b\u8f91\u53f3\u79fb\uff0c\u5c06\u4e00\u4e2a\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\u6216\u5355\u5143\u4e2d\u7684\u6570\u636e\u5411\u5de6\u79fb\u4f4d\uff0c\u5c06\u6700\u540e\u79fb\u51fa\u7684\u4e00\u4f4d\u5199\u5165cf\u4e2d\u3002\u6700\u9ad8\u4f4d\u75280\u8865\u5145\u3002 sal \u7b97\u672f\u5de6\u79fb\uff0c\u4e0eshl\u4e00\u6837\uff0c\u88650 sar \u7b97\u672f\u53f3\u79fb\uff0c\u4e0eshr\u4e0d\u4e00\u6837\uff0c\u7b97\u672f\u53f3\u79fb\u8865\u6700\u9ad8\u4f4d rol \u5faa\u73af\u5de6\u79fb ror \u5faa\u73af\u53f3\u79fb rcl \u5e26\u8fdb\u4f4d\u5faa\u73af\u5de6\u79fb\uff0c\u5de6\u79fb\u7684\u65f6\u5019\u79fb\u51fa\u53bb\u7684\u4f1a\u653e\u5728cf\uff1f rcr \u5e26\u8fdb\u4f4d\u5faa\u73af\u53f3\u79fb cmp \u6bd4\u8f83 ja jump if above jb Jump if below jae Jump if above or equal jbe Jump if below or equal jg jump if greater\uff0c\u6709\u7b26\u53f7\u5927\u4e8e\u8df3\u8f6c jl jump less\uff0c\u6709\u7b26\u53f7\u5c0f\u4e8e\u8df3\u8f6c jge jump if greater or equal jle Jump if less or equal jc jump if with carry, CF = 1 jnc jump if not with carry, CF = 0 je = jz jump if equal, ZF = 1 jne = jnz jump if not equal, ZF = 0 jz jump if zero, ZF = 1 jnz jump if not zero, ZF = 0 jcxz jump if cx equals zero js SF = 1 jns SF = 0 jo Jump if overflow, OF = 1 jno jump if not overflow, OF = 0 loop \u5faa\u73af \u4ee3\u7801\u6bb5\uff08\uff1f\uff09\u540d clc clear carry flag\uff0c\u5c06cf\u4f4d\u6e05\u96f6 stc set carry flag\uff0cCF\u7f6e1 cli clear interrupt endable flag\uff0cIF\u6e05\u96f6\uff0c\u5173\u95ed\u4e2d\u65ad sti set interrupt endable flag\uff0cIF\u7f6e\u4f4d1\uff0c\u6253\u5f00\u4e2d\u65ad CMC complement carry flag\uff0cCF\u53d6\u53cd CLD clear direction flag\uff0cDF\u6e05\u96f6 STD set interrupt endable flag\uff0cDF\u7f6e1 call \u8fd1\u8c03\u7528 ret \u8fd1\u8fd4\u56de call far ptr \u8fdc\u8c03\u7528\u3002\u4e09\u4e2apush\u4e00\u4e2ajmp\u3002push f\uff0cpush cs\uff0cpush ip\uff0cjump retf \u8fdc\u8fd4\u56de\u3002\u4e09\u4e2apop\u3002\u6307\u4ee4\u2f64\u6808\u4e2d\u7684\u6570\u636e\uff0c\u4fee\u6539CS\u548cIP\u7684\u5185\u5bb9\uff0c\u4ece\u2f7d\u5b9e\u73b0\u8fdc\u8f6c\u79fb int \u4e2d\u65ad\u6307\u4ee4 iret \u4e2d\u65ad\u8fd4\u56de jmp short \u6bb5\u5185\u77ed\u8f6c\u79fb\uff0c\u77ed\u662f\u6307\u8981\u8df3\u2f84\u7684\u2f6c\u6807\u5730\u5740\u4e0e\u5f53\u524d\u5730\u5740\u524d\u540e\u76f8\u5dee\u4e0d\u8d85\u8fc7128\u5b57\u8282 jmp near ptr \u6bb5\u5185\u8fd1\u8f6c\u79fb\u3002\u8fd1\u662f\u6307\u8df3\u8f6c\u7684\u2f6c\u6807\u5730\u5740\u4e0e\u5f53\u524d\u5730\u5740\u5728\u2f64\u2f00\u4e2a\u6bb5\u5185\uff0c\u5373CS\u7684\u503c\u4e0d\u53d8\uff0c\u53ea\u6539\u53d8EIP\u7684\u503c jmp far ptr \u6bb5\u95f4\u8f6c\u79fb\uff0c\u8fdc\u6307\u8df3\u5230\u53e6\u2f00\u4e2a\u4ee3\u7801\u6bb5\u53bb\u6267\u2f8f\uff0cCS/EIP\u90fd\u8981\u6539\u53d8 Jmp dword ptr \u6bb5\u95f4\u8f6c\u79fb\uff0c\u4ee5\u5185\u5b58\u5730\u5740\u5355\u5143\u5904\u7684\u53cc\u5b57\u6765\u4fee\u6539\u6307\u4ee4\uff0c\u2fbc\u5730\u5740\u5185\u5bb9\u4fee\u6539CS\uff0c\u4f4e\u5730\u5740\u5185\u5bb9 \u4fee\u6539IP\uff0c\u5185\u5b58\u5730\u5740\u53ef\u4ee5\u4ee5\u4efb\u4f55\u5408\u6cd5\u7684\u2f45\u5f0f\u7ed9\u51fa repe/renpe scasb \u5b57\u7b26\u4e32\u626b\u63cf\u6307\u4ee4\u3002cmp al, es:[di] di++; \u5f53DF=1\u65f6\uff0c\u4e3adi-- repne:\u5f53ECX!=0\u5e76\u4e14ZF==0\u65f6 \u91cd\u590d repe: cx != 0\u4e14zf != 0\u91cd\u590d repe/renpe cmpsb \u5b57\u7b26\u4e32\u6bd4\u8f83\u6307\u4ee4\u3002\u2f50\u8f83byte ptr ds:[si]\u4e0ebyte ptr es:[di] \u5f53DF=0\u65f6\uff0cSI++\uff0cDI++ \u5f53DF=1\u65f6\uff0cSI--\uff0cDI-- repne:\u5f53ECX!=0\u5e76\u4e14ZF==0\u65f6 \u91cd\u590d repe: cx != 0\u4e14zf != 0\u91cd\u590d rep movsb \u5b57\u7b26\u4e32\u79fb\u52a8\u6307\u4ee4\u3002\u5176\u4e2drep\u8868\u793arepeat\uff0cs\u8868\u793astring\uff0cb\u8868\u793abyte \u5728\u6267\u2f8f\u6b64\u6307\u4ee4\u524d\u8981\u505a\u4ee5\u4e0b\u51c6\u5907\u2f2f\u4f5c\uff1a \u2460ds:si lodsb \u5757\u88c5\u5165\u6307\u4ee4\uff0c\u628aSI\u6307\u5411\u7684\u5b58\u50a8\u5355\u5143\u8bfb\u5165\u7d2f\u52a0\u5668\uff0clodsb\u5c31\u8bfb\u5165ax\uff0clodsw\u5c31\u8bfb\u5165ax\uff0c\u7136\u540esi\u81ea\u52a8\u589e\u52a0\u6216\u51cf\u5c0f1\u62162 stosb/stosw/stosd SI\u6307\u5411\u7684\ud83d\udd17,\u5176\u4e2dLODSB\u662f\u8bfb\u5165AL, LODSW\u662f\u8bfb\u5165AX\u4e2d, \u7136\u540eSI\u81ea\u52a8\u589e\u52a0\u6216\u51cf\u5c0f1\u62162\u4f4d.\u5f53\u65b9\u5411\u6807\u5fd7\u4f4dDF=0\u65f6\uff0c\u5219SI\u81ea\u52a8\u589e\u52a0\uff1bDF=1\u65f6\uff0cSI\u81ea\u52a8\u51cf\u5c0f\u3002 rep stosb lodsb"},{"location":"CS/x86assm/#_13","title":"\u6570\u636e\u4f20\u9001\u6307\u4ee4","text":"

    \u6570\u636e\u4f20\u9001\u6307\u4ee4\u662f\u4e3a\u4e86\u5b9e\u73b0CPU\u548c\u5185\u5b58\uff0c\u8f93\u5165\u548c\u8f93\u51fa\u7aef\u53e3\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u9001\u3002

    mov

    mov eax, 56 // \u5c0656H\u4f20\u9001\u5230eax\u5bc4\u5b58\u5668\nmov esi, dword ptr [eax * 2 + 1]  // \u5c06\u5185\u5b58\u5730\u5740\u4e3aeax*2+1\u76844\u5b57\u8282\u6570\u636e\u4f20\u9001\u5230esi\u5bc4\u5b58\u5668\nmov ah, byte ptr [esi * 2 + eax]  // \u5c06\u5185\u5b58\u5730\u5740\u4e3aesi*+eax\u5904\u76848\u4f4d\u6570\u636e\u4f20\u9001\u5230AH\u5bc4\u5b58\u5668\n

    xchg

    \u5bc4\u5b58\u5668\u548c\u5185\u5b58\u7684\u6570\u636e\u4ea4\u6362\uff0c\u4ea4\u6362\u7684\u6570\u636e\u53ef\u4ee5\u662f8\u5b57\u8282\u300116\u5b57\u8282\u621632\u5b57\u8282\uff0c\u5fc5\u987b\u683c\u5f0f\u76f8\u540c

    xchg eax, edx; // \u5c06edx\u5bc4\u5b58\u5668\u7684\u503c\u548ceax\u5bc4\u5b58\u5668\u7684\u503c\u4ea4\u6362\nxchg [esp-55], edi; // \u5c06edi\u5bc4\u5b58\u5668\u7684\u503c\u548c\u5806\u6808\u5730\u5740\u4e3a[esp-55]\u5904\u7684\u503c\u4ea4\u6362\n

    push pop

    push\u548cpop\uff1a\u79f0\u4e3a\u538b\u5165\u5806\u6808\u6307\u4ee4\u548c\u5f39\u51fa\u5806\u6808\u6307\u4ee4\uff0c\u683c\u5f0f\u662fpush src(\u6e90\u64cd\u4f5c\u6570)\u548cpop dst(\u76ee\u7684\u64cd\u4f5c\u6570)\uff0cpush\u6307\u4ee4\u548cpop\u6307\u4ee4\u9700\u8981\u5339\u914d\u51fa\u73b0\uff0c\u5426\u5219\u5806\u6808\u4f1a\u4e0d\u5e73\u8861\u3002push\u6307\u4ee4\u5c06\u539f\u64cd\u4f5c\u6570src\u538b\u5165\u5806\u6808\uff0c\u540c\u65f6esp-4\uff08\u6808\u9876\u6307\u9488\u51cf\u4e00\u4e2a4\u4f4d\uff09\uff0c\u800cpop\u53cd\u4e4b\uff0c\u4ece\u5806\u6808\u7684\u9876\u90e8\u5f39\u51fa4\u5b57\u8282\u7684\u6570\u503c\u7136\u540e\u653e\u5165dst\u3002\u572832\u4f4d\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0cpush\u548cpop\u7684\u64cd\u4f5c\u662f\u4ee54\u5b57\u8282\u4e3a\u5355\u4f4d\u7684\uff0cpush\u548cpop\u6307\u4ee4\u5e38\u7528\u4e8e\u5411\u51fd\u6570\u4f20\u53c2\u3002

    push eax // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u4ee54\u5b57\u8282\u538b\u5165\u5806\u6808\uff0c\u540c\u65f6esp-4\npush dword ptr [12FF8589] // \u5c06\u5806\u6808\u9876\u90e8\u76844\u5b57\u8282\u5f39\u51fa\u5230\u5185\u5b58\u5730\u5740\u4e3a12FF8589\u6240\u6307\u5730\u65b9\uff0c\u540c\u65f6esp+4\n-----------------------------------------------------------------------------\npop dword ptr [12FF8589] // \u5c06\u5806\u6808\u9876\u90e8\u76844\u5b57\u8282\u5f39\u51fa\u5230\u5185\u5b58\u5730\u5740\u4e3a12FF8589\u6240\u6307\u7684\u5730\u65b9\uff0c\u540c\u65f6esp+4\npop eax // \u5c06\u5806\u6808\u9876\u90e8\u76844\u5b57\u8282\u5f39\u51fa\u5230eax\u5bc4\u5b58\u5668\uff0c\u540c\u65f6esp+4\n
    "},{"location":"CS/x86assm/#_14","title":"\u5730\u5740\u4f20\u9001\u6307\u4ee4","text":"

    x86\u67093\u6761\u5730\u5740\u4f20\u9001\u6307\u4ee4\uff0c\u5206\u522b\u662fLEA\uff0cLDS\u548cLES\u3002\u5176\u5b9eLDS\u548cLES\u6307\u4ee4\u548c\u6bb5\u5bc4\u5b58\u5668\u6709\u5173\uff0c\u572832\u4f4d\u7684windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4e00\u822c\u7684\u7a0b\u5e8f\u5458\u90fd\u4e0d\u9700\u8981\u7ba1\u7406\u6bb5\u5bc4\u5b58\u5668\uff0c\u6240\u4ee5\u76f8\u5bf9\u800c\u8a00\uff0cLDS\u548cLES\u5bc4\u5b58\u5668\u4f7f\u7528\u5f97\u6bd4\u8f83\u5c11\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u5e38\u89c1\u7684\u53ea\u6709LEA\u6307\u4ee4\u3002

    LEA

    \u79f0\u4e3a\u5730\u5740\u4f20\u9001\u6307\u4ee4\uff0c\u683c\u5f0f\u662f\u201cLEA DST, ADDR\u201d\u3002LEA\u5c06ADDR\u5730\u5740\u52a0\u8f7d\u5230DST\uff0c\u5176\u4e2dADDR\u53ef\u4ee5\u662f\u5185\u5b58\uff0c\u4e5f\u53ef\u4ee5\u662f\u5bc4\u5b58\u5668\uff0c\u800cDST\u5fc5\u987b\u662f\u4e00\u4e2a\u901a\u7528\u5bc4\u5b58\u5668\u3002

    lea eax, [12345678]; // \u6307\u4ee4\u6267\u884c\u540eeax\u5bc4\u5b58\u5668\u7684\u503c\u4e3a12345678H\nmov eax, [12345678]; // \u800cmov eax, [12345678] \u6307\u4ee4\u6267\u884c\u540eeax\u5bc4\u5b58\u5668\u7684\u503c\u4e3a\u5185\u5b58\u5730\u574012345678\u6307\u5411\u7684\u90a3\u4e2a\u6570\u503c\n// LEA\u6307\u4ee4\u53ef\u7528\u4e8e\u7b97\u6cd5\u8fd0\u7b97\nlea ecx, [ecx + eax*4];  // ecx = ecx + eax * 4\n// \u76f8\u5f53\u4e8e\u8ba1\u7b97\u51faecx+eax*4\u7684\u6570\u503c\uff0c\u5728[]\u91cc\u662f\u4e00\u4e2a\u5730\u5740\uff0clea\u53d6\u5730\u5740\u540e\u5c31\u53d6\u5230\u4e86\u8fd9\u4e2a\u6570\u503c\n
    "},{"location":"CS/x86assm/#_15","title":"\u7b97\u6570\u8fd0\u7b97\u6307\u4ee4","text":"

    80x86\u63d0\u4f9b\u4e868\u6761\u52a0\u51cf\u6cd5\u6307\u4ee4\uff0c4\u6761\u4e58\u9664\u6cd5\u6307\u4ee4\u3002

    ADD\uff1a\u52a0\u6cd5\u6307\u4ee4

    add eax, esi; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u52a0\u4e0aesi\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728eax\u7684\u5bc4\u5b58\u5668\u4e2d\nadd ebx, dword ptr[12345678] // \u5c06ebx\u5bc4\u5b58\u5668\u7684\u503c\u52a0\u4e0a\u5185\u5b58\u5730\u5740\u4e3a12345678\u6240\u5728\u76844\u5b57\u8282\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728ebx\u5bc4\u5b58\u5668\u4e2d\n// \u4e0d\u540c\u7684\u5e73\u53f0\u548c\u7f16\u8bd1\u5668\u4e2d\uff0cdword\u5360\u7528\u7684\u5b57\u8282\u6570\u4e0d\u540c\uff0c\u572832\u4f4d\u7684windows\u4e2d\u4e00\u4e2aword\u536016\u5b57\u8282\uff0cdword\u536032\u5b57\u8282\n// 64\u4f4d\u4e2d\u4e00\u4e2aword\u536032\u5b57\u8282\uff0cdword\u536064\u5b57\u8282\n

    sub \u51cf\u6cd5\u6307\u4ee4

    sub ecx, 4H; // \u5c06ecx\u5bc4\u5b58\u5668\u7684\u503c\u51cf\u53bb4H\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\nsub byte ptr[eax], ch; // \u5c06\u5185\u5b58\u5730\u5740\u4e3aeax\u6240\u6307\u5411\u7684\u6570\u636e\u7ed3\u6784\u6309\u5b57\u8282\u4e3a\u5355\u4f4d\u548cch\u5bc4\u5b58\u5668\u76f8\u51cf\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u6309\u5b57\u8282\u4e3a\u5355\u4f4d\u4fdd\u5b58\u5728eax\u6240\u6307\u5411\u7684\u4f4d\u7f6e\n

    inc\u52a01\u6307\u4ee4

    inc eax; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u52a01\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5b58\u653e\u5728\u539f\u6765\u7684\u5730\u65b9\n

    dec\u51cf1\u6307\u4ee4

    dec edx; // \u5c06dec\u5bc4\u5b58\u5668\u7684\u503c\u51cf1\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5b58\u653e\u5728\u539f\u6765\u7684\u5730\u65b9\n

    cmp\u6bd4\u8f83\u6307\u4ee4

    \u79f0\u6bd4\u8f83\u6307\u4ee4\u683c\u5f0f\u662f\u201dcmp oper1, oper2\u201d

    cmp\u6307\u4ee4\u5c06oper1\u51cf\u53bboper2\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4e0d\u4fdd\u5b58\uff0c\u53ea\u662f\u76f8\u5e94\u5730\u8bbe\u7f6e\u5bc4\u5b58\u5668eflags\u7684cf\uff0cpf\uff0czf\uff0caf\uff0csf\u548cof\u3002\u4e5f\u5c31\u662f\u8bf4\u53ef\u4ee5\u901a\u8fc7\u6d4b\u8bd5\u5bc4\u5b58\u5668eflags\u76f8\u5173\u7684\u6807\u5fd7\u503c\u5f97\u77e5cmp\u6267\u884c\u540e\u7684\u7ed3\u679c

    cmp eax, 56H; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u51cf\u53bb56H\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4e0d\u4fdd\u5b58\uff0c\u5e76\u4e14\u8bbe\u7f6e\u5bc4\u5b58\u5668eflags\u76f8\u5173\u7684\u6807\u5fd7\u4f4d\n

    neg

    neg\uff1a\u53d6\u8865\u6307\u4ee4\uff0c\u683c\u5f0f\u662fneg oper

    neg\u6307\u4ee4\u5c06oper\u64cd\u4f5c\u6570\u53d6\u53cd\uff0c\u7b80\u800c\u8a00\u4e4b\u5c31\u662f\u5c060\u51cf\u53bboper\u64cd\u4f5c\u6570\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5b58\u5728oper\u81ea\u8eab\u4e2d\u3002

    neg eax; \n

    mul imul

    \u65e0\u7b26\u53f7\u4e58\u6cd5\u6307\u4ee4\u548c\u6709\u7b26\u53f7\u4e58\u6cd5\u6307\u4ee4\u3002mul\u6307\u4ee4\u9690\u542b\u4e86\u4e00\u4e2a\u53c2\u52a0\u8fd0\u7b97\u7684\u64cd\u4f5c\u6570eax\u5bc4\u5b58\u5668\uff0c\u5c06eax\u5bc4\u5b58\u5668\u91cc\u7684\u503c\u4e58oper\uff0c\u7ed3\u679c\u4fdd\u5b58\u5728eax\u4e2d\u3002\u5982\u679c\u7ed3\u679c\u8d85\u8fc732\u4f4d\u5219\u9ad832\u4f4d\u4f7f\u7528edx\u5bc4\u5b58\u5668\u4fdd\u5b58\uff0ceax\u5bc4\u5b58\u5668\u4fdd\u5b58\u4f4e32\u4f4d\u3002

    mul edx; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u4e58\u4ee5edx\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\n

    div idiv

    \u9664\u6cd5\u6307\u4ee4\u548c\u6709\u7b26\u53f7\u9664\u6cd5\u6307\u4ee4\u3002

    div ecx; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u63094\u5b57\u8282\u4e3a\u5355\u4f4d\u9664\u4ee5ecx\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5546\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\uff0c\u4f59\u6570\u4fdd\u5b58\u5728edx\u5bc4\u5b58\u5668\u4e2d\u3002\ndiv word ptr [esp+36]; // \u5c06eax\u5bc4\u5b58\u5668\u7684\u503c\u6309word\u4e3a\u5355\u4f4d\u9664\u4ee5\u5806\u6808\u5730\u5740\u4e3aesp+36\u6240\u6307\u5411\u7684\u6570\u636e\uff0c\u5f97\u51fa\u7684\u7ed3\u679c\u5546\u4fdd\u5b58\u5728eax\u5bc4\u5b58\u5668\u4e2d\uff0c\u4f59\u6570\u4fdd\u5b58\u5728edx\u5bc4\u5b58\u5668\u4e2d\u3002\n
    "},{"location":"CS/x86assm/#80386","title":"\u9ad8\u7ea7\u8bed\u8a00\u4e2d\u7684\u6570\u636e\u7ed3\u6784\u4e0e80386\u95f4\u63a5\u5bfb\u5740","text":"

    BX BP SI DI

    BX\uff1a

    BP\uff1a

    SI\uff1a

    DI\uff1a

    \u95f4\u63a5\u5bfb\u5740\uff1abx\uff0cbp\uff0csi\uff0cdi\uff0c\u53ef\u4ee5\u653e\u5728\u65b9\u62ec\u53f7\u5185

    \u7f3a\u7701\u6bb5\u5740\uff1ads\u548css\uff0c\u5982\u679c\u65b9\u62ec\u53f7\u5185\u6709bp\uff0c\u4e00\u5b9a\u662fss\uff0cbx\u4e00\u5b9a\u662fds

    CS (code segment): \u4ee3\u7801\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u50a8\u4ee3\u7801\u6bb5\u7684\u6bb5\u5730\u5740\u3002

    DS (data segment)\uff1a\u6570\u636e\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u50a8\u6570\u636e\u6bb5\u7684\u6bb5\u5730\u5740\u3002

    SS (stack segment)\uff1a\u5806\u6808\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u50a8\u5806\u6808\u6bb5\u7684\u6bb5\u5730\u5740\u3002

    ES (extra segment)\uff1a\u9644\u52a0\u6570\u636e\u6bb5\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u5b58\u653e\u9644\u52a0\u6bb5\u7684\u6bb5\u5730\u5740\u3002\u6709\u65f6\uff0c\u4e00\u4e2a\u6570\u636e\u6bb5\u4e0d\u591f\u7528\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u58f0\u660e\u4e00\u4e2a\u9644\u52a0\u6bb5\u6765\u5b58\u653e\u66f4\u591a\u7684\u6570\u636e\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u58f0\u660e 2 \u4e2a\u6570\u636e\u6bb5\uff0c\u5206\u522b\u7528 DS \u548c ES \u6307\u5411\u3002

    \u7a0b\u5e8f\u5f00\u59cb\u8fd0\u884c\u65f6\uff0cDOS \u4f1a\u628a ds \u548c es \u8d4b\u503c\u4e3a psp(program segment prefix) \u6bb5\u5730\u5740\u3002psp \u6bb5\u4f4d\u4e8e\u7a0b\u5e8f\u9996\u4e2a\u6bb5\u7684\u524d\u9762\uff0c\u957f\u5ea6\u4e3a 100h \u5b57\u8282\uff0c\u5176\u7528\u9014\u662f\u4fdd\u5b58\u5f53\u524d exe \u76f8\u5173\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u5982 psp:80h \u5f00\u59cb\u5b58\u653e\u4e86 exe \u7684\u547d\u4ee4\u884c\u53c2\u6570\u3002

    \u95f4\u63a5\u5bfb\u5740\uff1a \u53ef\u4ee5\u2f64\u4f5c\u95f4\u63a5\u5bfb\u5740\u7684\u5bc4\u5b58\u5668\u53ea\u6709\u56db\u4e2a\uff1abx, bp, si, di [bx], [bp], [si], [di]\u662f\u6700\u7b80\u5355\u7684\u95f4\u63a5\u5bfb\u5740 [bx + si], [bp + si], [bx + di], [bp + di]\u6ce8\u610f\u524d\u2faf\u5fc5\u987b\u662fbx/bp\uff0c\u540e\u2faf\u5fc5\u987b\u662fdi/si [bx+2] [bp-2] [si+1] [di-1] [bx+si+2] [bx+di-2]

    [bp+si+1] [bp+di-1] tips\uff1a\u4e24\u4e2a\u5bc4\u5b58\u5668\u76f8\u52a0\u7684\u95f4\u63a5\u5bfb\u5740\u2f45\u5f0f\u4e2d, bx\u6216bp\u901a\u5e38\u2f64\u6765\u8868\u793a\u6570\u7ec4\u7684\u2fb8\u5730\u5740, \u2f7dsi\u6216di\u5219\u2f64\u6765\u8868\u793a\u4e0b \u6807\u3002

    \u7f3a\u7701\u6bb5\u5740\uff1a\u4e0d\u542bbp\u7684\u6e90\u64cd\u4f5c\u6570\u2f00\u822c\u90fd\u7701\u7565\u7684\u6bb5\u5730\u5740ds\uff0c\u542b\u6709bp\u7684\u6e90\u64cd\u4f5c\u6570\u7701\u7565\u4e86ss\uff0c\u2f7d\u8fd9\u4e2a\u9ed8\u8ba4\u7684\u6bb5\u5730\u5740\u662f \u53ef\u4ee5\u88ab\u6539\u53d8\u7684

    \u7528\u5806\u6808\u4f20\u9012\u53c2\u6570\u65f6\uff0c\u5982\u4f55\u7528[bp+]\u5b9e\u73b0\u5bf9\u53c2\u6570\u7684\u5f15\u7528\uff1f

    bp + \u591a\u5c11\u5c31\u662f\u6808\u91cc\u7684\u591a\u5c11

    \u738b\u723d\u300a\u6c47\u7f16\u8bed\u2f94\u300b\u7b2c\u56db\u7248 \u9644\u5f554:\u2f64\u6808\u4f20\u9012\u53c2\u6570

    difcube:\n    mov bp, sp\n    mov ax, [bp+4]  ;a\u7684\u503c\u9001\u5165ax\u4e2d\n    sub ax, [bp+6]  ;\u51cf\u6808\u4e2db\u7684\u503c\n    mov bp, ax\n    mul bp\n    mul bp\n    pop bp\n    ret 4\n
    "},{"location":"CS/x86assm/#_16","title":"\u5176\u5b83\u7684\u7b14\u8bb0","text":""},{"location":"CS/x86assm/#x86_1","title":"x86\uff1a","text":"

    Intel\u4ece16\u4f4d\u5fae\u5904\u7406\u56688086\u5f00\u59cb\u7684\u6574\u4e2aCPU\u82af\u7247\u7cfb\u5217\uff0c\u7cfb\u5217\u4e2d\u7684\u6bcf\u79cd\u578b\u53f7\u90fd\u4fdd\u6301\u4e0e\u4ee5\u524d\u7684\u5404\u79cd\u578b\u53f7\u517c\u5bb9\uff0c\u4e3b\u8981\u67098086\uff0c8088\uff0816\u4f4dCPU\uff09\uff0c80186\uff0c80286\uff08\u8fd9\u4e24\u4e2a\u662f\u8fc7\u6e21\u4ea7\u54c1\uff09\uff0c 80386\uff0c80486\u4ee5\u53ca\u4ee5\u540e\u5404\u79cd\u578b\u53f7\u7684Pentium\u82af\u7247\uff0832\u4f4dCPU\uff09\uff0c\u901a\u5e38\u6240\u8bf4\u7684x86\u90fd\u662f\u630732\u4f4dCPU

    80386: 32\u4f4d\u6c47\u7f16\u3002

    80836\u5bc4\u5b58\u5668

    \u901a\u7528\u5bc4\u5b58\u5668(EAX EBX ECX EDX,ESP,EBP,ESI,EDI)

    \u901a\u7528\u5bc4\u5b58\u5668\u4e0e8086\u7684\u5bc4\u5b58\u5668\u76f8\u6bd4,\u753116\u4f4d\u53d8\u4e3a\u4e8632\u4f4d

    ESP:\u6808\u9876

    EBP:\u6808\u5e95

    EAX\uff0cEBX\uff0cECX\uff0cEDX\u901a\u7528\u5bc4\u5b58\u5668

    EAX\uff1a\u7d2f\u52a0\u5668\uff08\u4e58\u6cd5\u7684\u65f6\u5019\u5b58\u4f4e\u4f4d\uff09

    EBX\uff1a\u57fa\u5740\uff08\uff3bEBX\uff0b100\uff28\uff3d\uff09

    ECX\uff1a\u8ba1\u6570\uff08\u5faa\u73af\u7684\u65f6\u5019\u8ba1\u6570\uff09

    EDX\uff1a\u6570\u636e\uff08\u9ed8\u8ba4EDX\uff0a10H\uff0b\uff0e\uff0e\uff0e\uff1b\u4e58\u6cd5\u7684\u65f6\u5019\u5b58\u9ad8\u4f4d\uff09

    ESI\uff0cEDI\uff1a\u53d8\u5740\u5bc4\u5b58\u5668

    ESI\uff1a\u6e90\u53d8\u5740\u5bc4\u5b58\u5668

    EDI\uff1a\u76ee\u7684\u53d8\u5740\u5bc4\u5b58\u5668\u3000\u4e0eEBX\u57fa\u5740\u642d\u914d\u4f7f\u7528

    "},{"location":"CS/x86assm/#_17","title":"\u53c2\u8003\u6587\u732e","text":"

    asm_sum.doc

    xxjj\u7684\u300a\u6c47\u7f16\u8bed\u8a00\u8003\u8bd5\u603b\u7ed3\u300b https://www.yuque.com/xianyuxuan/coding/mkte6u

    [80386]80x86\u6c47\u7f16\u6307\u4ee4_CarlosX\u7684\u535a\u5ba2-CSDN\u535a\u5ba2_80386\u6307\u4ee4\u96c6

    80386 \u7b97\u672f\u8fd0\u7b97\u6307\u4ee4\uff0c\u903b\u8f91\u8fd0\u7b97\u6307\u4ee4\uff0c\u79fb\u4f4d\u6307\u4ee4 (\u4e09) _ttzyanswer\u7684\u535a\u5ba2-CSDN\u535a\u5ba2

    "},{"location":"CS/CA/","title":"\u7d22\u5f15","text":"

    \u6253\u7b97\u7a0d\u5fae\u5199\u4e00\u70b9\u662f\u56e0\u4e3a\u81ea\u5df1\u5b66\u4f53\u7cfb\u7684\u65f6\u5019\u6ca1\u627e\u5230\u7279\u522b\u5b8c\u6574\u7b14\u8bb0\u8d44\u6599 + \u6ca1\u4e0a\u8ba1\u7ec4\uff0c\u81ea\u5df1\u5b8c\u5168\u6ca1\u7406\u89e3\uff0c\u5355\u7eaf\u786c\u80cc\u901f\u6210\u7684\uff0c\u8bb0\u4e00\u4e0b\u81ea\u5df1\u901f\u6210\u770b\u4e86\u54ea\u4e9b\u4e1c\u897f

    \u5f53\u7136\u9996\u5148\u82b1\u4e86\u4e24\u4e2a\u4e0b\u5348\u8fc7\u4e86\u4e00\u904d\u9a6c\u5fb7\u8ba1\u7ec4\u7684\u667a\u4e91 + xyx\u8ba1\u7ec4\u7b14\u8bb0\uff0c\u8fb9\u5b66\u8fb9\u52a8\u7b14

    \u8fd8\u6709\u6284 A4 \u7684\u89c4\u5212\u8bf7\u89c1\u6211 github \u90a3\u4e2a ZJU \u8d44\u6e90\u4ed3\u5e93

    \u53c2\u8003\u8d44\u6599

    "},{"location":"CS/CA/chap2/","title":"chap2: Memory Hierachy Design","text":""},{"location":"CS/CA/chap2/#_1","title":"\u76ee\u5f55","text":""},{"location":"CS/CA/chap2/#cache","title":"cache \u57fa\u7840\u6982\u5ff5","text":"

    \u8fd9\u5757\u5e38\u8003\u5927\u9898\uff0c\u6bd4\u5982\u8ba1\u7b97\u5730\u5740\u957f\u5ea6\uff0c\u8ba1\u7b97 AMAT\uff0c\u8ba1\u7b97 miss \u6b21\u6570\u7b49\u3002

    "},{"location":"CS/CA/chap2/#cache_1","title":"cache \u7684\u5206\u7c7b\u548c\u5730\u5740\u7684\u8ba1\u7b97\u65b9\u6cd5","text":"

    Warning

    \u8fd9\u4e2a\u8868\u8bb0\u4e0d\u6e05\u4e86\u6253\u7b97\u7b49\u4e0a\u8ba1\u7ec4\u518d\u8865\u3002

    \u7c7b\u522b \u89e3\u91ca \u6807\u8bb0\u9879\u7ed3\u6784 \u5730\u5740\u8ba1\u7b97 \u4f18\u70b9 \u7f3a\u70b9 direct-mapping \u76f4\u63a5\u6620\u5c04 fully associative \u5168\u5173\u8054 2^n-set associative 2^n\u8def\u7ec4\u5173\u8054 "},{"location":"CS/CA/chap2/#cache-write","title":"cache write \u7684\u5904\u7406\u65b9\u6cd5","text":"write \u7b56\u7565 \u89e3\u91ca \u7ecf\u5e38\u642d\u914d\u7684 write-miss \u7b56\u7565 \u89e3\u91ca write through \u6bcf\u6b21\u5199\u6570\u636e\u65f6\u65e2\u5199\u5728cache\u4e5f\u5199\u5728main memory\u3002\u597d\u5904\u662fcache\u548cmain memory\u603b\u662f\u4e00\u81f4\u7684\uff0c\u4f46\u662f\u5f88\u6162\u3002\u53ef\u4ee5\u901a\u8fc7\u5f15\u5165\u4e00\u4e2awrite buffer\u6765\u6539\u8fdb\u3002 write around\uff08\u4e5f\u53ebnon-allocate\uff09 \u8003\u8651\u5230\u65e2\u7136\u672c\u6765\u5c31\u8981\u53bb\u4e00\u6b21main memory\uff0c\u4e0d\u5982\u76f4\u63a5\u5199\u5728\u91cc\u9762\uff0c\u4e0d\u518d\u62ff\u5230cache\u91cc\u4e86\u3002 write back \u53ea\u5c06\u4fee\u6539\u540e\u7684\u5185\u5bb9\u653e\u5728cache\u91cc\uff0c\u8be5block\u8981\u88ab\u8986\u76d6\u7684\u65f6\u5019\u518d\u5199\u56de\u5185\u5b58\u3002\u8fd9\u79cd\u60c5\u51b5\u9700\u8981\u4e00\u4e2a\u989d\u5916\u7684dirty bit\u6765\u8bb0\u5f55\u8fd9\u4e2acache\u662f\u5426\u88ab\u66f4\u6539\u8fc7\uff0c\u4ece\u800c\u76f4\u5230\u88ab\u8986\u76d6\u524d\u662f\u5426\u9700\u8981\u88ab\u5199\u56de\u5185\u5b58\u3002 write allocate \u50cfread miss\u4e00\u6837\u5148\u628ablock\u62ff\u5230cache\u91cc\u518d\u5199\u5165"},{"location":"CS/CA/chap2/#cache-miss-3c","title":"cache miss \u7684\u79cd\u7c7b \uff08\u7b80\u79f0\u4e3a3C\uff09","text":"\u79cd\u7c7b \u89e3\u91ca compulsory miss \u51b7\u542f\u52a8\u5931\u914d\uff0c\u521a\u4e0a\u7535cache\u662f\u7a7a\u7684\uff0c\u6240\u4ee5\u4e0d\u8bba\u4ec0\u4e48\u8bbf\u95ee\u90fd\u8981miss\u4e00\u6b21\u3002cache\u8d8a\u5927compulsory miss\u8d8a\u591a\u3002 capacity miss cache\u5757\u7684\u5927\u5c0f\u4e0d\u6ee1\u8db3\u7a0b\u5e8f\u5c40\u90e8\u6027\u65f6\u53d1\u751f\u7684\u5931\u914d\uff0c\u79f0\u4e3a\u5bb9\u91cf\u5931\u914d\u3002cache\u5757\u5927\u5c0f\u589e\u5927\uff0c\u5bb9\u91cf\u5931\u914d\u7387\u51cf\u5c0f\uff0c\u4e0e\u5173\u8054\u5ea6\u65e0\u5173\u3002 conflict miss \u5728\u91c7\u7528\u7ec4\u5173\u8054\u548c\u76f4\u63a5\u6620\u50cf\u65b9\u5f0f\u7684cache\u4e2d\uff0c\u4e3b\u5b58\u7684\u5f88\u591a\u5757\u90fd\u6620\u5c04\u5230cache\u7684\u540c\u4e00\u5757\uff0c\u5982\u679c\u67d0\u5757\u672c\u6765\u5728cache\u4e2d\uff0c\u521a\u88ab\u66ff\u6362\u51fa\u53bb\uff0c\u53c8\u88ab\u8bbf\u95ee\u5230\u3002\u6709\u70b9\u50cf OS \u91cc\u9875\u66ff\u6362\u65f6\u8bb2\u5230\u7684\u201c\u6296\u52a8\u201d\u3002\u5173\u8054\u5ea6\u8d8a\u5927\uff0cConflict\u5931\u914d\u8d8a\u5c0f\u3002"},{"location":"CS/CA/chap2/#cache_2","title":"cache \u4f18\u5316\u65b9\u6cd5","text":"

    \u8fd9\u5757\u5e38\u8003\u9009\u62e9\u3002

    \u603b\u7ed3\u6027\u7684\u56fe

    \u63a5\u4e0b\u6765\u5177\u4f53\u8bb2\u89e3\u6bcf\u4e00\u79cd\u4f18\u5316\u65b9\u6cd5\u3002

    \u9996\u5148\u56db\u5927\u7c7b\u4f18\u5316\u7684\u601d\u8def\u662f\u5982\u4f55\u4ea7\u751f\u7684\uff1f\u6765\u81ea\u4e8e\u8861\u91cf\u5185\u5b58\u6027\u80fd\u7684\u516c\u5f0f\uff1a

    \\[ Average\\space Memory\\_access\\space Time\\space (AMAT) = Hit\\_time + Miss\\_rate \\times Miss\\_penalty \\]

    \u9996\u5148\u8fd9\u4e2a\u516c\u5f0f\u7684\u610f\u601d\u662f\uff0c\u5f53 CPU \u9700\u8981\u5185\u5b58\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u8bbf\u95ee\u65f6\u95f4\u7684\u8ba1\u7b97\u65b9\u6cd5\u662f\uff1a - \u5982\u679c\u5728 cache \u91cc\u627e\u5230\u4e86\uff0c\u5373\u53d1\u751f cache hit\uff0c\u90a3\u4e48\u9700\u8981\u7684\u65f6\u95f4\u53ea\u6709 cache \u7684\u8bbf\u95ee\u7528\u65f6\u5373hit_time\u3002 - \u5982\u679c\u5728 cache \u91cc\u6ca1\u627e\u5230\uff08\u6b64\u65f6\u5df2\u7ecf\u7528\u4e86\u4e00\u4e2a hit_time\uff0c\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48 hit_time \u662f 100% \u8981\u7528\u6389\u7684\uff09\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u53bb\u5185\u5b58\u91cc\u627e\uff0c\u53bb\u5185\u5b58\u91cc\u627e\u7684\u7528\u65f6\u662f\u8fd9\u79cd\u60c5\u51b5\u6240\u5360\u7684\u767e\u5206\u6bd4 miss_rate \u4e58\u4e0a\u53bb\u5185\u5b58\u91cc\u627e\u4e00\u6b21\u7684\u8017\u65f6 miss_penalty\u3002

    Note

    \u5f53\u7136\u9898\u76ee\u91cc\u8fd8\u53ef\u80fd\u4f1a\u8bf4 \"cache \u548c memory \u662f\u540c\u65f6\u8bbf\u95ee\u7684\"\uff0c\u610f\u601d\u5c31\u662f cache \u548c memory \u4e00\u8d77\u627e\uff0c\u5982\u679c cache \u91cc\u627e\u5230\u4e86\uff0c\u5c31\u628a memory \u8bbf\u95ee\u6390\u6389\uff0c\u8fd9\u6837\u5728 miss \u7684\u60c5\u51b5\u4e0b\u662f\u6bd4\u5148\u5728 cache \u91cc\u627e\u5b8c\u518d\u53bb memory \u627e\u66f4\u5feb\u7684\u3002\u8fd9\u6837\u7684\u6761\u4ef6\u4e0b\u8ba1\u7b97 AMAT \u5c31\u9700\u8981\u628a hit_time \u4e58\u4e0a\u4e00\u4e2a hit_rate\uff0c\u4e0d\u518d\u662f 100% \u7528\u6389\u4e86\u3002

    \u603b\u4e4b\uff0cAMAT \u7684\u8868\u8fbe\u5f0f\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u4e09\u79cd\u4f18\u5316\u7684\u5927\u65b9\u5411\uff0c\u5373 (1)\u964d\u4f4e hit_time (2)\u51cf\u5c0f miss_rate (3)\u51cf\u5c0f miss_penalty\u3002\u6b64\u5916\u8fd8\u6709\u4e00\u4e2a\u5927\u65b9\u5411\u53eb (4)\u505a\u5e76\u884c\u7684 cache\uff0c\u5728\u6709\u7684\u8001\u5e08\u7684 PPT \u91cc\u7b2c(4)\u9879\u597d\u50cf\u4f1a\u62c6\u51fa\u4e24\u7c7b\u6765\u8bb2\uff0c\u4e0d\u8fc7\u6211\u4eec\u8fd9\u91cc\u5c31\u6309\u603b\u5171\u56db\u79cd\u5927\u65b9\u5411\u6765\u5199\uff0c\u8ddf\u56fe\u4e00\u81f4\uff0c\u6bd4\u8f83\u8212\u670d\u3002

    "},{"location":"CS/CA/chap2/#miss-penalty","title":"Miss Penalty","text":"

    Multilevel Caches

    \u7ecf\u5178\u7684\u5185\u5b58\u6a21\u578b\u662f

    \u5c0f/\u5feb <---------------> \u5927/\u6162\n[\u5bc4\u5b58\u5668] - [cache] - [\u5185\u5b58] - [\u5916\u5b58]\n

    \u8fd9\u4e2a\u65b9\u6cd5\u662f\u628a\u5b83\u53d8\u6210

    \u5c0f/\u5feb <---------------> \u5927/\u6162\n[\u5bc4\u5b58\u5668] - [\u5c0fcache] - [\u5927cache] - [\u5185\u5b58] - [\u5916\u5b58]\n
    \u6bd4\u5982\u5c0f cache \u6ca1\u627e\u5230\u7684\u5148\u4ece\u5927 cache \u627e\uff0c\u5927 cache \u6ca1\u627e\u5230\u7684\u518d\u53bb\u5185\u5b58\u627e\u3002\u6b64\u7c7b\u53ef\u80fd\u51fa AMAT \u7684\u8ba1\u7b97\u9898\uff0c\u628a\u5404\u79cd rate \u62ce\u6e05\u4ee5\u540e\u5c31\u50cf\u4f55\u8001\u5e08\u8bf4\u7684\u201c\u5f53\u6210\u521d\u4e2d\u7269\u7406\u9898\u505a\u5c31\u884c\u201d\u3002

    Early Resart & Critical Word 1st

    \u4f17\u6240\u5468\u77e5\uff08\u81f3\u5c11\u4f60\u73b0\u5728\u77e5\u9053\u4e86\uff09cache \u7684\u4e00\u4e2a block \u7ecf\u5e38\u662f\u542b\u6709\u591a\u4e2a word \u7684\uff08\u4f60\u53ef\u80fd\u4f1a\u604d\u7136\u5927\u609f\u6709\u4e9b\u9898\u76ee\u91cc\u8bf4\u7684\u201ccache \u6309 word \u7f16\u5740\u201d\u662f\u4ec0\u4e48\u610f\u601d\uff09\uff0c\u800c block \u5f80\u5f80\u662f\u5927\u4e8e cache \u548c\u5185\u5b58\u4e4b\u95f4\u7684\u6570\u636e\u7ebf\u4f4d\u5bbd\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u60f3\u8981\u66ff\u6362\u4e00\u4e2a block\uff0c\u9700\u8981\u5728 cache \u548c\u5185\u5b58\u4e4b\u95f4\u4f20\u9001\u597d\u51e0\u8d9f\u624d\u80fd\u628a\u4e00\u4e2a block \u66ff\u6362\u5b8c\u3002

    \u4f46\u662f miss \u53d1\u751f\u65f6 CPU \u9700\u8981\u7684\u53ef\u80fd\u53ea\u6709\u4e00\u4e2a word\uff0c\u90a3\u4e48\u53ef\u4ee5\u5148\u628a CPU \u9700\u8981\u7684\u8fd9\u4e2a word \u5199\u56de\u6765\uff0c\u8ba9 CPU \u5148\u7ee7\u7eed\u8dd1\u8d77\u6765\uff0c\u5728 CPU \u7ee7\u7eed\u8dd1\u7684\u540c\u65f6\u518d\u628a\u5269\u4e0b\u7684 word \u5199\u8fdb cache\u3002

    Priority to Read Miss

    \u5728\u4f7f\u7528 write buffer \u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u679c write \u7684\u6570\u636e\u5f88\u5feb\u5c31\u8981 read\uff0c\u53ef\u4ee5\u5148\u4e0d\u5c06 buffer \u7684\u6570\u636e\u5199\u8fdb\u5185\u5b58\uff0c\u800c\u662f\u7b49\u5230read\u7684\u65f6\u5019\u76f4\u63a5\u4ecebuffer\u91cc\u8bfb\uff0c\u8bfb\u591a\u6b21\u4e4b\u540e\u518d\u4e00\u6b21\u4ecebuffer\u91cc\u5199\u5185\u5b58\u3002

    \u5176\u4e2d\uff0cwrite buffer \u662f\u4e00\u4e2a\u53ef\u4ee5\u8bbe\u5728 cache \u548c\u5185\u5b58\u4e4b\u95f4\u7684\u7ed3\u6784\uff0c\u610f\u601d\u662f\uff0c\u5047\u8bbe\u5185\u5b58\u53ea\u6709\u4e00\u4e2a\u8bfb\u5199\u7aef\u53e3\uff0c\u5199\u5165\u5185\u5b58\u975e\u5e38\u6162\uff0c\u90a3\u4e48 cache \u53ef\u4ee5\u5c06\u9700\u8981\u5199\u5230\u5185\u5b58\u7684\u4e1c\u897f\u5148\u642c\u5230 write buffer \u91cc\uff0c\u7136\u540e cache \u5148\u8dd1\u7740\uff0c\u5185\u5b58\u53bb\u6162\u6162\u5199\u5165\u3002

    Merging Write Buffer

    \u540c\u6837\u662f\u4f7f\u7528 write buffer \u7684\u60c5\u51b5\u3002merging write buffer \u5c31\u662f\u5c06\u5728\u591a\u884c\u53ef\u4ee5\u4e00\u6b21\u5199\u56de\u7684\u5185\u5bb9\u5408\u5e76\u5230\u4e00\u884c\uff0c\u4ee5\u53ef\u4ee5\u4e00\u6b21\u5199\u56de\u3002write buffer \u7684\u5185\u5bb9\u662f\u6309 byte \u7f16\u5740\u7684\uff0c\u4f46\u5185\u5b58\u6570\u636e\u7ebf\u4f4d\u5bbd\u4e00\u822c\u5927\u4e8e byte\uff0c\u6bd4\u5982\u4e00\u6b21\u53ef\u4ee5\u5199\u56de\u4e00\u6574\u4e2a word\uff0c\u90a3\u4e48\u5047\u5982 write buffer \u91cc\u73b0\u5728\u6709\u56db\u884c mem[200], mem[400], mem[208], mem[408]\uff0c\u5199\u56de\u5185\u5b58\u5c31\u9700\u8981\u56db\u6b21\u3002\u4f46\u662f\u5982\u679c\u6211\u4eec\u628a\u5728\u540c\u4e00\u4e2a word \u91cc\u7684 byte \u5408\u5e76\u4e00\u4e0b\uff0c\u53d8\u6210 mem[200] mem[208] \u548c mem[400] mem[408] \u4e24\u884c\uff0c\u4e24\u6b21\u5199\u56de\uff0c\u5c31\u4f1a\u53d8\u5feb\u3002

    Victim Caches

    \u662f\u4e00\u79cd\u51cf\u5c11 conflict miss \u7684\u65b9\u6cd5\uff0c\u5373\u66ff\u6362\u51fa\u53bb\u7684\u9875\u5148\u653e\u8fdb\u8fd9\u4e2a victim cache \u7ed3\u6784\u3002victim cache \u4e0e cache \u662f\u5168\u76f8\u5173\u7684\uff0c\u6709\u70b9\u50cf\u4e00\u4e2a\u4e8c\u7ea7 cache\uff0c\u662f\u4e00\u4e2a\u6bd4\u4e00\u7ea7 cache \u6162\u7684 cache\u3002\u8fd9\u6837\u5982\u679c\u53d1\u751f conflict miss\uff0c\u4ece\u8fd9\u4e2a victim cache \u91cc\u53d6\u6570\u636e\u6bd4\u4ece\u5185\u5b58\u91cc\u53d6\u66f4\u5feb\u3002

    "},{"location":"CS/CA/chap2/#miss-rate","title":"Miss Rate","text":"

    \u8fd9\u4e00\u680f\u7684\u524d\u4e09\u4e2a\u65b9\u6cd5\u90fd\u4e0d\u662f\u5f88\u806a\u660e\uff0c\u672c\u8d28\u4e0a\u662f\u5728 cache \u7684\u4e09\u79cd\u8bbe\u8ba1\u65b9\u6cd5\u4e2d\u53bb\u6743\u8861\uff0c\u800c\u6211\u4eec\u77e5\u9053 cache \u7684\u4e09\u79cd miss \u8fd8\u662f\u6b64\u6d88\u5f7c\u957f\u7684\uff0c\u54ea\u4e00\u79cd\u8bbe\u8ba1\u65b9\u6cd5\u90fd\u4e0d\u80fd\u5b8c\u7f8e\u89e3\u51b3\u3002\u4e0d\u8fc7\u6574\u4f53\u800c\u8a00\uff0cfrom \u738b\u9053\u8ba1\u7ec4\uff0c\u4f7f\u7528\u5408\u9002\u7684 2^n \u8def\u7ec4\u5173\u8054\u65f6\uff0c\u6700\u597d\u7684\u60c5\u51b5\u80fd\u591f\u51e0\u4e4e\u517c\u5177\u76f4\u63a5\u6620\u5c04\u7684\u6548\u7387\u548c\u5168\u5173\u8054\u7684\u547d\u4e2d\u7387\u3002

    Larger Block Size

    \u628a cache \u7684\u6bcf\u4e2a\u5757\u8bbe\u8ba1\u5f97\u66f4\u5927\uff0c\u8fd9\u6837\u6bcf\u4e2a\u5757\u5b58\u5f97\u4e1c\u897f\u591a\u4e86\uff0c\u5f53\u7136 miss_rate \u5c31\u4e0b\u964d\u3002\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0cmiss_penalty \u4e0a\u5347\u4e86\uff0c\u56e0\u4e3a\u5199\u8d77\u6765\u53d8\u6162\u4e86\u3002

    Larger Cache Size

    \u628a cache \u7684\u5757\u6570\u589e\u591a\uff0c\u8fd9\u6837\u5b58\u5f97\u4e1c\u897f\u4e5f\u591a\u4e86\uff0cmiss_rate \u5c31\u4e5f\u4e0b\u964d\u3002\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0c\u51b7\u542f\u52a8 compulsory miss \u4e0a\u5347\u4e86\uff1b\u5982\u679c\u4e0d\u662f\u76f4\u63a5\u6620\u5c04\uff0c\u67e5\u627e\u65f6\u95f4\u4e5f\u4e0a\u5347\u4e86\u3002

    Higher Associativity

    \u63d0\u5347\u7ec4\u5173\u8054\u6570\uff0c\u8fd9\u6837\u51cf\u5c11 cache \u91cc\u9762\u7684\u4e1c\u897f\u88ab\u66ff\u6362\u51fa\u53bb\u7684\u6982\u7387\uff0c\u51cf\u5c11 conflict miss\u3002\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0c\u67e5\u627e\u65f6\u95f4\u589e\u52a0\u3002

    Way-predicting Cache

    \u5728\u7ec4\u5173\u8054\u8bbe\u8ba1\u4e2d\uff0c\u4f7f cache \u5177\u6709\u9884\u6d4b\u9700\u8981\u67e5\u627e\u7684 tag \u7684\u80fd\u529b\u3002\u56e0\u4e3a\u53bb\u67e5\u9700\u8981\u7684\u6570\u636e\u5728\u7ec4\u91cc\u54ea\u4e2a tag \u6bd4\u8f83\u6162\uff0c\u6240\u4ee5\u5148\u731c\u4e00\u4e2a tag \u5728 cache \u91cc\u627e\u7740\uff0c\u7b49 tag \u51c6\u5907\u597d\u540e\u5982\u679c\u731c\u5bf9\u4e86\uff0c\u90a3\u4e48\u8282\u7ea6\u4e86\u65f6\u95f4\uff0c\u5c31\u53ef\u4ee5\u76f4\u63a5 hit\u3002

    Pseudo-associative Caches

    \u65e2\u662f\u76f4\u63a5\u6620\u5c04\u53c8\u662f\u7ec4\u5173\u8054\u6620\u5c04\u7684 cache\u3002\u9996\u5148\u628a cache \u5f53\u4f5c\u4e00\u4e2a\u76f4\u63a5\u6620\u5c04 cache\uff0c\u7b2c\u4e00\u6b21\u67e5\u7684\u65f6\u5019\u5c31\u8fd9\u4e48\u67e5\uff0c\u6700\u5feb\u3002\u4f46\u662f\u8fd9\u79cd cache \u53c8\u540c\u65f6\u662f\u4e00\u4e2a\u7ec4\u5173\u8054\u6620\u5c04\uff0c\u5728 cache \u5757\u4e2d\u653e\u4e00\u4e2a\u989d\u5916\u7684\u6807\u5fd7\u8868\u793a\u4e0e\u4e4b\u5173\u8054\u7684\u5176\u5b83\u5757\uff0c\u5982\u679c miss \u4e86\u518d\u53bb\u67e5\u8fd9\u4e9b\u5757\u3002\u8fd9\u6837\u6709\u4e00\u4e2a\u5c0f\u7684 hit_time \u548c2^n - 1\u4e2a\u5927\u7684 pseudo_hit_time\uff0c\u4f46\u662f\u5e73\u5747\u6765\u8bf4 miss_rate \u6bd4\u76f4\u63a5\u6620\u5c04\u5c0f\uff0chit_time \u6bd4\u7ec4\u5173\u8054\u6620\u5c04\u5c0f\u3002

    Compiler Techniques Reduce Cache Misses

    \u7528\u8f6f\u4ef6\u65b9\u6cd5\uff0c\u4f18\u5316\u4ee3\u7801\u3002\u8fd9\u91cc\u6709\u56db\u4e2a\u4f8b\u7a0b\uff0c\u5206\u522b\u53eb Merging Arrays, Loop Interchange, Blocking, \u548c Loop Merging\u3002\u7b80\u5355\u7684\u76f4\u63a5\u7528\u6587\u5b57\u63cf\u8ff0\u4e86\u3002

    Merging Arrays

    \u6bd4\u5982\u6211\u4eec\u9700\u8981\u8bbf\u95ee\u7684\u662fa[100], b[100], \u5728\u540c\u4e00\u4e2a\u5faa\u73af\u91cc\u8fde\u7eed\u8bbf\u95eea[i] b[i]\u5373\u4e0b\u6807\u76f8\u540c\u7684\u9879\uff0ccache\u5982\u679c\u4e00\u6b21\u6027\u653e\u4e0d\u4e0b\u4e24\u4e2a\u6570\u7ec4\uff0c\u5c31\u4f1a\u4e24\u4e2a\u6570\u7ec4\u4ea4\u66ff\u4ece\u5185\u5b58\u91cc\u53d6\u51fa\u6765\u653e\u5230cache\u91cc\u3002\u8fd9\u65f6\u5019\u53ef\u4ee5\u8bbe\u8ba1\u6210\u4e00\u4e2a\u7ed3\u6784\u4f53\u6570\u7ec4struct ab { a[100], b[100] }\uff0c\u8fd9\u6837 cache \u53ef\u4ee5\u628a a \u548c b \u76f8\u90bb\u5730\u62ff\u8fdb\u6765\u3002\u51cf\u5c11miss\u3002

    Loop Interchange

    e.g.

    /* Before: \u5916\u884c\u5185\u5217\uff0c\u4e00\u884c\u53ef\u4ee5\u4e00\u6b21\u88ab\u653e\u8fdb\u5185\u5b58 */\nfor (k = 0; k < 100; k = k+1)\nfor (j = 0; j < 100; j = j+1)\nfor (i = 0; i < 5000; i = i+1)\nM[i][j] = 2 * M[i][j];\n/* After: \u5916\u5217\u5185\u884c */\nfor (k = 0; k < 100; k = k+1)\nfor (i = 0; i < 5000; i = i+1)\nfor (j = 0; j < 100; j = j+1)\nM[i][j] = 2 * M[i][j];\n

    \u4fee\u6539\u540e\u7684cache\u547d\u4e2d\u7387\u53d8\u9ad8\u4e86\uff0c\u56e0\u4e3a\u4ea4\u6362\u540e\u5bf9\u5185\u5b58\u7684\u8bbf\u95ee\u662f\u8fde\u7eed\u7684\u3002\u4e00\u822c\u662f\u884c\u5bf9\u9f50\u7684\uff0c\u6700\u4f4e\u7ef4\u662f\u76f8\u90bb\u7684\u3002

    Blocking

    \u9002\u5f53\u62c6\u5206\u8fd0\u7b97\uff0c\u4ee5\u914d\u5408cache\u5927\u5c0f\u3002e.g. \u77e9\u9635\u76f8\u4e58\u4f8b\u5b50\u3002

    /* Before */\nfor (i = 0; i < N: i += 1)\nfor (j = 0; j < N; j += 1) {\nr = 0;      for (k = 0; k < N; k +=1 )\nr = r + y[i][k] * z[k][j];  }\n/* After */\nfor (jj = 0 ; jj < N; jj = jj+B)\nfor (kk = 0; kk < N; kk = kk +B) {\n// ...\u8bb0\u4e0d\u6e05\u4e86\nfor (ii = 0; ii < B; ii ++) {\n// \u603b\u4e4b\u8fd9\u4e2a\u5185\u5c42\u5faa\u73af\u53ea\u5904\u7406\u4e00\u4e2a B * B \u7684 block\uff0c\u5176\u4e2d block \u662f cache \u80fd\u653e\u4e0b\u7684\u5927\u5c0f\n}\n}\n
    \u90a3\u4e48\u4f18\u5316\u524d cache \u9700\u8981\u66ff\u6362\u66f4\u591a\u6b21\uff0c\u56e0\u4e3a\u4e0d\u8bba\u662f\u884c\u5faa\u73af\u8fd8\u662f\u5217\u5faa\u73af\uff0c\u8d85\u8fc7 B \u4e4b\u540e cache \u90fd\u8981\u91cd\u65b0\u5199\u4e00\u904d\u3002\u7136\u540e\u4e0b\u6b21\u5199\u5230\u8fd9\u4e2a block \u65f6\u518d\u6362\u8fdb\u6765\u4e00\u6b21\u3002

    \u4f18\u5316\u540e\u6bcf\u6b21\u5bf9\u6bcf\u4e00\u4e2a block \u4e00\u6b21\u6027\u5b8c\u6210\u64cd\u4f5c\u3002

    Loop Merging

    \u6bd4\u5982\u6709\u4e24\u4e2a\u5faa\u73af\u7684\u5faa\u73af\u8d77\u6b62\u6761\u4ef6\u4e00\u6837\uff0c\u90a3\u4e48\u5c31\u4e0d\u8981\u5f00\u4e24\u4e2a\u5faa\u73af\u4e86\uff0c\u5408\u5e76\u5230\u4e00\u4e2a\u5faa\u73af\u91cc\u5b8c\u6210\u3002

    "},{"location":"CS/CA/chap2/#parallelism","title":"Parallelism","text":"

    Non-blocking Caches

    cache miss\u65f6, \u7b49\u5f85\u5185\u5b58\u5199\u56de\u65f6\u7ee7\u7eed\u505a\u522b\u7684\u6ca1\u6709\u51b2\u7a81\u7684\u4e8b\u60c5\uff0c\u4e0d\u5fc5\u8981\u8ba9\u6240\u6709\u7684\u8d44\u6e90\u90fd\u7b49\u5f85\u5185\u5b58\u3002\u53ef\u4ee5\u8ba9\u522b\u7684\u5757\u5148\u5b8c\u6210\u522b\u7684\u6307\u4ee4\u7684\u9700\u6c42\u3002\u6bd4\u5982\u5728\u5904\u7406write miss\u7684\u65f6\u5019\uff0c\u5141\u8bb8\u5904\u7406read hit\u3002

    \u4e3b\u8981\u7528\u4e8eout of order\uff08\u4e71\u5e8f\uff09\u7684\u5904\u7406\u5668\u4e0a\u3002

    ppt \u7ed9\u7684\u5b9a\u4e49\u662f\uff1aallows cache to continues to supply hits while processing read misses (hit under miss, hit under multiple miss)

    Hardware Prefetching of Instr/Data

    \u53ef\u4ee5\u7531\u786c\u4ef6\u63a7\u5236\u6570\u636e\u9884\u53d6\uff0c\u4e00\u79cd\u7c7b\u4f3c branch-prediction \u7684\u505a\u6cd5\u3002\u9884\u6d4b\u5e76\u63d0\u524d\u53d6\u51fa\u53ef\u80fd\u9700\u8981\u7528\u5230\u7684\u6570\u636e\u653e\u5230cache\u91cc\u3002

    \u4f7f\u7528prefetching\u7684\u524d\u63d0\u662f\u6307\u4ee4\u662f\u5e76\u884c\u7684\uff0ccache \u4e5f\u662f non-blocking \u7684\u3002

    Compiler Controlled Prefetching

    \u4e0a\u9762\u4e00\u6761\u9884\u53d6\u65b9\u6cd5\uff0c\u4e5f\u53ef\u4ee5\u7531\u7a0b\u5e8f\u5458\u548c\u7f16\u8bd1\u5668\u624b\u52a8\u6307\u5b9a\u54ea\u4e9b\u5185\u5bb9\u5e94\u8be5\u88ab\u653e\u5230cache\u3002

    "},{"location":"CS/CA/chap2/#hit-time","title":"Hit Time","text":"

    Small & Simple Caches

    \u6bd4\u5982\u5c31\u9488\u5bf9 cache \u672c\u8eab\uff0c\u51cf\u5c0f cache \u7684\u590d\u6742\u5ea6\u4ee5\u51cf\u5c0f\u7ec4\u5408\u903b\u8f91\u7684\u5ef6\u8fdf\u3002\u5f53\u7136\u7531\u4e8e\u6211\u4eec\u4e4b\u524d\u8ba8\u8bba\u8fc7\u7684 cache \u4e09\u4e2a\u6307\u6807\u7684\u76f8\u4e92\u5236\u7ea6\uff0c\u662f\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5176\u5b83\u4e24\u4e2a\u6307\u6807\u53d8\u4e0d\u597d\u7684\u3002

    Avoiding Address Translation

    \u8fd9\u91cc\u9700\u8981\u5206\u522b\u56de\u5fc6\u4e00\u4e0b cache \u6807\u8bb0\u4f4d\u7684\u7ed3\u6784\u548c OS \u91cc\u7684\u9875\u8868\u9879\u3002\u4e00\u822c\u672c\u8bfe\u7a0b\u4e2d\u4f7f\u7528\u7684 cache \u8bbe\u8ba1\u89c4\u5219\u90fd\u662f \"physically tagged, virtually indexed\"(PTVI)\uff0c\u610f\u601d\u662f\uff0c\u7528\u4e8e\u67e5\u627e cache block \u7684 tag \u6574\u4e2a\u5168\u90fd\u5728 page offset \u91cc\uff0c\u8fd9\u5757 offset \u5b57\u6bb5\u5bf9\u4e8e\u865a\u62df\u5730\u5740\u548c\u7269\u7406\u5730\u5740\u6765\u8bf4\u662f\u5b8c\u5168\u4e00\u6837\u7684\uff0c\u53ea\u6709 page number \u9700\u8981\u9001\u8fdb tlb \u53bb\u5bfb\u627e\u7269\u7406\u5e27\u53f7\u3002\u5982\u56fe\u3002

    \u5982\u679c\u4e4b\u524d\u7684\u505a\u6cd5\u662f cache \u7b49\u5230\u7269\u7406\u5e27\u53f7\u627e\u51fa\u6765\u3001\u5730\u5740\u7ffb\u8bd1\u5b8c\u518d\u53bb\u67e5\u627e\uff0c\u5c31\u592a\u6162\u4e86\u3002\u65e2\u7136 tag \u4e0d\u7528\u7b49\u5230\u5730\u5740\u7ffb\u8bd1\u5c31\u80fd\u62ff\u5230\uff0c\u53ef\u4ee5\u4f7f\u5730\u5740\u7ffb\u8bd1\u548c cache \u67e5\u627e\u540c\u65f6\u8fdb\u884c\u3002

    Pipelined Cache Access

    \u56e0\u4e3a cache management unit \u7684\u64cd\u4f5c\u5206\u4e3a\u597d\u591a\u6b65\uff0c\u53ef\u4ee5\u628a\u6bcf\u6b65\u53bb\u50cf\u6d41\u6c34\u7ebf\u4e00\u6837\u5e76\u884c\u3002\u7f3a\u70b9\u662f\u4f1a\u589e\u52a0\u7cfb\u7edf\u5f00\u9500\uff0c\u5bfc\u81f4 hit_time \u589e\u52a0\uff0c\u4f46\u662f\u597d\u5904\u662f\u524d\u9762\u7684\u6307\u4ee4 miss \u65f6\uff0c\u4e0b\u4e00\u6761\u6307\u4ee4\u53ef\u4ee5\u5e76\u884c\u3002

    Multi-banked Cache

    \u5c06\u591a\u8def\u7ec4\u5173\u8054\u7684\u6bcf\u4e00\u8def\u7684\u67e5\u627e\u5e76\u884c\u3002

    ppt \u7ed9\u7684\u5b9a\u4e49\u662f\uff1acache is divided into independent banks that can support simultateous accesses like interleaved memory banks.

    Trace Cache

    \u6838\u5fc3\u903b\u8f91\u662f\u7f13\u5b58\u903b\u8f91\u4e0a\u7684\u6307\u4ee4\u6d41\uff0c\u800c\u4e0d\u662f\u7f13\u5b58\u7269\u7406\u5730\u5740\u7684\u6307\u4ee4\u6d41\uff0c\u4ece\u800c\u52a0\u5feb\u6307\u4ee4\u7684\u9884\u53d6\u3002\u6bd4\u5982\u5206\u652f\u6307\u4ee4\u4e2d\u4e0d\u53bb\u9884\u6d4b\u91cc cache \u4e0d\u4f1a\u547d\u4e2d\u7684\u5206\u652f\uff0c\u8fd9\u6837\u8282\u7701\u4e86 cache \u7a7a\u95f4\uff0c\u4e5f\u8ba9\u76f8\u90bb\u7684\u6307\u4ee4\u5728 cache \u4e2d\u4e5f\u76f8\u90bb\u3002\u6211\u7684\u7406\u89e3\u5b83\u7684\u610f\u601d\u662f\u628a prediction \u7684\u529f\u80fd\u9001\u7ed9\u4e86 cache\uff0c\u5982\u679c\u5206\u652f\u9884\u6d4b\u9884\u6d4b\u5230\u4e86\u67d0\u4e2a\u8df3\u8f6c\u6307\u4ee4\u4f1a\u53d1\u751f\uff0c\u90a3\u4e48 cache \u5c31\u53bb\u9884\u53d6\u53d1\u751f\u7684\u5206\u652f\u540e\u9762\u7684\u6570\u636e\u3002

    "},{"location":"CS/CA/chap3/","title":"chap3: Instruction-level Parallelism (ILP)","text":""},{"location":"CS/CA/chap3/#_1","title":"\u76ee\u5f55","text":""},{"location":"CS/CA/chap3/#ilp","title":"ILP \u57fa\u7840\u6982\u5ff5","text":"

    Note

    \u662f\u5199\u5f97\u7b80\u5355\u70b9\u4e86\u54c8\u3002\u5199\u4e0d\u52a8\u4e86\u3002\u8981\u4e0d\u5927\u5bb6\u770b\u8ba1\u7ec4\u738b\u9053\u597d\u4e86\u3002

    \u4e09\u79cd\u7ade\u4e89

    \u6d41\u6c34\u7ebf\u7c7b\u578b

    \u770b\u7684\u65f6\u5019\u6ce8\u610f\u603b\u7ed3\u4e00\u4e0b\u6bcf\u4e00\u79cd\u7684 CPI \u662f\u5927\u4e8e\u7b49\u4e8e\u8fd8\u662f\u5c0f\u4e8e 1\u3002\u6211\u603b\u7ed3\u4e0d\u51fa\u6765\u4e86\u3002

    "},{"location":"CS/CA/chap3/#ilp_1","title":"ILP \u5728\u4f53\u7cfb\u91cc\u5b66\u7684\u4e09\u79cd\u7b97\u6cd5","text":"

    Note

    \u672c\u6765\u8fd9\u5757\u8be5\u5199\u7684\u4f46\u662f\u6211\u5199\u4e0d\u52a8\u4e86

    \u76f4\u63a5\u53bb bing \u641c\u7d22 (1)Scoreboard, (2)Tomasulo, (3)Tomasulo w speculation, \u53bb\u627e\u4e00\u4e2a\u5357\u5927\u540c\u5b66\u5199\u7684\u77e5\u4e4e\u5e16\u5b50\uff0c\u6211\u662f\u770b\u8fd9\u5957\u5e16\u5b50\u770b\u61c2\u7684\u3002\u8fd8\u6709 lab \u91cc\u8fd9\u5757\u7684\u5b9e\u9a8c\u4e5f\u80fd\u5e2e\u52a9\u7406\u89e3\u3002

    \u8bf7\u518d\u7ed3\u5408\u8fd9\u5f20\u56fe\u8bb0\u5fc6\u4e00\u4e0b\uff1a

    \u8fd8\u6709\u4e00\u4e2a\u4e0a\u8ff0\u8d44\u6599\u4f3c\u4e4e\u6ca1\u8bb2\u5230\u7684\u70b9\uff0c\u5173\u4e8e ISSUE \u65f6\u673a\uff0c\u6211\u8bb0\u5f97\u662f - Scoreboard: \u9700\u8981\u7684 Function Unit \u4e3a\u7a7a\uff0c\u4e14\u9700\u8981\u5199\u7684 Reg State \u6ca1\u6709\u522b\u7684\u6307\u4ee4\u8fd8\u51c6\u5907\u5199\uff08\u907f\u514d WAW\uff09\u65f6\u3002 - Tomasulo: Reservation Station \u6709\u7a7a\u65f6\u3002 - Tomasulo w ROB (\u5373 w speculation): Reservation Station \u548c ROB \u90fd\u7a7a\u65f6\u3002

    Warning

    \u4f46\u662f\u4e0a\u8ff0 Tomasulo w ROB \u4f3c\u4e4e\u8ddf\u6211\u8003\u7684\u4e00\u4e2a\u671f\u672b\u9898\u4e0d\u517c\u5bb9\uff0c\u4e0d\u77e5\u9053\uff0c\u7b49\u540e\u4eba\u6765\u4e3a\u6211\u6307\u51fa

    "},{"location":"CS/CA/chap3/#branch-prediction","title":"Branch prediction","text":"

    \u56de\u5fc6 control hazard\uff0c\u6d41\u6c34\u7ebf CPU \u9047\u5230\u8df3\u8f6c\u8bed\u53e5\u5982\u679c\u5224\u65ad\u6761\u4ef6\u8fd8\u6ca1\u5c31\u7eea\uff0c\u5c31\u9700\u8981\u7b49\u64cd\u4f5c\u6570\u624d\u80fd\u7ee7\u7eed\u5f80\u4e0b\u8d70\u3002\u6211\u4eec\u60f3\u8ba9 CPU \u968f\u4fbf\u5148\u731c\u4e00\u4e2a\u5f80\u4e0b\u8d70\u7740\uff0c\u5982\u679c\u7b49\u64cd\u4f5c\u6570\u51c6\u5907\u597d\u53d1\u73b0\u731c\u9519\u4e86\uff0c\u5927\u4e0d\u4e86\u518d\u6390\u6389\uff0c\u731c\u5bf9\u4e86\u90a3\u5c31\u8282\u7ea6\u65f6\u95f4\u4e86\u3002

    \u731c\u7684\u6839\u636e\u6709\u4ec0\u4e48\u5462\uff0c\u786e\u5b9e\u6709\u6839\u636e\uff0c\u7edf\u8ba1\u8868\u660e\u5927\u90e8\u5206\u7a0b\u5e8f\u91cc\u53d1\u751f\u8df3\u8f6c\uff08branch taken\uff09\u548c\u4e0d\u53d1\u751f\u8df3\u8f6c\uff08branch not taken\uff09\u7684\u6570\u76ee\u662f\u4e25\u91cd\u4e0d\u6210\u6bd4\u4f8b\u7684\uff0c\u7ecf\u5e38\u5176\u4e2d\u4e00\u4e2a\u53ef\u80fd\u80fd\u5360\u5230 90% \u591a\u7684\u60c5\u51b5\u3002\u90a3\u4e48\uff0c\u5047\u8bbe\u5982\u679c\u77e5\u9053\u4e4b\u524d\u5f88\u591a\u8df3\u8f6c\u8bed\u53e5\u90fd\u8df3\u4e86\uff0c\u63a5\u4e0b\u6765\u53d1\u751f\u7684\u8df3\u8f6c\u8bed\u53e5\u4e5f\u5927\u6982\u7387\u4f1a\u8df3\u3002

    \u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u8bbe\u8ba1\u4e00\u4e2a\u72b6\u6001\u673a\uff0c\u6709\u56db\u79cd\u7f16\u7801 00(\u5f88\u53ef\u80fd\u8df3) 01(\u5e94\u8be5\u8df3\u5427) 10(\u5e94\u8be5\u4e0d\u8df3\u5427) 11(\u5f88\u53ef\u80fd\u4e0d\u8df3)\uff0c\u5982\u679c\u72b6\u6001\u673a\u5728 00 \u548c 01 \u72b6\u6001\u5c31\u9884\u6d4b\u4e0b\u4e00\u6b21\u4e5f\u8df3\u8f6c\uff0c\u5982\u679c\u72b6\u6001\u673a\u5728 10 \u548c 11 \u5c31\u9884\u6d4b\u4e0b\u4e00\u6b21\u4e0d\u8df3\u8f6c\u3002

    \u800c\u72b6\u6001\u8f6c\u79fb\u662f\u8fd9\u6837\u53d1\u751f\u7684\uff1a

    Note

    \u6211\u77e5\u9053 mkdocs \u5e94\u8be5\u6e32\u4e0d\u4e86 mermaid\uff0c\u4f46\u662f\u6211\u61d2\uff0c\u8bf7\u5927\u5bb6\u8111\u6e32\u4e00\u4e0b\u3002\u3002\u6216\u8005\u770b\u81ea\u5df1\u8001\u5e08 ppt\u3002\u3002\u662f\u4e00\u4e2a\u6709\u56db\u4e2a\u72b6\u6001\u7684\u7ea2\u7ea2\u84dd\u84dd\u7684\u72b6\u6001\u673a

    graph LR\n00 --(\u672c\u6b21\u8df3\u4e86)--> 00\n00 --(\u672c\u6b21\u6ca1\u8df3)--> 01\n01 --(\u672c\u6b21\u8df3\u4e86)--> 00\n01 --(\u672c\u6b21\u6ca1\u8df3)--> 10\n10 --(\u672c\u6b21\u8df3\u4e86)--> 01\n10 --(\u672c\u6b21\u6ca1\u8df3)--> 11\n11 --(\u672c\u6b21\u8df3\u4e86)--> 10\n11 --(\u672c\u6b21\u6ca1\u8df3)--> 11\n

    \u8ba1\u7b97\u9898\u4f1a\u8003\u4f7f\u7528\u8fd9\u6837\u7684 branch prediction\uff0c\u9884\u6d4b\u5931\u8bef\u7684\u6982\u7387\u662f\u591a\u5c11\u3002

    "},{"location":"CS/CA/chap5/","title":"chap5: Thread-level Parallelism","text":""},{"location":"CS/CA/chap5/#_1","title":"\u76ee\u5f55","text":""},{"location":"CS/CA/chap5/#cache","title":"cache \u4e00\u81f4\u6027\u7684\u6982\u5ff5","text":"

    \u4e0d\u77e5\u9053\u600e\u4e48\u63cf\u8ff0\u7684\u4e24\u4e2a\u672f\u8bed

    Note

    \u8ba1\u7ec4\u738b\u9053\u6709\u4e00\u7ae0\u4e13\u95e8\u8bb2\u3002\u5176\u5b83\u8bf7\u901a\u8fc7\u738b\u9053\u5b66\u4e60\uff0c\u8fd8\u6709\u59dc\u8001\u5e08 ppt \u4e5f\u6709\u4e00\u4e2a\u5c0f\u603b\u7ed3\u7684\u8868\u683c\u3002

    \u6982\u5ff5 \u5168\u540d \u7279\u70b9 \u4f18\u70b9 UMA uniform memory access \u6bcf\u4e2a\u8282\u70b9\u5230 memory \u7684\u8bbf\u95ee\u65f6\u95f4\u4e00\u81f4 NUMA non-uniform memory access \u6bcf\u4e2a\u8282\u70b9\u5230 memory \u7684\u8bbf\u95ee\u65f6\u95f4\u4e0d\u4e00\u81f4\uff0c\u5230\u81ea\u5df1\u7684\u5feb\uff0c\u5230\u522b\u4eba\u7684\u6162 \u6269\u5c55\u5230\u66f4\u5927\u89c4\u6a21\u4e0a\u7684\u53ef\u6269\u5c55\u6027\u5f3a

    cache \u4e00\u81f4\u6027\u7684\u672f\u8bed

    \u5982\u679c CPU \u6709\u591a\u4e2a\u6838\uff0c\u6216\u8005\u5982\u679c CPU \u662f\u5206\u5e03\u5f0f\u7684\uff0c\u5b83\u4eec\u5171\u7528\u4e00\u4e2a cache\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u4f7f cache \u5bf9\u6240\u6709\u6838/\u8282\u70b9\u7684\u8bfb\u5199\u4fdd\u6301\u4e00\u81f4\u6027\uff0c\u6bd4\u5982\u4e00\u4e2a\u6838/\u8282\u70b9\u5199\u7684\u4e1c\u897f\u5bf9\u5176\u5b83\u6838/\u8282\u70b9\u53ef\u89c1\uff0c\u5176\u5b83\u6838/\u8282\u70b9\u770b\u89c1\u7684\u90fd\u662f\u6700\u65b0\u7684\u3002

    \u672f\u8bed \u4e00\u53e5\u8bdd\u5b9a\u4e49\uff08\u5728 ppt \u4e0a\u53d1\u73b0\u7684\uff0c\u4f46\u662f\u4e2a\u4eba\u611f\u89c9\u4e0d\u592a\u51c6\u786e\uff09 \u5173\u6ce8\u7684\u65b9\u9762\u662f\uff08\u8fd9\u680f from \u8bfe\u672c\u66f4\u51c6\u786e\uff0c\u4f46\u4e0d\u662f\u4e00\u53e5\u8bdd\u5b9a\u4e49\uff09 coherence Memory accesses executed by each processor were kept in order. reads and writes to the same location consistency Memory accesses among different processors were interleaved. reads and writes wrt other memory locations"},{"location":"CS/CA/chap5/#cache_1","title":"\u8fbe\u6210 cache \u4e00\u81f4\u6027\u4e24\u4e2a\u534f\u8bae","text":"

    Note

    \u806a\u660e\u7684\u8bfb\u8005\u5df2\u7ecf\u53d1\u73b0\u6211\u5df2\u7ecf\u4e0d\u60f3\u5199\u4e86

    Snooping\u534f\u8bae

    Note

    \u8bf7\u901a\u8fc7\u81ea\u5df1\u73ed\u8001\u5e08 ppt \u5b66\u4e60\uff1aMOESI \u72b6\u6001\u673a + \u4f8b\u9898\u8868\u683c \u4e24\u4e2a\u56fe

    Directory\u534f\u8bae

    Note

    \u8bf7\u901a\u8fc7\u81ea\u5df1\u73ed\u8001\u5e08 ppt \u5b66\u4e60: \u4f8b\u9898\u8868\u683c \u4e00\u4e2a\u56fe

    "},{"location":"CS/CPP/course/","title":"Courses \u542c\u8bfe","text":""},{"location":"CS/CPP/course/#cs106bcs106l","title":"\u5173\u4e8eCS106B\u548cCS106L","text":"

    CS106B\u504f\u7b80\u5355\uff0c\u76f8\u5f53\u4e8eZJU\u7684\u6570\u636e\u7ed3\u6784+C++\u7684STL\u7528\u6cd5\u4e00\u5757\u8bb2\uff0c\u53e6\u5916\u518d\u8bb2\u4e00\u4e9bFDS\u7684\u7b97\u6cd5\u3002 CS106L\u662f\u4e13\u95e8\u8bb2C++\u8fdb\u9636\u7279\u6027\u7684\u3002

    \u56e0\u4e3a\u5728\u542cCS106B\u4e4b\u524d\u5b66\u8fc7FDS\uff0cCS106B\u82b1\u4e00\u5929\u901f\u901a\u4e86\u4e00\u4e0b\uff0c\u91cd\u590d\u5185\u5bb9\u6709\u70b9\u591a\uff0c\u622a\u4e0b\u4e86\u4e00\u5e45\u56fe\u3002

    CS106L\u63d0\u4f9b\u7684C++\u5b66\u4e60\u8def\u7ebf\u56fe

    "},{"location":"CS/CPP/course/#zju","title":"ZJU\u8bfe\u7a0b","text":""},{"location":"CS/CPP/course/#_1","title":"\u8bfe\u7a0b\u53c2\u8003\u8d44\u6599","text":"

    CPP Reference Standard C++ CppCon

    "},{"location":"CS/CPP/course/#_2","title":"\u4e0a\u8bfe\u5fc3\u5f97","text":"

    \u6211\u8ddf\u7684\u662fcx\u8001\u5e08\u7684\u73ed\uff0c\u5e94\u8be5\u662f\u6559\u5f97\u6700\u597d\u7684\u4e00\u6863orz \u4f46\u662f\u4e0a\u8bfe\u5185\u5bb9\u4ecd\u4e0d\u80fd\u8986\u76d6\u4f5c\u4e1a\u548c\u671f\u672b\u7684\u5185\u5bb9\uff0c\u89c9\u5f97\u542c\u8bfe\u5185\u5bb9\u53ea\u80fd\u8d77\u5230\u4e00\u4e2a\u9aa8\u67b6\u4f5c\u7528\uff0c\u8bfe\u540e\u9700\u8981\u82b1\u4e0a\u8bfe2\u81f33\u500d\u7684\u65f6\u95f4\u81ea\u5b66\u81ea\u5df1\u6574\u7406\u7b14\u8bb0\uff0c\u591a\u8bfb\u591a\u5199\u4ee3\u7801\uff0c\u4e0d\u7136\u671f\u672b\u4f1a\u9047\u5230\u6ca1\u89c1\u8fc7\u7684\u7279\u6027\uff0c\u4f1a\u6709\u70b9\u60e8orz\uff08\u50cf\u6211\u4e00\u6837\uff09

    "},{"location":"CS/CPP/course/#_3","title":"\u9762\u5411\u5bf9\u8c61\u56db\u5927\u7279\u6027","text":""},{"location":"CS/CPP/course/#_4","title":"\u7c7b\u548c\u5bf9\u8c61/\u6784\u9020\u51fd\u6570\u548c\u6790\u6784\u51fd\u6570","text":""},{"location":"CS/CPP/course/#class-struct","title":"class \u4e0e struct \u7684\u6bd4\u8f83","text":""},{"location":"CS/CPP/course/#_5","title":"\u7c7b\u7684\u7ed3\u6784\uff1a\u6570\u636e\u6210\u5458\u548c\u6210\u5458\u51fd\u6570","text":""},{"location":"CS/CPP/course/#_6","title":"\u7c7b\u7684\u58f0\u660e\u683c\u5f0f","text":"
    class Name\n{\n    public:\n        public_data;\n        public_functions;\n    protected:\n        protected_data;\n        protected_functions;\n    private:\n        private_data;\n        private_functions;\n}\n
    "},{"location":"CS/CPP/course/#_7","title":"\u4e60\u60ef","text":""},{"location":"CS/CPP/course/#_8","title":"\u7c7b\u5916\u5b9a\u4e49","text":"

    \u8fd4\u56de\u7c7b\u578b \u7c7b\u540d::\u6210\u5458\u51fd\u6570\u540d\uff08\u53c2\u6570\u8868\uff09 { // \u51fd\u6570\u4f53 }

    "},{"location":"CS/CPP/course/#_9","title":"\u5185\u8054\u51fd\u6570\u548c\u5916\u8054\u51fd\u6570","text":""},{"location":"CS/CPP/course/#_10","title":"\u5bf9\u8c61","text":"

    \u53ef\u4ee5\u628a\u76f8\u540c\u6570\u636e\u7ed3\u6784\u548c\u76f8\u540c\u64cd\u4f5c\u96c6\u7684\u5bf9\u8c61\u770b\u4f5c\u5c5e\u4e8e\u540c\u4e00\u7c7b\u3002\u5bf9\u8c61\u662f\u7c7b\u7684\u5b9e\u4f8b\u3002

    "},{"location":"CS/CPP/course/#_11","title":"\u5bf9\u8c61\u7684\u5b9a\u4e49","text":""},{"location":"CS/CPP/course/#_12","title":"\u5bf9\u8c61\u4e2d\u6210\u5458\u7684\u8bbf\u95ee","text":"

    \u5bf9\u8c61\u540d.\u6570\u636e\u6210\u5458\u540d\uff08\u662f \u5bf9\u8c61\u540d.\u7c7b\u540d::\u6210\u5458\u540d \u7684\u7f29\u5199\uff09 \u5bf9\u8c61\u540d.\u6210\u5458\u51fd\u6570\u540d\uff08\u53c2\u6570\u8868\uff09

    class Sample\n{\npublic:\nint k;\nint geti(){return i;}\nint getj(){return j;}\nint getk(){return k;}\nprivate:\nint i;\nprotected:\nint j;\n};\nint main()\n{\nSample a;\na.i;        // \u975e\u6cd5\na.j:        // \u975e\u6cd5\na.k;        // \u5408\u6cd5\n}\n

    "},{"location":"CS/CPP/course/#_13","title":"\u7c7b\u7684\u4f5c\u7528\u57df","text":""},{"location":"CS/CPP/course/#_14","title":"\u6784\u9020\u51fd\u6570\u4e0e\u6790\u6784\u51fd\u6570","text":"

    \u7c7b\u7684\u6784\u9020\u51fd\u6570\u662f\u7c7b\u7684\u4e00\u4e2a\u7279\u6b8a\u6210\u5458\u51fd\u6570\uff0c\u6ca1\u6709\u8fd4\u56de\u7c7b\u578b\uff08\u4e0d\u662fvoid\uff09\uff0c\u53ef\u4ee5\u6709\u53c2\u6570\uff0c\u51fd\u6570\u540d\u548c\u7c7b\u540d\u4e00\u6837\u3002\u5f53\u521b\u5efa\u7c7b\u7684\u4e00\u4e2a\u65b0\u5bf9\u8c61\u65f6\uff0c\u81ea\u52a8\u8c03\u7528\u6784\u9020\u51fd\u6570\uff0c\u5b8c\u6210\u521d\u59cb\u5316\u5de5\u4f5c\u3002

    "},{"location":"CS/CPP/course/#namespace","title":"Namespace","text":""},{"location":"CS/CPP/course/#namespace_1","title":"\u4ec0\u4e48\u662fnamespace\uff1f","text":"

    \u662f\u5355\u4e00\u7684\u5168\u5c40\u540d\u5b57\u7a7a\u95f4\u3002\u9632\u6b62\u5728\u4e00\u4e2a\u7a7a\u95f4\u4e2d\u76f8\u540c\u7684\u540d\u5b57\u5f15\u8d77\u51b2\u7a81\u3002 \u4f8b\u5b50\uff1a

    namespace myown1\n{\nstring user_name = \"myown1\";\n}\nnamespace myown2\n{\nstring user_name = \"myown2\";\n}\nint main()\n{\n// using namespace myown1; \ncout << \"\\\\n\" << \"Hello, \"\n<< myown1::user_name\n<< \"...and goodbye!\\\\n\"\ncout << \"\\\\n\" << \"Hello, \"\n<< myown2::user_name\n<< \"...and goodbye!\\\\n\"\nreturn 0;\n}\n

    \u5173\u952e\u8bcdusing\u5c06\u4e00\u4e2a\u540d\u5b57\u7a7a\u95f4\u53d8\u4e3a\u53ef\u89c1\uff0c\u4e0d\u4f1a\u8986\u76d6\u5f53\u524d\u7684namespace\u3002

    "},{"location":"CS/CPP/course/#_15","title":"\u7ee7\u627f\u4e0e\u6d3e\u751f\u7c7b","text":" \u76ee\u7684 \u4ee3\u7801\u7684\u91cd\u7528\u548c\u4ee3\u7801\u7684\u6269\u5145 \u7ee7\u627f\u79cd\u7c7b \u5355\u7ee7\u627f/\u591a\u7ee7\u627f \u7ee7\u627f\u5185\u5bb9 \u9664\u6784\u9020\u51fd\u6570/\u6790\u6784\u51fd\u6570/\u79c1\u6709\u6210\u5458\u5916\u7684\u6240\u6709\u6210\u5458"},{"location":"CS/CPP/course/#_16","title":"\u7ee7\u627f\u7684\u8bbf\u95ee\u63a7\u5236","text":"

    \u6d3e\u751f\u7c7b\u7ee7\u627f\u4e86\u57fa\u7c7b\u4e2d\u9664\u6784\u9020\u51fd\u6570\u548c\u6790\u6784\u51fd\u6570\u4e4b\u5916\u7684\u6240\u6709\u6210\u5458\u3002\u6d3e\u751f\u7c7b\u7684\u6210\u5458\u5305\u62ec\uff1a - \u7ee7\u627f\u57fa\u7c7b\u7684\u6210\u5458 - \u6d3e\u751f\u7c7b\u5b9a\u4e49\u65f6\u58f0\u660e\u7684\u6210\u5458

    \u4ece\u5df2\u6709\u7c7b\u6d3e\u751f\u51fa\u65b0\u7c7b\u65f6\uff0c\u53ef\u4ee5\u5728\u6d3e\u751f\u7c7b\u5185\u5b8c\u6210\u4ee5\u4e0b\u51e0\u79cd\u529f\u80fd\uff1a - \u589e\u52a0\u65b0\u7684\u6570\u636e\u6210\u5458 - \u589e\u52a0\u65b0\u7684\u6210\u5458\u51fd\u6570 - \u91cd\u65b0\u5b9a\u4e49\u57fa\u7c7b\u4e2d\u5df2\u6709\u7684\u6210\u5458\u51fd\u6570 - \u53ef\u4ee5\u6539\u53d8\u73b0\u6709\u6210\u5458\u7684\u5c5e\u6027

    \u58f0\u660e\u4e00\u4e2a\u6d3e\u751f\u7c7b\u7684\u4e00\u822c\u683c\u5f0f

    class \u6d3e\u751f\u7c7b\u540d:\u7ee7\u627f\u65b9\u5f0f \u57fa\u7c7b\u540d\n{\n// \u6d3e\u751f\u7c7b\u65b0\u589e\u7684\u6570\u636e\u6210\u5458\u548c\u6210\u5458\u51fd\u6570\n};\n

    \u4e09\u79cd\u7ee7\u627f\u65b9\u5f0f

    class employee: public person\n{};\n// default\nclass employee: private person\n{};\nclass employee: protected person\n{};\n

    \u57fa\u7c7b\u6210\u5458\u5728\u6d3e\u751f\u7c7b\u4e2d\u7684\u8bbf\u95ee\u5c5e\u6027

    \u5728\u57fa\u7c7b\u4e2d\u7684\u8bbf\u95ee\u5c5e\u6027 \u7ee7\u627f\u65b9\u5f0f \u5728\u6d3e\u751f\u7c7b\u4e2d\u7684\u8bbf\u95ee\u5c5e\u6027 \u89e3\u91ca private public inaccessible \u57fa\u7c7b\u4e2dprivate\u7684\u5bf9\u8c61\u5728\u7c7b\u5916\u5f53\u7136\u4e0d\u53ef\u8bbf\u95ee private private inaccessible private protected inaccessible public public public \u57fa\u7c7b\u4e0d\u7ba1 public private private public protected protected protected public protected \u6743\u9650\u4f1a\u88ab\u7ee7\u627f\u65b9\u5f0f\u7f29\u5c0f\u800c\u4e0d\u4f1a\u653e\u5927 protected private private protected protected protected

    \u6d3e\u751f\u7c7b\u5bf9\u57fa\u7c7b\u7684\u8bbf\u95ee\u89c4\u5219 - \u5185\u90e8\u8bbf\u95ee\uff1a\u7531\u6d3e\u751f\u7c7b\u4e2d\u65b0\u589e\u6210\u5458\u5bf9\u57fa\u7c7b\u7ee7\u627f\u6765\u7684\u6210\u5458\u7684\u8bbf\u95ee\u3002 - \u5bf9\u8c61\u8bbf\u95ee\uff1a\u5728\u6d3e\u751f\u7c7b\u5916\u90e8\uff0c\u901a\u8fc7\u6d3e\u751f\u7c7b\u7684\u5bf9\u8c61\u5bf9\u4ece\u57fa\u7c7b\u7ee7\u627f\u6765\u7684\u6210\u5458\u7684\u8bbf\u95ee\u3002

    \u57fa\u7c7b\u6210\u5458 private\u6210\u5458 public\u6210\u5458 protected\u6210\u5458 \u5185\u90e8\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee \u53ef\u8bbf\u95ee \u53ef\u8bbf\u95ee \u5bf9\u8c61\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee \u4e0d\u53ef\u8bbf\u95ee

    \u79c1\u6709\u7ee7\u627f\u4e3e\u4f8b

    class Point\n{\npublic:\nvoid InitP(float x = 0, float y = 0)\n{\nthis->X = x;\nthis->Y = y;\n}\nvoid Move(float offX, float offY)\n{\nX += offX;\nY += offY;\n}\nfloat GetX() const{return X;}\nfloat GetY() const{return Y;}\nprivate:\nfloat X, Y;\n};\nclass Rectangle: private Point // \u6d3e\u751f\u7c7b\u58f0\u660e\n{\npublic: //\u65b0\u589e\u5916\u90e8\u63a5\u53e3\nvoid InitR(float x, float y, float w, float h)\n{\nInitR(x, y);\nW = w;\nH = h;\n} // \nvoid Move(float xOff, float yOff)\n{\nPoint::\n}\n}\n

    "},{"location":"CS/CPP/final_review/","title":"ZJU \u671f\u672b\u590d\u4e60","text":"

    \u9762\u5411\u671f\u672b\u9898\u7684\u76f8\u4f3c\u77e5\u8bc6\u70b9\u805a\u7c7b

    "},{"location":"CS/CPP/final_review/#_1","title":"\u6784\u9020\u987a\u5e8f","text":"

    \uff081\uff09main\u51fd\u6570\u4ee5\u5916\u7684\u5bf9\u8c61\uff0c\u5168\u5c40\u7c7b\u5b9a\u4e49\u540e\u76f4\u63a5\u5b9a\u4e49\u7684\u7c7b\u5bf9\u8c61 \uff082\uff09main\u51fd\u6570\u5185\u7684\u5bf9\u8c61 \uff083\uff09\u7236\u7c7b\u6784\u9020 \uff084\uff09\u5b50\u7c7b\u7c7b\u6210\u5458 \uff085\uff09\u5b50\u7c7b\u6784\u9020 \u6790\u6784\u987a\u5e8f\u76f8\u53cd

    "},{"location":"CS/CPP/final_review/#_2","title":"\u4ec0\u4e48\u65f6\u5019\u751f\u6210\u9ed8\u8ba4\u6784\u9020\u51fd\u6570\uff1f","text":"

    \u5982\u679c\u5df2\u7ecf\u6709\u6784\u9020\u51fd\u6570\uff0c\u7f16\u8bd1\u5668\u4e0d\u4f1a\u751f\u6210\u9ed8\u8ba4\u6784\u9020\u51fd\u6570 \u6ca1\u6709\u7684\u65f6\u5019\u4e5f\u4e0d\u4e00\u5b9a\u4f1a\u751f\u6210 \u9700\u8981\u7528\u624d\u751f\u6210

    "},{"location":"CS/CPP/final_review/#_3","title":"\u91cd\u8f7d\u89c4\u5219","text":"

    \u4e0d\u80fd\u91cd\u8f7d\u7684\u6709\uff1a - \u4f5c\u7528\u57df\u64cd\u4f5c\u7b26:: - \u6761\u4ef6\u64cd\u4f5c\u7b26?:\uff08\u5e94\u8be5\u662f\u95ee\u53f7\u8868\u8fbe\u5f0f\uff1f\uff09 - \u70b9\u64cd\u4f5c\u7b26\u3001\u7c7b\u6210\u5458\u6307\u9488 - \u9884\u5904\u7406\u7b26\u53f7#

    \u53ea\u80fd\u91cd\u8f7d\u4e3a\u53cb\u5143\u4e0d\u80fd\u6210\u5458\u51fd\u6570\uff1a - <<\u548c>> \u539f\u56e0\u662f\u6210\u5458\u51fd\u6570\u91cd\u8f7d\uff0c\u53ea\u80fd\u5e26\u4e00\u4e2a\u53c2\u6570\uff0clhs\u5fc5\u987b\u662f\u6210\u5458\u81ea\u8eab

    \u4f46\u662f\u6d41\u64cd\u4f5c\u7b26\u5de6\u8fb9\u662fcin\u6216cout\uff0c\u91cd\u8f7d\u4e3a\u53cb\u5143\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u6bd4\u6210\u5458\u51fd\u6570\u591a\u8bf4\u660e\u4e00\u4e2a\u5f62\u53c2\u505alhs

    \u91cd\u8f7d\u548c\u91cd\u5199\u90fd\u662f\u591a\u6001\uff1a \u91cd\u8f7d\uff1a\u8fd0\u884c\u65f6\u591a\u6001 \u91cd\u5199\uff1a\u7f16\u8bd1\u65f6\u591a\u6001

    static\u548cvirtual\u53ea\u80fd\u6709\u4e00\u4e2a

    \u6790\u6784\u51fd\u6570\u4e0d\u80fd\u5e26\u53c2\u6570

    "},{"location":"CS/CPP/final_review/#_4","title":"\u5b50\u7c7b\u548c\u7236\u7c7b\u6307\u9488","text":""},{"location":"CS/CPP/final_review/#static_castdynamic_cast","title":"static_cast\u548cdynamic_cast","text":""},{"location":"CS/CPP/final_review/#_5","title":"\u5f15\u7528","text":"

    \u4ec0\u4e48\u65f6\u5019\u5fc5\u987b\u7528\u5e38\u5f15\u7528\uff08const &\uff09\uff1a\u5f15\u7528\u578b\u53c2\u6570\u5e94\u5f53\u5728\u80fd\u5b9a\u4e49\u4e3aconst\u7684\u60c5\u51b5\u4e0b\u5c3d\u91cf\u5b9a\u4e49\u4e3aconst\u3002

    \u4f7f\u7528\u5f15\u7528\u7684\u4e3b\u8981\u539f\u56e0\uff1a \u7a0b\u5e8f\u80fd\u591f\u4fee\u6539\u8c03\u7528\u51fd\u6570\u4e2d\u7684\u6570\u636e\u5bf9\u8c61 \u901a\u8fc7\u4f20\u9012\u5f15\u7528\u800c\u4e0d\u662f\u6574\u4e2a\u6570\u636e\u5bf9\u8c61\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6

    \u53ea\u4f7f\u7528\u4f20\u9012\u8fc7\u6765\u7684\u503c\u800c\u4e0d\u4fee\u6539 \u9700\u8981\u4fee\u6539\u4f20\u9012\u8fc7\u6765\u7684\u503c \u5185\u7f6e\u6570\u636e\u7c7b\u578b\uff08\u5c0f\u578b\u7ed3\u6784\uff09 \u6309\u503c\u4f20\u9012 \u6307\u9488\u4f20\u9012 \u6570\u7ec4 \u6307\u9488\u4f20\u9012 \u6307\u9488\u4f20\u9012 \u8f83\u5927\u7684\u7ed3\u6784\uff09 \u6307\u9488\u6216\u5f15\u7528 \u6307\u9488\u6216\u5f15\u7528 \u7c7b/\u5bf9\u8c61 \u5f15\u7528\u4f20\u9012 \u5f15\u7528\u4f20\u9012

    \u5f15\u7528\u548c\u6307\u9488\u7684\u533a\u522b\uff1a \u53ef\u4ee5\u628a\u5f15\u7528\u7406\u89e3\u6210\u4e00\u4e2a\u5e38\u91cf\u6307\u9488\uff0c\u56e0\u6b64\u5f15\u7528\u58f0\u660e\u65f6\u5c31\u5fc5\u987b\u521d\u59cb\u5316\uff0c\u4e00\u7ecf\u58f0\u660e\u4e0d\u80fd\u518d\u548c\u5176\u5b83\u5bf9\u8c61\u7ed1\u5b9a\u3002

    Copy constructor must pass its first argument by reference

    "},{"location":"CS/CPP/final_review/#_6","title":"\u7c7b\u5185\u9759\u6001\u6210\u5458\u7684\u521d\u59cb\u5316","text":"

    const static\u53ef\u4ee5\u5728\u7c7b\u5185\u76f4\u63a5\u521d\u59cb\u5316\uff0c\u975econst static\u6210\u5458\u9700\u8981\u5728\u7c7b\u5916\u521d\u59cb\u5316\u3002

    \u53ef\u4ee5\u8c03\u7528\u9ed8\u8ba4\u521d\u59cb\u5316A::n\uff0c\u81ea\u52a8\u521d\u59cb\u5316\u4e3a0\u3002\u6b64\u65f6\u8c03\u7528\u9ed8\u8ba4\u6784\u9020\u4e0d\u80fd\u7528n()\uff0c\u5426\u5219\u8ba4\u4e3a\u662f\u4e2a\u51fd\u6570\u3002\u6216\u8005\u5e26\u521d\u59cb\u503c\u521d\u59cb\u5316A::n(9)

    static\u548cconst - \u6ca1\u6709static\u5c31\u662fconst\u7684\u8bf4\u6cd5

    const\u7684\u51e0\u79cd\u5f62\u5f0f

    const int& fun(int& a); // \u4fee\u9970\u8fd4\u56de\u503c \nint& fun(const int& a); // \u4fee\u9970\u5f62\u53c2 \nint& fun(int& a) const {} // const\u6210\u5458\u51fd\u6570\n

    const\u8fd4\u56de\u503c\uff1a\u662f\u4fee\u9970\u8fd4\u56de\u503c\u5f15\u7528\u7c7b\u578b\u7684\u65f6\u5019\uff0c\u4e3a\u4e86\u907f\u514d\u8fd4\u56de\u503c\u88ab\u4fee\u6539\u7684\u60c5\u51b5

    \u8fd4\u56de\u503c\u662f\u5f15\u7528\u7684\u51fd\u6570\uff0c\u8fd9\u4e2a\u5f15\u7528\u5fc5\u7136\u4e0d\u662f\u4e34\u65f6\u5bf9\u8c61\u7684\u5f15\u7528\uff0c\u4e00\u5b9a\u662f\u6210\u5458\u53d8\u91cf\u6216\u8005\u51fd\u6570\u53c2\u6570\u3002\uff08\u53ea\u8981\u53c2\u6570\u4e0d\u9700\u8981\u4fee\u6539\u4e00\u5b9a\u52a0\u4e0aconst\uff09

    const\u53c2\u6570\u5fc5\u987b\u4f20\u7b7e\u540d\u540e\u5e26const\u7684\u51fd\u6570\uff1a\u8981\u628athis\u6307\u9488\u53d8\u6210const

    \u600e\u6837\u6784\u6210\u91cd\u8f7d - \u4e0d\u91cd\u8f7d\u7684

    const int& fun(int& a); // \u53c2\u6570\u5217\u8868\u6ca1\u6709\u53d8 \nint& fun(const int a); // \u56e0\u4e3a\u662f\u503c\u4f20\u9012\uff0c\u4e0d\u662fconst\u7684\u4e5f\u80fdtype conversion\n

    "},{"location":"CS/CPP/final_review/#inline-function","title":"inline function","text":"

    \u4ee3\u66ff\u5b8f\u7684\u4e00\u79cd\u64cd\u4f5c\uff0c\u5728\u7f16\u8bd1\u9636\u6bb5\u628a\u6240\u6709\u51fd\u6570\u540d\u66ff\u6362\u6210inline function\u7684\u5b9e\u73b0 \u6bd4\u51fd\u6570\u7684\u4f18\u70b9\uff1a\u4e0d\u7528\u9891\u7e41\u8fdb\u6808\u51fa\u6808 \u6bd4\u5b8f\u7684\u4f18\u70b9\uff1a\u6709\u7c7b\u578b\u68c0\u67e5\uff0c\u80fd\u5199\u591a\u884c\uff0c\u80fd\u64cd\u4f5c\u7c7b\u7684\u79c1\u6709\u6210\u5458 inline\u5173\u952e\u5b57\u53ea\u6709\u51fa\u73b0\u5728\u51fd\u6570\u7684\u5b9a\u4e49\u800c\u4e0d\u662f\u58f0\u660e\u524d\u65f6\u624d\u6709\u7528\u3002 \u9759\u6001\u7ed1\u5b9a\u00a0Static\u00a0Binding \u3002\u80fd\u591f\u660e\u786e\u8fd0\u884c\u7684\u662f\u54ea\u4e2a\u7c7b\u7684\u65b9\u6cd5\u65f6\u4f1a\u53d1\u751f\u9759\u6001\u7ed1\u5b9a \u3002\u53d1\u751f\u5728\u7f16\u8bd1\u65f6\u523b\uff0c\u6240\u4ee5\u53c8\u53eb\u65e9\u7ed1\u5b9a \u52a8\u6001\u7ed1\u5b9aDynamic\u00a0Binding \u3002\u51fa\u73b0\u591a\u6001\uff0c\u7f16\u8bd1\u5668\u4e0d\u80fd\u660e\u786e\u5230\u5e95\u4f7f\u7528\u54ea\u4e2a\u7c7b\u7684\u65b9\u6cd5\u65f6\u53d1\u751f\u52a8\u6001\u7ed1\u5b9a \u3002\u53d1\u751f\u5728\u8fd0\u884c\u65f6\u523b\uff0c\u6240\u4ee5\u53c8\u53eb\u665a\u7ed1\u5b9a \u3002\u53ea\u6709\u5b58\u5728\u00a0virtual\u00a0\u65e6\u901a\u8fc7\u6307\u9488\u8bbf\u95ee\u65f6\uff0c\u624d\u4f1a\u53d1\u751f\u52a8\u6001\u7ed1\u5b9a

    static binding \u7f16\u8bd1\u65f6

    class Animal { public: void eat() { cout << \"Animal eats\" << endl; } }; class Dog : public Animal { public: void eat() { cout << \"Dog eats\" << endl; } };\n

    dynamic binding \u8fd0\u884c\u65f6

    class Animal { public: virtual void eat() { cout << \"Animal eats\" << endl; } }; class Dog : public Animal { public: void eat() { cout << \"Dog eats\" << endl; } };\n
    \u200b

    \u5728\u4e0b\u9762\u7684\u60c5\u51b5\u4e0b\uff0c\u6784\u9020\u51fd\u6570\u4f1a\u88ab\u8c03\u7528\uff1a - \u5bf9\u4e8e\u5168\u5c40\u5bf9\u8c61\uff0c\u5728main()\u4e24\u6570\u8fd0\u884c\u4e4b\u524d\uff0c\u6216\u8005\u5728\u540c\u4e00\u4e2a\u7f16\u8bd1\u5355\u5143\u5185\u5b9a\u4e49\u7684\u4efb\u4e00\u51fd\u6570\u6216\u5bf9\u8c61 \u88ab\u4f7f\u7528\u4e4b\u524d\u3002\u5728\u540c\u4e00\u4e2a\u7f16\u8bd1\u5355\u5143\u5185\uff0c\u5b83\u4eec\u7684\u6784\u9020\u4e24\u6570\u6309\u7167\u58f0\u660e\u7684\u987a\u5e8f\u521d\u59cb\u5316\u3002 - \u5bf9\u4e8e static\u00a0local\u00a0variables\uff0c\u00a0\u5728\u7b2c\u4e00\u6b21\u8fd0\u884c\u5230\u5b83\u7684\u58f0\u660e\u7684\u65f6\u5019. - \u5bf9\u4e8e automatic\u00a0storage\u00a0duration\u00a0\u7684\u5bf9\u8c61\uff0c\u5728\u5176\u58f0\u660e\u88ab\u8fd0\u884c\u65f6\u3002 - \u5bf9\u4e8e dynamic\u00a0storage\u00a0duration\u00a0\u7684\u5bf9\u8c61\uff0c\u5728\u5176\u7528\u00a0new\u00a0\u8868\u8fbe\u5f0f\u521b\u5efa\u65f6\u3002

    "},{"location":"CS/CPP/final_review/#_7","title":"\u667a\u80fd\u6307\u9488","text":"
    std::unique_ptr<T> //\u72ec\u5360\u8d44\u6e90\u6240\u6709\u6743\u7684\u6307\u9488\u3002 \nstd::shared_ptr<T> //\u5171\u4eab\u8d44\u6e90\u6240\u6709\u6743\u7684\u6307\u9488\u3002 \nstd::weak_ptr<T> //\u5171\u4eab\u8d44\u6e90\u7684\u89c2\u5bdf\u8005\uff0c\u9700\u8981\u548cstd::shared_ptr \u4e00\u8d77\u4f7f\u7528\uff0c\u4e0d\u5f71\u54cd\u8d44\u6e90\u7684\u751f\u547d\u5468\u671f\u3002\n

    \u4f7f\u7528\u88f8\u6307\u9488 \u6240\u4ee5\u9ed8\u8ba4\u53c2\u6570\u662f\u548c\u865a\u8868\u65e0\u5173\u4e0e\u5f53\u524d\u7c7b\u578b\u6709\u5173\u5417 \u662f\u7684 \u9ed8\u8ba4\u53c2\u6570\u4e0d\u8fdb\u865a\u8868 \u2192 upcasting\u7684\u65f6\u5019

    "},{"location":"CS/CPP/final_review/#upcasting","title":"upcasting","text":""},{"location":"CS/CPP/templates/","title":"\u6a21\u677fTemplate \u548c \u6807\u51c6\u6a21\u677f\u5e93STL","text":"

    \u9700\u6c42\uff1a\u8ba9\u6211\u4eec\u7684\u4ee3\u7801\u72ec\u7acb\u4e8e\u5177\u4f53\u7684\u7c7b\u578b\u5de5\u4f5c\u3002

    \u6211\u4eec\u5199\u51fa\u4e00\u4e2a\u9002\u7528\u4e8e\u6240\u6709\u7c7b\u578b\u7684\u6570\u636e\u7ed3\u6784\u7684\u7c7b\u6216\u7b97\u6cd5\uff08\u51fd\u6570\uff09\uff0c\u5728\u771f\u6b63\u9700\u8981\u4f7f\u7528\u65f6\u751f\u6210\u4e00\u4e2a\u9002\u7528\u4e8e\u6240\u9700\u7c7b\u578b\u7684\u5b9e\u4f8b\u3002\u8fd9\u79cd\u7f16\u7a0b\u8303\u5f0f\u79f0\u4e3a\u8303\u578b\u7f16\u7a0b\u3002

    \u6a21\u677f\u7c7b\u7684\u5199\u6cd5

    template<typename T>\nclass Container{\nT *data;\nunsigned size, capa;\npiblic:\nContainer(unsigned capa = 512): data(new T[capa]){}\n~Container() {delete[] data;}\nT& operator[](unsigned index) {return data[index];}\n}\n

    \u8fd9\u91cctemplate T\u8868\u660e\u5b83\u63a5\u53d7\u4e00\u4e2a\u7c7b\u578b\u4f5c\u4e3a\u53c2\u6570\uff0c\u540d\u5b57\u662fT\u3002\u5728\u6a21\u677f\u7684\u5b9a\u4e49\u5185\u90e8\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5230\u8fd9\u4e2a\u7c7b\u578b\u53d8\u91cfT\u3002

    \u7279\u5316\uff1a\u6839\u636e\u6a21\u677f\u751f\u6210\u5b9e\u9645\u7684\u7c7b\u7684\u8fc7\u7a0b

    Container<int> ci;\nContainer<double> cd;\n

    \u6a21\u677f\u51fd\u6570\u8981\u600e\u4e48\u5199

    template<typename T>\nT abs(T x) {return x>0?x:-x;}\n

    \u6a21\u677f\u8fd0\u7b97\u7b26\u91cd\u8f7d\u600e\u4e48\u5199

    template<typename T>\nclass Container {\nT* data;\nunsigned size = 0, capa;\npublic: Container(unsigned capa = 512) : data(new T[capa]), capa(capa){}\n~Container(){delete[] data;}\nT& operator[](unsigned index) {return data[index];}\nconst T& operator[](unsigned idnex) const {return data[index];}\nunsigned getSize() const {return size;}\nunsigned getCapa() const {return capa;}\nContainer &add(T val){\ndata[size++] = val;\nreturn *this;\n}\n};\ntemplate<typename T>\nostream & operator<<(ostream& os, const Container<T>&c){\nfor (unsigned i = 0; i < c.getSize(); i++){\nos << c[i] << ' ';\nreturn os;\n}\n}\n

    "},{"location":"CS/CPP/templates/#reference","title":"Reference","text":"

    7 \u6a21\u677f (I) - \u57fa\u672c\u77e5\u8bc6\u4e0e STL \u4f7f\u7528 - \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4

    "},{"location":"CS/CPP/templates/#template","title":"\u53ef\u53d8\u53c2\u6570\u6a21\u677f template

    C++11\u7684\u65b0\u7279\u6027 \u5bf9\u53c2\u6570\u9ad8\u5ea6\u6cdb\u5316\uff0c\u53ef\u4ee5\u8868\u793a0\u5230\u4efb\u610f\u4e2a\u4efb\u610f\u7c7b\u578b\u7684\u53c2\u6570\u3002

    \u8bed\u6cd5

    template <class ...T>  // \u58f0\u660e\u4e00\u4e2a\u53c2\u6570\u5305\uff0c\u8fd9\u4e2a\u53c2\u6570\u5305\u4e2d\u5305\u542b0\u5230\u4efb\u610f\u4e00\u4e2a\u53c2\u6570\u6a21\u677f\nvoid f(T... args);     // \u5728\u6a21\u677f\u5b9a\u4e49\u7684\u53f3\u8fb9\uff0c\u53ef\u4ee5\u5c06\u53c2\u6570\u5305\u5c55\u5f00\u6210\u4e00\u4e2a\u4e00\u4e2a\u72ec\u7acb\u53c2\u6570\n

    \u6700\u5927\u7684\u96be\u70b9\uff1a\u5982\u4f55\u5c55\u5f00\u53ef\u53d8\u6a21\u677f\u53c2\u6570

    \u6253\u5370\u53c2\u6570\u4e2a\u6570\uff1a

    template<class ...T>\nvoid f(T... args)\n{\n        cout << sizeof...(args) << endl;\n}\n\nf();\nf(1, 2);\nf(1, 2.5, \"\");\n

    \u9012\u5f52\u65b9\u5f0f\u5c55\u5f00\u53c2\u6570\u5305

    #include <iostream>\nusing namespace std;\n\n// \u9012\u5f52\u7ec8\u6b62\u51fd\u6570\nvoid print(){\n    cout << \"empty\" << endl;\n}\n\n// \u5c55\u5f00\u51fd\u6570\ntemplate<class T, class ...Args>\nvoid print(T head, Args... rest){\n    cout << \"parameter\" << head << endl;\n    print(rest...);\n}\n\nint main(){\n    print(1, 2, 3, 4);\n    return 0;\n}\n

    \u4e0a\u8ff0\u4f8b\u5b50\u4f1a\u8f93\u51fa\u6bcf\u4e00\u4e2a\u53c2\u6570\uff0c\u76f4\u5230\u7a7a\u65f6\u8f93\u51faempty\u3002\u5c55\u5f00\u53c2\u6570\u5305\u7684\u51fd\u6570\u6709\u4e24\u4e2a\uff0c\u4e00\u4e2a\u662f\u9012\u5f52\u51fd\u6570\uff0c\u53e6\u4e00\u4e2a\u662f\u9012\u5f52\u7ec8\u6b62\u51fd\u6570\uff0c\u53c2\u6570\u5305Args\u2026\u5728\u5c55\u5f00\u7684\u8fc7\u7a0b\u4e2d\u9012\u5f52\u8c03\u7528\u81ea\u5df1\uff0c\u6bcf\u8c03\u7528\u4e00\u6b21\uff0c\u53c2\u6570\u5305\u4e2d\u7684\u53c2\u6570\u5c31\u5c11\u4e00\u4e2a\uff0c\u76f4\u5230\u6240\u6709\u53c2\u6570\u90fd\u5c55\u5f00\u4e3a\u6b62\u3002\u5f53\u6ca1\u6709\u53c2\u6570\u65f6\uff0c\u5219\u8c03\u7528\u975e\u6a21\u677f\u51fd\u6570print()\u7ec8\u6b62\u9012\u5f52\u8fc7\u7a0b\u3002

    \u7ec8\u6b62\u51fd\u6570\u4e5f\u53ef\u4ee5\u5199\u6210

    template<class T>\nvoid print(T t){\n    cout << t << endl;\n}\n

    \u53ef\u53d8\u6a21\u677f\u53c2\u6570\u6c42\u548c

    template<typename T>\nT sum(T t){\n    return t;\n}\ntemplate<typename T, typename ... Types>\nT sum(T first, Types ...rest){\n    return first + sum<T> (rest...);\n}\n\nsum(1, 2, 3, 4);\n

    \u9012\u5f52\u51fd\u6570\u5c55\u5f00\u53c2\u6570\u5305\u662f\u4e00\u79cd\u6807\u51c6\u505a\u6cd5\uff0c\u4e5f\u6bd4\u8f83\u597d\u7406\u89e3\uff0c\u4f46\u662f\u7f3a\u70b9\u65f6\u5fc5\u987b\u8981\u4e00\u4e2a\u91cd\u8f7d\u7684\uff08\u540c\u540d\uff09\u9012\u5f52\u7ec8\u6b62\u51fd\u6570\u6765\u7ec8\u6b62\u9012\u5f52\u3002

    \u6216\u8005\u4e0d\u9012\u5f52\u65b9\u5f0f\uff0c\u8fd9\u79cd\u65b9\u5f0f\u9700\u8981\u501f\u52a9\u9017\u53f7\u8868\u8fbe\u5f0f\u548c\u521d\u59cb\u5316\u5217\u8868\u3002\u524d\u9762\u7684print\u53ef\u4ee5\u8fd9\u4e48\u5199

    template<class T>\nvoid printarg(T t){\n    cout << t << endl;\n}\n\ntemplate <class ...Args>\nvoid expand(Args... args){\n    int arr[] = {(printarg(args), 0)...};\n}\n\nexpand(1, 2, 3, 4);\n

    arr\u8fd9\u4e2a\u6570\u7ec4\u7684\u76ee\u7684\u5355\u7eaf\u662f\u5c55\u5f00\u53c2\u6570\u5305

    \u5982\u679c\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u5c31\u53ef\u4ee5\u652f\u6301lambda\u8868\u8fbe\u5f0f

    template<class F, class... Args> void expand(const F& f, Args&&...args){\ninitializer_list<int>{(f(std::forward< Args>(args)), 0)};\n}\nexpand([](int i){cout << i << endl;}, 1,2,3);\n

    \u53ef\u4ee5\u5e26\u4efb\u610f\u4e2a\u6570\u4e0d\u540c\u7684\u53c2\u6570\uff0c\u6bd4\u5982std::tuple

    template<class... Types>\nclass tuple;\n

    \u6a21\u677f\u504f\u7279\u5316\u548c\u9012\u5f52\u65b9\u5f0f\u5c55\u5f00\u53c2\u6570\u5305

    \u53ef\u53d8\u53c2\u6570\u6a21\u677f\u7c7b\u7684\u5c55\u5f00\u4e00\u822c\u9700\u8981\u5b9a\u4e49\u4e24\u5230\u4e09\u4e2a\u7c7b\uff0c\u5305\u62ec\u7c7b\u58f0\u660e\u548c\u504f\u7279\u5316\u7684\u6a21\u677f\u7c7b

    // \u524d\u5411\u58f0\u660e\ntemplate<typename... Args>\nstruct Sum;\n\n// \u57fa\u672c\u5b9a\u4e49\ntemplate<typename First, typename... Rest>\nstruct Sum<First, Rest...>{\n    enum { value = Sum<First>::value + Sum<Rest...>::value };\n}\n\n// \u9012\u5f52\u7ec8\u6b62\ntemplate<typename Last>\nstruct Sum<Last>{\n    enum { value = sizeof(Last) };\n}\n

    ","text":""},{"location":"CS/CPP/templates/#stl","title":"\u6807\u51c6\u6a21\u677f\u5e93 STL

    STL\u516d\u5927\u90e8\u4ef6\uff1a\u5bb9\u5668\uff08containers\uff09\uff0c\u5206\u914d\u5668\uff08allocators\uff09\uff0c\u7b97\u6cd5\uff08algorithm\uff09\uff0c\u8fed\u4ee3\u5668\uff08iterator\uff09\uff0c\u9002\u914d\u5668\uff08adapters\uff09\uff0c\u4eff\u51fd\u6570\uff08functors\uff09

    ","text":""},{"location":"CS/CPP/templates/#_1","title":"\u5e38\u7528\u7684\u5bb9\u5668","text":"

    vector, deque, list, set/multiset, map/multimap \u7b49

    "},{"location":"CS/CPP/templates/#1-vector","title":"1. Vector","text":"

    Vector\u662f\u4e00\u79cd\u53d8\u957f\u6570\u7ec4\u3002

    #include<vector>\nusing namespace std;\nvector<int> name;\nvector<double> name;\nvector<char> name;\nvector<struct node> name;\n// \u8fd9\u4e24\u4e2a\u4e3b\u8981\u6709\u901f\u5ea6\u4e0a\u7684\u533a\u522b\uff0carray\u975e\u5e38\u6162\uff0cvector\u5feb\u4e00\u4e9b\nvector< vector<int> > name; // > >\u4e4b\u95f4\u8981\u52a0\u7a7a\u683c\uff0c\u65b0\u6807\u51c6\u4e0d\u7528\u52a0\u4e86\nvector<int> array[SIZE]; // \u8fd9\u4e2a\u4e0d\u662f\u5f88\u5e38\u7528\uff0c\u56e0\u4e3a\u5bb9\u6613\u51fa\u9519\uff0c\u4e14\u6570\u7ec4\u4e0d\u77e5\u9053\u81ea\u5df1\u7684\u957f\u5ea6\uff0c\u8fd8\u6709std::array\n

    \u8bbf\u95ee\u65b9\u5f0f

    // 1. \u901a\u8fc7\u4e0b\u6807\n#include<iostream>\n#include<vector>\nusing namespace std;\nint main()\n{\nvector<int> vi;\nvi.push_back(1);\ncout<<vi[0]<<endl;\nreturn 0;\n}\n// 2. \u901a\u8fc7\u8fed\u4ee3\u5668\nvector<int>::iterator\nvector<double>::iterator\n// \u4f8b\n#include<iostream>\n#include<vector>\nint main()\n{\nvector<int> v;\nfor(int i = 0; i < 5; i++)\n{\nv.push_back(i); }\nvector<int>::iterator it=v.begin();\nfor(int i = 0; i < v.size(); i++)\n{\ncout << it[i] << \" \";\n// \u4e5f\u53ef\u4ee5\u5199\u6210 cout << * (it + i) << \" \";\n}\nreturn 0;\n}\n// \u6216\u8005\u4f18\u96c5\u7684\u5199\u6cd5\n// \u56e0\u4e3a\u8fed\u4ee3\u5668\u4e0d\u652f\u6301 it < v.end()\u7684\u5199\u6cd5\uff0c\u53ea\u80fd\u5199!=\nfor (vector<int>::iterator it=v.begin(); it!=v.end();it++)\n{\ncout << *it << \" \";\n}\n
    \u5e38\u7528\u51fd\u6570
    push_back(item) // \u5728vector\u540e\u9762\u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\npop_back(item) // \u5728vector\u540e\u9762\u5220\u9664\u4e00\u4e2a\u5143\u7d20\nsize(vector) // \u8fd4\u56de\u5143\u7d20\u4e2a\u6570\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(1)\nclear(vector) // \u6e05\u9664\u6240\u6709\u5143\u7d20\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(N)\ninsert(position, x) // \u5728position\u7684\u5730\u65b9\u63d2\u5165\u4e00\u4e2ax\n// \u4f8b\nv.insert(v.begin()+2, -1); // \u76f8\u5f53\u4e8e\u5728v[2]\u5904\u63d2\u5165\u4e00\u4e2a-1\nerase(position);\nerase(positionBegin, positionEnd);  // \u5de6\u95ed\u53f3\u5f00\n

    "},{"location":"CS/CPP/templates/#2-set","title":"2. set","text":"

    \u96c6\u5408\u662f\u4e0d\u5141\u8bb8\u5143\u7d20\u91cd\u590d\u7684\u65e0\u5e8f\u5bb9\u5668

    #include<set>\nusing namespace std;\nset<int> name;\nset<double> name;\nset<char> name;\nset<struct node> name;\nset<set<int> > name;\n
    \u56e0\u4e3a\u65e0\u5e8f\uff0cset\u53ea\u80fd\u901a\u8fc7iterator\u8bbf\u95ee\uff0c\u9664\u4e86vector\u548cstring\u4e4b\u5916\u7684\u5bb9\u5668\u90fd\u4e0d\u80fd\u901a\u8fc7\u4e0b\u6807\u8bbf\u95ee
    set<int>::iterator it;\nset<char>::iterator it;\n
    \u5e38\u7528\u51fd\u6570
    st.insert(X);\nst.find(X); // \u8fd4\u56deset\u4e2dvalue\u6240\u5bf9\u5e94\u7684\u8fed\u4ee3\u5668\uff0c\u4e5f\u5c31\u662fvalue\u7684\u6307\u9488\n// \u4f8b\nset<int>::iterator it = st.find(2);\ncout << *it << endl;\n// \u53ef\u4ee5\u76f4\u63a5\u5199\u6210\ncout << *(st.find(2)) << endl;\nst.erase(it); // \u5220\u9664\u67d0\u4e2a\u5730\u5740\u7684\u5143\u7d20\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(1)\nst.erase(X); // \u5220\u9664\u67d0\u4e2a\u5143\u7d20\uff0c\u65f6\u95f4\u590d\u6742\u5ea6O(N)\nst.erase(itBegin, itEnd);\nst.size();\n

    "},{"location":"CS/CPP/templates/#3-deque","title":"3. deque","text":"

    deque\u662f\u7531\u4e00\u6bb5\u5b9a\u91cf\u8fde\u7eed\u7a7a\u95f4\u6784\u6210\uff0c\u4e00\u65e6\u8981\u5728deque\u7684\u524d\u7aef\u548c\u5c3e\u7aef\u589e\u52a0\u7a7a\u95f4\uff0c\u4fbf\u914d\u7f6e\u4e00\u6bb5\u8fde\u7eed\u7a7a\u95f4\uff0c\u4e32\u5728\u6574\u4e2adeque\u7684\u5934\u90e8\u548c\u5c3e\u90e8.

    "},{"location":"CS/CPP/templates/#4-list","title":"4. list","text":""},{"location":"CS/CPP/templates/#5-mapunordered_map","title":"5. map/unordered_map","text":""},{"location":"CS/CPP/templates/#6-string","title":"6. string","text":"
    // init\n#include<string>\nstring str;\nstring str = \"Hello\";\ncin >> str;\ncout << str;\n// assignment\nchar cstr1[20];\nchar cstr2[20] = \"jaguar\";\nstring str1;\nstring str2 = \"panther\";\ncstr1 = cstr2; // illegal\nstr1 = str2; // legal\n// concatenation\nstring str3;\nstr3 = str1 + str2;\nstr1 += str2;\nstr1 += \"a string literal\";\n// constructors (Ctors)\nstring (const char *cp, int len);\nstring (const string& s2, int pos);\nstring (const string& s2, int pos, int len);\n// sub-string\nsubstr (int pos, int len);\n// modification\nassign (...);\ninsert (...);\ninsert (int pos, const string& s);\nerase (...);\nappend (...);\nreplace (...);\nreplace (int pos, int len, const string& s);\n...\n// search\nfind (const string& s);\n// File I/O\n#include <ifstream> // read from file\n#include <ofstream>  // write to file\n// write into file\nofstream File1(\"...\");\nFile1 << \"Hello world\" << std::enl;\n// read from file\nifstream File2(\"...\");\nstd::string str;\nFile2 >> str;\n
    "},{"location":"CS/CPP/templates/#_2","title":"\u7b97\u6cd5","text":"

    \u7b97\u6cd5\u90e8\u5206\u4e3b\u8981\u7531<algorithm> <numeric> <functional>\u7ec4\u6210 <algorithm>\u662f\u6700\u5927\u7684\u4e00\u4e2a <numeric>\u4f53\u79ef\u5f88\u5c0f\uff0c\u53ea\u5305\u62ec\u51e0\u4e2a\u5728\u5e8f\u5217\u4e0a\u8fdb\u884c\u7b80\u5355\u6570\u5b66\u8fd0\u7b97\u7684\u6a21\u677f\u51fd\u6570 <functional>\u5b9a\u4e49\u4e86\u4e00\u4e9b\u6a21\u677f\u7c7b\uff0c\u7528\u4ee5\u58f0\u660e\u51fd\u6570\u5bf9\u8c61

    "},{"location":"CS/CPP/templates/#iterator","title":"\u8fed\u4ee3\u5668 Iterator","text":"

    \u7528\u8fed\u4ee3\u5668\u53ef\u4ee5\u8bfb\u53d6\u5b83\u6307\u5411\u7684\u5143\u7d20\u3002\u8fed\u4ee3\u5668\u540d\u5c31\u8868\u793a\u8fed\u4ee3\u5668\u6307\u5411\u7684\u5143\u7d20\uff0c\u901a\u8fc7\u975e\u5e38\u91cf\u8fed\u4ee3\u5668\u8fd8\u80fd\u4fee\u6539\u5176\u6307\u5411\u7684\u5143\u7d20\u3002

    #include<iostream> #include<vector> using namespace std; int main() { vector<int> v; for (int n = 0; n < 5; ++n) v.push_back(n); vector<int>::iterator i; for (i = v.begin(); i != v.end(); i++) { cout << *i << \" \"; // *i \u662f i \u6307\u5411\u7684\u5143\u7d20 *i *= 2; \n} }\n

    "},{"location":"CS/CPP/templates/#stl_1","title":"\u7c7b\u5e93\u548cSTL

    STL\u662f\u8303\u578b\u7a0b\u5e8f\u8bbe\u8ba1\u7684\u4e00\u4e2a\u8303\u4f8b\uff0c\u542b\uff1a\u5bb9\u5668\uff08container\uff09\u3001\u8fed\u4ee3\u5668\uff08iterator\uff09\u3001\u7b97\u6cd5\uff08algorithm\uff09\u3001\u51fd\u6570\u5bf9\u8c61\uff08function object\uff09\u3002\u7c7b\u5e93\u662f\u7c7b\u7684\u96c6\u5408\uff0c\u662f\u4e00\u79cd\u9884\u5b9a\u4e49\u7684\u9762\u5411\u5bf9\u8c61\u7684\u7a0b\u5e8f\u5e93\u3002

    ","text":""},{"location":"CS/CPP/templates/#c","title":"C++\u7684\u6807\u51c6\u5e93","text":"

    using namespace std;

    "},{"location":"CS/CPP/templates/#stl_2","title":"STL\u4e2d\u7684\u5bb9\u5668\u7c7b","text":"

    \u5bb9\u5668\uff08container\uff09\u7c7b\u662f\u7528\u6765\u5bb9\u7eb3\u3001\u5305\u542b\u4e00\u7ec4\u5143\u7d20\u6216\u5143\u7d20\u96c6\u5408\u7684\u5bf9\u8c61\u7684\u3002STL\u4e2d\u5b9a\u4e49\u4e86\u591a\u79cd\u4e0d\u540c\u7c7b\u578b\u7684\u5bb9\u5668\uff0c\u4f8b\u5982

    "},{"location":"CS/CPP/templates/#vector","title":"\u5411\u91cf vector","text":"

    \u5b9a\u4e49

    vector<int> iv;\nvector<int> cv(5);\nvector<int> cv(5, 'x');\nvector<int> iv2(iv);\n

    \u4f7f\u7528

    #include<iostream>\n#include<vector>\nusing namespace std;\nint main()\n{\nvector<char> v;  // create zero-len vector\nint i;\n// put values into a vector\nfor (i = 0; i < 10; i++)\nv.push_back('A' + i);\n// can access vector contents using subsripting\nfor (i = 0; i < 10; i++)\ncout << v[i] << \" \";\ncout << endl;\n// access via iterator\nvector<char>::iterator p = v.begin();\nwhile(p != v.end())\n{\ncout << *p << \" \";\np++;\n}\nreturn 0;\n}\n
    "},{"location":"CS/CPP/templates/#list","title":"\u7ebf\u6027\u8868 list","text":"

    \u5b9a\u4e49\u4e86\u53cc\u5411\u7684\u7ebf\u6027\u8868\uff0c\u53c8\u53ef\u79f0\u4e3a\u53cc\u5411\u94fe\u8868\u3002list\u7c7b\u53ea\u652f\u6301\u987a\u5e8f\u8bbf\u95ee\u3002

    // sort a list\n#include<iostream>\n#include<list>\n#include<cstdlib>\nusing namespace std;\nint main()\n{\nint i;\nlist<char> lst;\n// create a list of random characters\nfor (i = 0; i < 10; i++)\nlist.push_back('A' + (rand()%26));\n}\n
    "},{"location":"CS/CPP/templates/#set","title":"\u96c6\u5408 set","text":"
    #include<set>\n#include<iostream>\n#include<string>\nint main()\n{\nstd::set<std::string> source;\nstd::string input;\nfor(int i=0;i<6;i++)\n{\nstd::cin>>input;\nsource.insert(input);\n}\nstd::set<std::string>::iterator at = source.begin();\nwhile(at != source.end())\nstd::cour << * at++ << std::endl;\n}\n
    "},{"location":"CS/CPP/templates/#multiset","title":"multiset","text":""},{"location":"CS/CPP/templates/#map","title":"\u6620\u5c04 map","text":""},{"location":"CS/CPP/templates/#queue","title":"\u961f\u5217 queue","text":""},{"location":"CS/CPP/templates/#stdstack","title":"std::stack","text":""},{"location":"CS/CPP/templates/#stdpair","title":"std::pair","text":""},{"location":"CS/CPP/templates/#string","title":"\u5b57\u7b26\u4e32string","text":""},{"location":"CS/CPP/templates/#_3","title":"\u7b97\u6cd5\u5e93 ` ","text":""},{"location":"CS/CPP/templates/#sort","title":"\u6392\u5e8f\u7b97\u6cd5sort","text":"
    #include<algorithm>\n#include<iostream>\n#include<string>\n#include<vector>\nusing namespace std;\nvoid load(vector<string>&);\nvoid print(vector<string>);\nconst int SIZE = 8;\nint main()\n{\nvector<string> v(SIZE);\nload(v);\nsort(v.begin(), v.end());  // \u6307\u5b9a\u6392\u5e8f\u7684\u8d77\u6b62\u4f4d\u7f6e\nprint(v);\nreturn 0;\n}\n// \u4f1a\u6309\u7167\u5b57\u6bcd\u5e8f\u6392\u5e8f\n
    "},{"location":"CS/CPP/templates/#_4","title":"\u8fed\u4ee3\u5668

    \u662f\u4e00\u79cd\u7c7b\u4f3c\u6307\u9488\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fed\u4ee3\u5668\u6765\u8bbf\u95ee\u5bb9\u5668\u4e2d\u7684\u5143\u7d20\u3002

    ","text":""},{"location":"CS/CPP/templates/#reverse-iterator","title":"\u53cd\u5411\u8fed\u4ee3\u5668 reverse iterator","text":"
    #include<list>\n#include<iostream>\nint main()\n{\nusing namespace std;\nlist<int> c1;\nlist<int>::iterator c1_Iter;\nlist<int>::reverse_iterator c1_rIter;\nc1_rIter = c1.rbegin(); // the last element\n}\n
    "},{"location":"CS/CPP/templates/#_5","title":"\u53c2\u8003\u8d44\u6599

    https://zhuanlan.zhihu.com/p/344558356 LJJ PPT

    ","text":""},{"location":"CS/OS/","title":"\u7d22\u5f15","text":"

    \u6211\u89c9\u5f97 x+i for i in [x, y, g] \u4e09\u4f4d\u7684\u7b14\u8bb0\u5bf9\u4e8e\u8fd9\u95e8\u8bfe\u7406\u8bba\u90e8\u5206\u7684\u4ecb\u7ecd\u5df2\u7ecf\u975e\u5e38\u5145\u5206\u4e86\u3002\u5927\u5bb6\u53ef\u4ee5\u5728\u6211 root \u7d22\u5f15\u9875\u6307\u5411\u7684 xy \u7b14\u8bb0\u627e\u5230\u6211\u8fd9\u91cc\u63d0\u5230\u7684\u4e09\u4efd\u7b14\u8bb0\u3002

    \u6211\u4ecd\u8981\u5199\u8fd9\u95e8\u8bfe\u7684\u5b9e\u9a8c\u90e8\u5206\u7684\u539f\u56e0\u662f\uff0c\u81ea\u5df1\u89c9\u5f97\u5b9e\u9a8c\u624b\u518c\u5199\u5f97\u4ecd\u6709\u4e00\u4e9b\u5bfc\u81f4\u4e0d\u592a\u597d\u7406\u89e3\u7684\u7f3a\u9677\uff0c\u6bd4\u5982\u7406\u8bba\u548c\u64cd\u4f5c\u5206\u6210\u4e0a\u4e0b\u4e24\u5927\u5757\u6765\u5199\uff0c\u5bfc\u81f4\u67e5\u8d77\u6765\u7684\u65f6\u5019\u50cf\u5728\u5403\u4e00\u76d8\u94a2\u4e1d\u7403\u7092\u610f\u5927\u5229\u9762\uff0c\u6bd4\u5982\u6709\u65f6\u5728\u8bf4\u64cd\u4f5c\u65f6\u4e0d\u5206\u5df2\u7ecf\u5b9e\u73b0\u597d\u7684/\u6211\u8981\u505a\u7684/linux\u4f1a\u505a\u4f46\u662f\u6211\u4eec\u4e0d\u5173\u5fc3\u7684\u3002

    \u6211\u7684\u9884\u671f\u662f\u628a\u8fd9\u4efd\u7b14\u8bb0\u5199\u6210\u4e00\u5757\u4e00\u5757\u7684\u4e1c\u897f\uff0c\u6bcf\u4e00\u5757\u662f\u4e00\u4e2a\u7406\u8bba+\u64cd\u4f5c+\u4e00\u4e2a\u80fd\u8dd1\u8d77\u6765\u7684\u6700\u5c0f\u5355\u5143\u3002\u73b0\u5b9e\u662f\u6211\u7684\u65f6\u95f4\u771f\u7684\u592a\u4e0d\u8db3\u4e86\uff0c\u611f\u89c9\u53ea\u6765\u5f97\u53ca\u53bb\u8865\u5145\u4e00\u4e9b\u5b9e\u9a8c\u624b\u518c\u91cc\u6ca1\u6709\u5199\u7684\u80cc\u666f\u6216\u8005\u662f\u6211\u81ea\u5df1\u64cd\u4f5c\u65f6\u7684\u4e00\u4e9b\u5fc3\u5f97\u6216\u603b\u7ed3\uff0c\u53ea\u80fd\u5f53\u5b9e\u9a8c\u624b\u518c\u7684\u8865\u5145\u6765\u770b\u3002\u7136\u540e\u672c\u6765\u8fd9\u91cc\u5e94\u5f53\u6709\u4e00\u53e5\u5e0c\u671b\u4ee5\u540e\u6709\u65f6\u95f4\u80fd\u5199\u5b8c\uff0c\u4f46\u662f\u6211\u4e5f\u4e0d\u60f3\u8fd9\u6837\u627f\u8bfa\u4e86\uff0c\u6211\u66f4\u613f\u610f\u8bf4\u4e00\u4e9b\u73b0\u5b9e\u7684\u6bd4\u5982\u6211\u4e0d\u4f1a\u518d\u66f4\u65b0\u8fd9\u4efd\u7b14\u8bb0\u4e86\uff0c\u4f46\u662f\u5e0c\u671b\u8bfb\u8005\u505a\u5b9e\u9a8c\u7684\u65f6\u5019\u53ef\u4ee5\u5e26\u7740\u4e0a\u8ff0\u63d0\u5230\u7684\u601d\u8def\u53bb\u6574\u7406\u81ea\u5df1\u7684\u601d\u7ef4\u548c\u5b9e\u9a8c\u62a5\u544a\u3002

    \u63a5\u4e0b\u6765\u8bf7\u70b9\u8fdb\u53e6\u4e00\u4e2a lab \u9875\u9762\u7ee7\u7eed\u9605\u8bfb\u3002

    "},{"location":"CS/OS/lab/","title":"OS lab","text":"

    \u76ee\u5f55\uff1a\u8fd9\u91cc\u4f1a\u5148\u8bb2\u4e00\u4e0b\u7528\u5230\u7684\u80cc\u666f\u77e5\u8bc6\u548c mac \u4e0b\u7684\u73af\u5883\u914d\u7f6e\u6280\u5de7\uff08\u56e0\u4e3a\u624b\u518c\u8bb2 mac \u4e0d\u591a\uff09\uff0c\u7136\u540e\u6328\u4e2a\u5b9e\u9a8c\u6211\u60f3\u8fdb\u884c\u4e00\u4e9b\u7efc\u8ff0\uff0c\u4e0d\u77e5\u9053\u7cbe\u529b\u80fd\u652f\u6491\u5199\u591a\u5c11\uff0c\u6700\u540e\u8865\u5145\u4e24\u4e2a\u6211\u5b9e\u9a8c\u4e2d\u603b\u9047\u5230\u7684\u4f46\u624b\u518c\u6ca1\u6d89\u53ca\u7684\u95ee\u9898\u3002\u81ea\u77e5\u5b66\u5f97\u4e0d\u597d\uff0c\u4e0d\u786e\u5b9a\u7684\u5730\u65b9\u6211\u4f1a\u6807\u51fa\u6765\u3002

    "},{"location":"CS/OS/lab/#overview","title":"overview","text":"

    Warning

    \u7ed3\u6784\u56fe TODO

    \u4e00\u4e2a\u6700\u540e\u505a\u51fa\u6765\u7684 lab \u7ed3\u6784\u56fe:

    "},{"location":"CS/OS/lab/#_1","title":"\u80cc\u666f\u77e5\u8bc6","text":"

    \u5148\u4ecb\u7ecd\u4e00\u4e0b\u6574\u4e2a\u5b9e\u9a8c\u548c\u5b9e\u9a8c\u73af\u5883\u7684\u5927\u80cc\u666f\u3002

    "},{"location":"CS/OS/lab/#os","title":"\u8ba1\u7b97\u673a\u4e0a\u7535\u5230OS\u8fd0\u884c\u7684\u8fc7\u7a0b","text":"

    \u5d4c\u5165\u5f0f\u7cfb\u7edf\uff08\u76f8\u6bd4\u8ba1\u7b97\u673a\u7cfb\u7edf\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u80fd\u5728\u7279\u5b9a\u786c\u4ef6\u4e0a\u8fd0\u884c\uff09\u7684\u542f\u52a8\u8fc7\u7a0b\u6bd4\u8f83\u7b80\u5355\uff0c\u7528\u5b83\u6765\u505a\u4f8b\u5b50\u8bb2\u89e3\uff0c\u8fc7\u7a0b\u662f\uff1a

    Hardware             RISC-V M Mode           RISC-V S Mode \n+------------+         +--------------+         +----------+\n|  Power On  |  ---->  |  Bootloader  |  ---->  |  Kernel  |\n+------------+         +--------------+         +----------+\n
    "},{"location":"CS/OS/lab/#sbiopensbi","title":"sbi\u548copensbi","text":"

    \u4ecb\u7ecd\u5b9e\u9a8c\u73af\u5883\u7528\u7684\u7b2c\u4e00\u4e2a\u5de5\u5177\uff1asbi (supervisor binary interface)\u662f s-mode \u7684 kernel \u548c m-mode \u6267\u884c\u73af\u5883\u4e4b\u95f4\u7684\u63a5\u53e3\u89c4\u8303

    opensbi\u662f\u4e00\u4e2ariscv sbi\u89c4\u8303\u7684\u5f00\u6e90\u5b9e\u73b0\uff0c\u603b\u4e4b\u610f\u601d\u662fopensbi\u662f\u4e00\u4e9b\u5bf9m-mode\u4e0b\u786c\u4ef6\u7684\u7edf\u4e00\u5b9a\u4e49\uff0c\u5728s-mode\u4e0b\u7684\u5185\u6838\u53ef\u4ee5\u6309\u7167\u8fd9\u4e9b\u89c4\u8303\u5bf9\u4e0d\u540c\u786c\u4ef6\u64cd\u4f5c\u3002

    \u6211\u4eecopensbi\u53ef\u4ee5\u4f5c\u4e3abootloader\u5b8c\u6210\u673a\u5668\u542f\u52a8\u65f6m-mode\u4e0b\u7684\u786c\u4ef6\u521d\u59cb\u5316\u548c\u5bc4\u5b58\u5668\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u5229\u7528opensbi\u5b8c\u6210\u5b57\u7b26\u6253\u5370\u4e4b\u7c7b\u7684\u64cd\u4f5c\u3002

    qemu\u4f1a\u628aopensbi\u8d77\u59cb\u5730\u5740\u52a0\u8f7d\u52300x80000000\u5904.

    opensbi\u521d\u59cb\u5316\u540e\u4f1a\u8df3\u8f6c\u52300x80200000\u5904\uff0c\u5373kernel\u7684\u8d77\u59cb\u5730\u5740\u3002\u6240\u4ee5\u8981\u7f16\u8bd1\u7684\u4ee3\u7801\u57280x80200000\u5904\u3002

    "},{"location":"CS/OS/lab/#_2","title":"\u7279\u6743\u6a21\u5f0f","text":"

    riscv\u6709\u4e09\u79cd\u7279\u6743\u6a21\u5f0f\uff1aUser, Supervisor, & Machine\u3002\u6574\u4e2a\u5b9e\u9a8c\u4e2d\u6211\u4eec\u4e00\u5f00\u59cb\u90fd\u8981\u5728 s-mode \u64cd\u4f5c\uff0c\u4e4b\u540e\u6162\u6162\u5b9e\u73b0 u-mode\u3002

    Level Encoding Name Abbreviation \u4ecb\u7ecd 0 00 User/Application U \u5bf9\u786c\u4ef6\u6a21\u5f0f\u7684\u62bd\u8c61\uff0c\u6709\u6700\u9ad8\u7ea7\u522b\u7684\u6743\u9650 1 01 Supervisor S \u5bf9\u5e94\u4e0e\u5185\u6838\u6001Kernel\u3002\u5f53\u7528\u6237\u9700\u8981\u5185\u6838\u8d44\u6e90\u65f6\uff0c\u5411\u5185\u6838\u7533\u8bf7\uff0c\u5e76\u5207\u6362\u5230\u5185\u6838\u6001\u8fdb\u884c\u5904\u7406 2 10 Reserved 3 11 Machine M \u7528\u6237\u6001\uff0c\u6700\u4f4e\u7ea7\u522b\u6743\u9650

    \u4e00\u822c\u6bcf\u79cd\u6a21\u5f0f\u53ef\u4ee5\u8fd0\u884c\u7684\u7a0b\u5e8f\u6709

    supported modes intended usage M simple embedded systems M, U secure embedded systems M, S, U systems running unix-like operating systems"},{"location":"CS/OS/lab/#_3","title":"\u73af\u5883\u914d\u7f6e","text":""},{"location":"CS/OS/lab/#docker","title":"Docker","text":"

    \u5728\u5b98\u7f51\u5b89\u88c5Docker\u3002\u4e4b\u540e\u9700\u8981\u6253\u5f00Docker app\uff0c\u767b\u9646\u540e\u624d\u80fd\u5728terminal\u4e2d\u4f7f\u7528docker\u547d\u4ee4\u3002

    $ sudo hdiutil attach Docker.dmg\n$ sudo /Volumes/Docker/Docker.app/Contents/MacOS/install\n$ sudo hdiutil detach /Volumes/Docker\n

    \u521b\u5efa\u5bb9\u5668

    docker pull ubuntu:22.04\ndocker run -it --name my_linux ubuntu:22.04 bash\n

    \u51fa\u73b0root@xxxxxxx:?# \u5373\u521b\u5efa\u6210\u529f\uff0c\u5176\u4e2dxxxxxxx\u4e00\u4e32\u662f\u5f53\u524d\u5bb9\u5668\u7684id\uff0c\u9700\u8981\u8bb0\u5f55\u4e0b\u6765\uff0c\u4e0b\u6b21\u53ef\u4ee5\u901a\u8fc7\u8be5id\u8fdb\u5165\u76f8\u540c\u5bb9\u5668\u3002

    \u5b89\u88c5\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u5305\uff0cqemu\uff0cgdb\uff0c\u8fd9\u51e0\u6b65\u9700\u8981\u5f00\u7740\u547d\u4ee4\u884c\u4ee3\u7406\uff0c\u622a\u56fe\u7565\u3002

    "},{"location":"CS/OS/lab/#docker_1","title":"\u806a\u660e\u5730\u4f7f\u7528docker","text":"

    \u8fd8\u662f\u6700\u597d\u914d\u7f6e\u4e00\u4e0b vscode \u91cc\u7684\u56fe\u5f62\u754c\u9762\u3002\u6b65\u9aa4\uff1a

    "},{"location":"CS/OS/lab/#_4","title":"\u65b9\u6cd5\u4ecb\u7ecd","text":"

    Warning

    TODO \u8fd9\u5757\u5e94\u8be5\u518d\u6269\u5199\u4e00\u4e0b\u7684

    "},{"location":"CS/OS/lab/#qemu-gdb","title":"qemu + gdb \u8c03\u8bd5","text":"

    \u9700\u8981\u8c03\u8bd5\u65f6\uff0c\u56e0\u4e3a\u9876\u5c42 makefile \u5e2e\u6211\u4eec\u5199\u597d\u4e86\u8c03\u8bd5\u547d\u4ee4\uff0c\u6211\u4eec\u7b2c\u4e00\u4e2a terminal \u53ea\u9700\u8981\u8f93\u5165 make debug\u3002 \u7136\u540e\u65b0\u5f00\u4e00\u4e2a terminal \u8f93\u5165 gdb-multiarch path/to/vmlinux \u5176\u4e2d vmlinux \u662f\u7f16\u8bd1\u597d\u7684\u6587\u4ef6\u3002

    gdb \u4f7f\u7528\u7684\u65b9\u6cd5/\u7a8d\u95e8

    \u663e\u793a\u6709\u5173\u7684 \u7b80\u5199 \u6307\u4ee4 \u663e\u793a\u6e90\u4ee3\u7801 layout src \u663e\u793a\u6c47\u7f16\u4ee3\u7801 layout asm \u9000\u51fa\u6c47\u7f16\u663e\u793a ctrl+x, A \u9000\u51fagdb quit \u6267\u884c\u6709\u5173\u7684 \u7b80\u5199 \u6307\u4ee4 \u5355\u6b65\u6267\u884c\uff0c\u8fd0\u884c\u7a0b\u5e8f\uff0c\u505c\u5728\u7b2c\u4e00\u6267\u884c\u8bed\u53e5 start \u65ad\u70b9\u540e\u7ee7\u7eed\u6267\u884c c continue \u5355\u6b65\u8c03\u8bd5\uff08\u9010c\u8bed\u8a00\u8bed\u53e5\uff0c\u51fd\u6570\u76f4\u63a5\u6267\u884c\uff09 n next \u6267\u884c\u5355\u6761\u6307\u4ee4 si step instruction \u91cd\u65b0\u5f00\u59cb\u8fd0\u884c\u6587\u4ef6\uff08run-text\uff1a\u52a0\u8f7d\u6587\u672c\u6587\u4ef6\uff0crun-bin\uff1a\u52a0\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6\uff09 r run \u7ed3\u675f\u5f53\u524d\u51fd\u6570\uff0c\u8fd4\u56de\u5230\u51fd\u6570\u8c03\u7528\u70b9 finish \u65ad\u70b9\u6709\u5173 \u7b80\u5199 \u6307\u4ee4 \u8bbe\u7f6e\u65ad\u70b9\u5728foo\u51fd\u6570 b foo break foo \u65ad\u5728\u67d0\u5730\u5740 b * 0x80200000 break * 0x80200000 \u67e5\u770b\u7b2cm\u4e2a-\u7b2cn\u4e2a\u65ad\u70b9 info breakpoints [LIST] \u67e5\u770b\u6240\u6709\u65ad\u70b9 info breakpoints \u5220\u9664N\u53f7\u65ad\u70b9 delete [N] \u5c55\u793a\u503c\u6709\u5173\u7684 \u7b80\u5199 \u6307\u4ee4 \u67e5\u770b\u51fd\u6570\u7684\u8c03\u7528\u7684\u6808\u5e27\u548c\u5c42\u7ea7\u5173\u7cfb bt backtrace \u5207\u6362\u51fd\u6570\u7684\u6808\u5e27 f frame \u6253\u5370\u503c\u53ca\u5730\u5740 p print \u67e5\u770b\u51fd\u6570\u5185\u90e8\u5c40\u90e8\u53d8\u91cf\u7684\u6570\u503c i ifo \u67e5\u770b\u5bc4\u5b58\u5668 ra \u7684\u503c i r ra \u8ffd\u8e2a\u67e5\u770b\u5177\u4f53\u53d8\u91cf\u503c display [] \u4ee5 16 \u8fdb\u5236\u6253\u5370\u00a0\u00a0\u5904\u5f00\u59cb\u7684 16 Bytes \u5185\u5bb9 x/4x \u663e\u793a\u6570\u7ec4 p *swapper_pg_dir@100 16\u8fdb\u5236\u663e\u793a\uff08x\u500d\u6570\u53ea\u80fd\u4e3a1\uff09 p/x swapper_pg_dir [start]@1

    \u8c03\u8bd5\u7684\u65f6\u5019\u9700\u8981\u770b\u4ec0\u4e48\u5462\uff1f

    \u8fd9\u662f\u6211\u521a\u4e0a\u624b\u8c03\u8bd5\u7684\u65f6\u5019\u611f\u5230\u56f0\u6270\u7684\u4e00\u4e2a\u95ee\u9898\u3002

    \u540e\u6765\u6211\u9010\u6e10\u60f3\u6e05\u695a\u7684\u662f\uff0c\u9996\u5148\u6211\u8ba4\u4e3a\u5982\u679c\u4e0d\u77e5\u9053\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\u8fd0\u884c\u7684\u6d41\u7a0b\uff08\u6bd4\u5982\u5148\u54ea\u4e2a\u51fd\u6570\u518d\u54ea\u4e2a\u51fd\u6570\uff09\uff0c\u662f\u4e0d\u9002\u5408\u5f00\u59cb\u8c03\u8bd5\u7684\uff0c\u5e94\u5f53\u56de\u53bb\u518d\u601d\u8003\u4e00\u904d lab \u7684\u7406\u8bba\uff0c\u8d77\u7801\u77e5\u9053\u81ea\u5df1\u7a0b\u5e8f\u7684\u5404\u79cd\u9884\u671f\u7ed3\u679c\u3002\u66b4\u8bba\u4e00\u70b9\u8bf4\u5176\u5b9e\u6211\u89c9\u5f97\u8c03\u8bd5\u65f6\u957f\u5927\u4e8e\u5f00\u53d1\u65f6\u957f\u90fd\u662f\u4e0d\u592a\u597d\u7684\uff0c\u66b4\u9732\u51fa\u80af\u5b9a\u54ea\u91cc\u7406\u8bba\u6ca1\u5543\u900f\u5c31\u5f00\u59cb\u52a8\u7b14\u4e86\u3002

    \u7136\u540e\u53ef\u4ee5\u7531\u5927\u5230\u5c0f\uff0c\u6bd4\u5982\u5148\u628a\u51e0\u4e2a\u65ad\u70b9\u6253\u5728\u731c\u6d4b\u53ef\u80fd\u51fa\u9519\u4e86\u7684\u51e0\u4e2a\u51fd\u6570\u4e0a\uff0c\u786e\u5b9a\u5177\u4f53\u5728\u54ea\u4e2a\u51fd\u6570\u51fa\u9519\u540e\u518d\u9010 c \u8bed\u8a00\u884c\u8fd0\u884c\uff0c\u786e\u5b9a\u662f\u54ea\u4e2a c \u8bed\u8a00\u884c\u51fa\u9519\u540e\u518d\u9010\u6c47\u7f16\u884c\u8fd0\u884c\uff0c\u5faa\u5e8f\u6e10\u8fdb\u627e\u5230\u5177\u4f53\u51fa\u9519\u7684\u6307\u4ee4\u3002\u5728\u9644\u8fd1\u6253\u5370\u6253\u5370\u51e0\u4e2a\u5bc4\u5b58\u5668\u7684\u503c\uff08\u53ef\u4ee5\u770b\u7684\u5bc4\u5b58\u5668\u6211\u4f1a\u5728\u4e0b\u4e00\u8282\u4ecb\u7ecd\uff09\uff0c\u7136\u540e\u5728\u6b64\u57fa\u7840\u4e0a\u601d\u8003\u9519\u8bef\u539f\u56e0\u3002

    "},{"location":"CS/OS/lab/#gdb","title":"\u806a\u660e\u5730\u4f7f\u7528 gdb","text":"

    gdb \u81ea\u5e26\u7684\u547d\u4ee4\u884c ui \u7f3a\u70b9\u4e3b\u8981\u5728\u4e8e\u4e0d\u80fd\u968f\u65f6\u663e\u793a\u5bc4\u5b58\u5668\u548c\u53d8\u91cf\u7684\u503c\uff0c\u8c03\u8bd5\u4f1a\u4e0d\u8212\u670d\u3002\u6709\u4e00\u4e9b\u66f4\u597d\u7684 ui \u5de5\u5177\u3002

    \u6211\u6ca1\u6709\u914d\u6240\u4ee5\u4e0d\u80fd\u63d0\u4f9b\u5f88\u597d\u7684\u6211\u7684\u63a8\u8350\uff0c\u8d34\u4e00\u4e9b\u522b\u4eba\u7684\u5e16\u5b50\u3002\u9664\u4e86\u4e0b\u9762\u5e16\u5b50\u91cc\u63d0\u5230\u7684\u51e0\u4e2a\uff0c\u8431\u8431\u8fd8\u63d0\u5230\u4e00\u4e2a gdbpeda\u3002

    \u63a8\u8350\u51e0\u4e2a\u597d\u7528\u7684GDB\u56fe\u5f62\u5316\u529f\u80fd\u589e\u5f3a\u63d2\u4ef6

    "},{"location":"CS/OS/lab/#lab0","title":"lab0","text":"

    \u6ca1\u96be\u5ea6\u4e0d\u7528\u8bb2

    "},{"location":"CS/OS/lab/#lab1","title":"lab1","text":""},{"location":"CS/OS/lab/#c-risc-v","title":"C & RISC-V \u5185\u8054\u6c47\u7f16","text":"

    Note

    \u8fd9\u5757\u6765\u81ea\u4e8e\u5bf9 lab1 \u6587\u6863\u7684\u6574\u7406\u3002\u5e0c\u671b\u6709\u6574\u7406\u5f97\u6bd4\u539f\u6587\u6863\u53ef\u8bfb\u4e00\u4e9b\u3002

    __asm__ volatile (\n\"instruction1\\n\"\n\"instruction2\\n\"\n......\n......\n\"instruction3\\n\"\n: [out1] \"=r\" (v1),[out2] \"=r\" (v2)\n: [in1] \"r\" (v1), [in2] \"r\" (v2)\n: \"memory\"\n);\n

    \u5176\u4e2d\uff0c\u4e09\u4e2a\u00a0:\u00a0\u5c06\u6c47\u7f16\u90e8\u5206\u5206\u6210\u4e86\u56db\u90e8\u5206\u3002\u8fd9\u56db\u90e8\u5206\u4e2d\u540e\u4e09\u90e8\u5206\u4e0d\u662f\u5fc5\u987b\u7684\uff1a

    \u8fd9\u6bb5\u6682\u65f6\u7528\u4e0d\u7740\u6211\u4e0d\u5199\u4e86\uff0c\u8d34\u4e00\u6bb5lab1\u4e2d\u7684\u539f\u6587\u7ed9\u7684\u793a\u4f8b\u3002e.g. 1

    unsigned long long s_example(unsigned long long type,unsigned long long arg0) {\nunsigned long long ret_val;\n__asm__ volatile (\n\"mv x10, %[type]\\n\"\n\"mv x11, %[arg0]\\n\"\n\"mv %[ret_val], x12\"\n: [ret_val] \"=r\" (ret_val)\n: [type] \"r\" (type), [arg0] \"r\" (arg0)\n: \"memory\"\n);\nreturn ret_val;\n}\n

    e.g. 1. \u4e2d\u6307\u4ee4\u90e8\u5206\uff0c%[type]\u3001%[arg0]\u4ee5\u53ca%[ret_val]\u4ee3\u8868\u7740\u7279\u5b9a\u7684\u5bc4\u5b58\u5668\u6216\u662f\u5185\u5b58\u3002\u8f93\u5165\u8f93\u51fa\u90e8\u5206\u4e2d\uff0c[type] \"r\" (type)\u4ee3\u8868\u7740\u5c06\u00a0()\u00a0\u4e2d\u7684\u53d8\u91cf\u00a0type\u00a0\u653e\u5165\u5bc4\u5b58\u5668\u4e2d\uff08\"r\"\u00a0\u6307\u653e\u5165\u5bc4\u5b58\u5668\uff0c\u5982\u679c\u662f\u00a0\"m\"\u00a0\u5219\u4e3a\u653e\u5165\u5185\u5b58\uff09\uff0c\u5e76\u4e14\u7ed1\u5b9a\u5230\u00a0[]\u00a0\u4e2d\u547d\u540d\u7684\u7b26\u53f7\u4e2d\u53bb\u3002[ret_val] \"=r\" (ret_val)\u00a0\u4ee3\u8868\u7740\u5c06\u6c47\u7f16\u6307\u4ee4\u4e2d\u00a0%[ret_val]\u00a0\u7684\u503c\u66f4\u65b0\u5230\u53d8\u91cf\u00a0ret_val \u4e2d\u3002

    e.g. 2

    #define write_csr(reg, val) ({\n__asm__ volatile (\"csrw \" #reg \", %0\" :: \"r\"(val)); })\n

    e.g. 2. \u5b9a\u4e49\u4e86\u4e00\u4e2a\u5b8f\uff0c\u5176\u4e2d\u00a0%0\u00a0\u4ee3\u8868\u7740\u8f93\u51fa\u8f93\u5165\u90e8\u5206\u7684\u7b2c\u4e00\u4e2a\u7b26\u53f7\uff0c\u5373\u00a0val\u3002 #reg\u00a0\u662fc\u8bed\u8a00\u7684\u4e00\u4e2a\u7279\u6b8a\u5b8f\u5b9a\u4e49\u8bed\u6cd5\uff0c\u76f8\u5f53\u4e8e\u5c06reg\u8fdb\u884c\u5b8f\u66ff\u6362\u5e76\u7528\u53cc\u5f15\u53f7\u5305\u88f9\u8d77\u6765\u3002\u4f8b\u5982\u00a0write_csr(sstatus,val)\u00a0\u7ecf\u5b8f\u5c55\u5f00\u4f1a\u5f97\u5230\uff1a

    ({\n__asm__ volatile (\"csrw \" \"sstatus\" \", %0\" :: \"r\"(val)); })\n

    \u6b64\u5916\uff0c\u8fd9\u4e2a\u793a\u4f8b\u4e2d\u7684\u00a0({...})\u00a0\u8fd8\u6d89\u53ca\u4e86\u4e00\u4e2a GNU \u5bf9 C \u7684\u6269\u5c55\uff0c\u53ef\u4ee5\u53c2\u8003\u00a0Statements and Declarations in Expressions\u3002\u590d\u5408\u8bed\u53e5\u4e2d\u7684\u6700\u540e\u4e00\u9879\u5e94\u8be5\u662f\u4e00\u4e2a\u8868\u8fbe\u5f0f\uff0c\u540e\u8ddf\u4e00\u4e2a\u5206\u53f7\u00a0;\u3002\u8be5\u5b50\u8868\u8fbe\u5f0f\u7684\u503c\u7528\u4f5c\u6574\u4e2a\u8bed\u53e5\u7684\u503c\uff0c\u53ef\u4ee5\u7528\u6765\u5b9e\u73b0\u7c7b\u4f3c\u201c\u8fd4\u56de\u503c\u201d\u7684\u6548\u679c\u3002

    "},{"location":"CS/OS/lab/#_5","title":"\u7f16\u8bd1\u7684\u77e5\u8bc6","text":"

    Note

    \u8fd9\u5757\u6765\u81ea\u4e8e\u5bf9 lab1 \u6587\u6863\u7684\u6574\u7406\u3002\u5e0c\u671b\u6709\u6574\u7406\u5f97\u6bd4\u539f\u6587\u6863\u53ef\u8bfb\u4e00\u4e9b\u3002

    `vmlinux.lds`` \u662f GNU ld\uff0c\u4e00\u79cd\u94fe\u63a5\u5668\uff0c\u5c06 .o \u6587\u4ef6\u548c\u5e93\u6587\u4ef6\u8fde\u63a5\u8d77\u6765\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002ld\u4f7f\u7528\u94fe\u63a5\u811a\u672clinker script\u63a7\u5236\u3002\u8fd9\u4e2a\u6587\u4ef6\u91cc\u6709\u5199\uff1a

    \u6211\u4eec\u9605\u8bfb\u4e00\u4e0b\u8fd9\u4e2a\u94fe\u63a5\u5668\u6587\u4ef6\uff0c\u5bf9\u4e4b\u540e\u7684\u5b9e\u9a8c\u5e2e\u52a9\u633a\u5927\u3002

    \u9996\u5148\u53ef\u4ee5\u7c97\u7565\u89c2\u5bdf\u5230\uff0ckernel \u7a7a\u95f4\u91cc\u662f\u5206\u6bb5(secition)\u7684\uff0c\u4e3b\u8981\u7684section\u6709\uff1a

    \u6bb5\u540d \u4e3b\u8981\u4f5c\u7528 .text \u901a\u5e38\u5b58\u653e\u7a0b\u5e8f\u6267\u884c\u4ee3\u7801 .rodata \u901a\u5e38\u5b58\u653e\u5e38\u91cf\u7b49\u53ea\u8bfb\u6570\u636e .data \u901a\u5e38\u5b58\u653e\u5df2\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf \u9759\u6001\u53d8\u91cf .bss \u901a\u5e38\u5b58\u653e\u672a\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf \u9759\u6001\u53d8\u91cf

    \u518d\u7ec6\u81f4\u4e00\u70b9\u53bb\u89c2\u5bdf\u91cc\u9762\u7684\u7b26\u53f7\u3002

    \u7f16\u8bd1\u51fa\u7684\u6587\u4ef6\u91cc\uff1a

    "},{"location":"CS/OS/lab/#risc-v","title":"RISC-V \u65f6\u949f\u4e2d\u65ad","text":"

    \u64cd\u4f5c\u7cfb\u7edf\u5728\u542f\u52a8\u540e\u7531\u4e8b\u4ef6(event)\u9a71\u52a8\uff0c\u6211\u4eec\u5c06\u5f15\u5165\u4e00\u79cd\u4e8b\u4ef6trap\uff0ctrap\u7ed9\u4e86os\u4e0e\u8f6f\u786c\u4ef6\u4ea4\u4e92\u7684\u80fd\u529b\u3002\u5728boot\u9636\u6bb5opensbi\u5b9e\u73b0\u4e86M\u6001\u7684trap\u5904\u7406\u3002\u6211\u4eec\u5b9e\u73b0\u7684\u662fs\u6001\u7684trap\u5904\u7406\u3002

    \u5e76\u4e14\u6211\u4eec\u660e\u786e\u4e00\u4e0b Interrupt, Exception \u548c Trap \u7684\u533a\u522b (from riscv unprivileged spec)\uff1a

    \u5b9e\u9a8c\u624b\u518c\u5219\u7ed9\u4e86\u4e0b\u8868\uff0c\u867d\u7136\u91cc\u9762\u6ca1\u6709\u8bb2\u5230 trap\uff0c\u4f46\u662f\u8fd9\u4e2a\u5bf9\u4e8e interrupt \u548c exception \u7684\u89e3\u91ca\u66f4\u6e05\u695a\u3002

    Interrupt Exception hardware generated software generated Asynchronous external requests (generated by e.g. keyboard or printer) synchronous internal requests for services based upon abnormal events (generated by e.g. illegal instructions, illegal address, overflow, etc.) normal events abnormal events

    \u7406\u89e3\u4e86\u4e0a\u8ff0\u4e24\u4e2a\u6982\u5ff5\u540e\u53ef\u4ee5\u628a trap \u5f53\u4f5c\u4e00\u79cd\u7edf\u79f0\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a trap = interrupt + exception\u3002\u6211\u4eec\u540e\u7eed\u5b9e\u73b0\u7684 trap_handler() \u65e2\u8981\u5904\u7406\u4e2d\u65ad\u4e5f\u8981\u5904\u7406\u5f02\u5e38\u3002

    \u8981\u5b9e\u73b0\u7684\u4e2d\u65ad\u7684\u6d41\u7a0b\u5982\u4e0b\uff0c\u53ef\u4ee5\u53c2\u7167\u8fd9\u4e2a\u5b8c\u6210 do_timer() switch_to() schedule() \u7b49\u51fd\u6570\uff1a

    "},{"location":"CS/OS/lab/#riscv","title":"RISCV \u5bc4\u5b58\u5668","text":"

    \u56de\u5fc6\u5185\u5b58\u7ed3\u6784\uff08\u5982\u679c\u4f60\u660e\u786e\u77e5\u9053\u5bc4\u5b58\u5668\u662f\u4ec0\u4e48\u5c31\u4e0d\u7528\u56de\u5fc6\u4e86\uff09\uff0c\u53ef\u89c1\u5bc4\u5b58\u5668\u5e76\u4e0d\u5728\u8fd0\u884c\u5185\u5b58\u91cc\uff1a

    \u5c0f/\u5feb <---------------> \u5927/\u6162\n[\u5bc4\u5b58\u5668] - [cache] - [\u5185\u5b58] - [\u5916\u5b58]\n

    riscv\u670932\u4e2a\u901a\u7528\u5bc4\u5b58\u5668 + \u5f88\u591a\u63a7\u5236\u72b6\u6001\u5bc4\u5b58\u5668 (control and status registers (CSRs))\u3002riscv \u7ed9\u6bcf\u4e2a\u5bc4\u5b58\u5668\u6709\u4e2a\u5143\u4fe1\u606f\uff0c\u8fd9\u4e2a\u5143\u4fe1\u606f\u5171\u7528 12-bit \u6765\u5b58\u50a8\u5373 csr[11:0]\uff0c\u6240\u4ee5\u4e00\u5171\u652f\u6301 4096 \u4e2a\u5bc4\u5b58\u5668\u3002\u5177\u4f53\u800c\u8a00\uff0ccsr[11:0] \u8fd9\u4e2a\u6570\u636e\u7ed3\u6784\u6bcf\u4e2a\u4f4d\u7684\u610f\u4e49\u5206\u914d\u5982\u4e0b\uff1a

    \u4f4d\u6570 11:10 9:8 7:4 \u957f\u5ea6 2 2 4 \u4f5c\u7528 11=read-only\uff0cother=read/write\uff1f \u80fd\u8bbf\u95ee\u8be5csr\u7684\u6700\u4f4e\u7684\u6743\u9650\u6a21\u5f0f \u6211\u731c\u662f\u4fdd\u7559\u7ed9\u6bcf\u4e2acsr\u7279\u5b9a\u7684

    \u9996\u5148\uff0c\u901a\u7528\u5bc4\u5b58\u5668\u6709\u5982\u4e0b\u8fd9\u4e9b\uff1a

    \u5728\u7f16\u5199\u6c47\u7f16\u4ee3\u7801\u7684\u65f6\u5019\u4e00\u822c\u4f7f\u7528\u5bc4\u5b58\u5668\u7684abi\u7684\u540d\u5b57\u800c\u4e0d\u662f\u5bc4\u5b58\u5668\u7684\u7f16\u53f7

    \u800c\u4e0b\u9762\u8981\u5355\u72ec\u8bb2\u4e00\u4e0b csr\u3002

    sstatus (supervisor status register)

    The sstatus register is an SXLEN(\u4ee3\u886832\u621664)-bit read/write register formatted as follows. \u6211\u4eec\u7528\u7684\u662f64\u4f4d\u3002

    \u4e5f\u5c31\u662f\u8bf4\u8fd9\u4e2a\u5bc4\u5b58\u5668\u628a\u5f88\u591a\u4e8b\u4ef6\u7684\u72b6\u6001\u90fd\u75280\u62161\u8868\u793a\uff0c\u62fc\u5230\u4e86\u540c\u4e00\u4e2a\u5bc4\u5b58\u5668\u91cc\u3002

    \u4f4d\u6570 \u540d\u79f0 \u7f6e1\u8868\u793a \u7f6e0\u8868\u793a 1 SIE \u54cd\u5e94\u6240\u6709\u7684S\u6001trap \u7981\u7528\u6240\u6709S\u6001trap 5 SPIE \u5728trap\u53d1\u751f\u524d\u7684SIE=1 \u5728trap\u53d1\u751f\u524d\u7684SIE=0 8 SPP \u5f53\u4e2d\u65ad\u53d1\u751f\u5b8c\u7684\u65f6\u5019\uff0c\u8fd4\u56de\u5230S-mode \u5f53\u4e2d\u65ad\u53d1\u751f\u5b8c\u7684\u65f6\u5019\uff0c\u8fd4\u56de\u5230U-mode

    \u624b\u518c\u91cc\u8fd8\u4ecb\u7ecd\u7684\u4f4d\u6709

    sie (supervisor interrupt enable register)

    \u5982\u679c\u5f00\u542f\u4e86sstatus[SIE]\uff0c\u5c31\u4f1a\u6839\u636esie\u4e2d\u7684\u6bd4\u7279\u4f4d\uff0c\u51b3\u5b9a\u662f\u5426\u5904\u7406interrupt

    Bits sip.SEIP and sie.SEIE are the interrupt-pending and interrupt-enable bits for supervisor- level external interrupts. If implemented, SEIP is read-only in sip, and is set and cleared by the execution environment, typically through a platform-specific interrupt controller. Bits sip.STIP and sie.STIE are the interrupt-pending and interrupt-enable bits for supervisor- level timer interrupts. If implemented, STIP is read-only in sip, and is set and cleared by the execution environment. Bits sip.SSIP and sie.SSIE are the interrupt-pending and interrupt-enable bits for supervisor- level software interrupts. If implemented, SSIP is writable in sip and may also be set to 1 by a platform-specific interrupt controller.

    stvec (supervisor trap vector base address register)

    \u4e2d\u65ad\u5411\u91cf\u8868\u57fa\u5740.

    WARL\u662f\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f\u7684\u5730\u5740

    MODE\u662f

    Value mode \u63cf\u8ff0 0 Direct \u6a21\u5f0f \u9002\u7528\u4e8e\u7cfb\u7edf\u4e2d\u53ea\u6709\u4e00\u4e2a\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f, \u5176\u6307\u5411\u4e2d\u65ad\u5904\u7406\u5165\u53e3\u51fd\u6570 \uff08 \u672c\u5b9e\u9a8c\u4e2d\u6211\u4eec\u6240\u7528\u7684\u6a21\u5f0f \uff09 1 Vectored\u6a21\u5f0f \u6307\u5411\u4e2d\u65ad\u5411\u91cf\u8868\uff0c \u9002\u7528\u4e8e\u7cfb\u7edf\u4e2d\u6709\u591a\u4e2a\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f \u22652 \u4fdd\u7559

    sscratch (supervisor scratch register)

    Typically, sscratch is used to hold a pointer to the hart-local supervisor context while the hart is executing user mode. At the beginning of a trap handler, sscratch is swapped with a user register to provide an initial working register.

    \u5728\u672c\u6b21\u5b9e\u9a8c\u4e2d\uff0c\u6211\u4eec\u62ffsscratch\u8bb0\u5f55s-mode\u7684stack pointer\uff0c\u5728trap\u53d1\u751f\u7684\u65f6\u5019\u4e0eu-mode stack pointer\u4ea4\u6362\uff08\u597d\u50cf\u662f\u6765\u7740\u5fd8\u4e86TODO\u4e00\u4f1a\u6838\u5b9e\uff09

    sepc (supervisor exception program counter)

    \u4f1a\u8bb0\u5f55 trap \u5904\u7406\u8fc7\u540e\u7684\u8fd4\u56de\u5730\u5740\u3002

    scause (supervisor cause register)

    \u4f1a\u8bb0\u5f55 trap \u53d1\u751f\u7684\u539f\u56e0\uff0c\u8fd8\u4f1a\u8bb0\u5f55\u8be5 trap \u662f\u00a0Interrupt\u00a0\u8fd8\u662f\u00a0Exception\u3002\u539f\u56e0\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a

    stval (supervisor trap value register)

    The stval register can optionally also be used to return the faulting instruction bits on an illegal instruction exception (sepc points to the faulting instruction in memory). If stval is written with a nonzero value when an illegal-instruction exception occurs, then stval will contain the shortest of:

    \u0088 the actual faulting instruction \u0088 the first ILEN bits of the faulting instruction \u0088 the first SXLEN bits of the faulting instruction

    The value loaded into stval on an illegal-instruction exception is right-justified and all unused upper bits are cleared to zero.

    satp (supervisor address translation and protection register)

    \u8bb0\u5f55\u6700\u9ad8\u7ea7\u9875\u8868\u7684\u7269\u7406\u5730\u5740\u3002MODE\u4f4d=8\u65f6\uff0c\u4f7f\u7528Sv39\u6a21\u5f0f\u865a\u62df\u5730\u5740\uff08\u672c\u5b9e\u9a8c\uff09

    \u4ee5\u4e0b\u662f\u65f6\u949f\u4e2d\u65ad\u76f8\u5173\u7684\u5bc4\u5b58\u5668\uff1a

    mtime

    \u8ba1\u65f6\u5668\uff0c\u4ee5\u6052\u5b9a\u9891\u7387\u81ea\u589e\uff08\u6211\u8bb0\u5f97\u5728\u672c\u5b9e\u9a8c\u91cc\u662f\u591a\u5c11\u5206\u4e4b\u4e00\u79d2\uff09

    mtimecmp\uff08machine timer register\uff09

    \u4e0b\u4e00\u6b21\u65f6\u949f\u4e2d\u65ad\u7684\u4e2d\u65ad\u70b9

    mcounteren\uff08counter enable register\uff09

    \uff08\u672c\u5b9e\u9a8c\u4e2d\u4e0d\u7528\u7ba1\uff0c\u4f46\u662f\u8bf4\u660e\u4e00\u4e0b\uff1a\uff09mtime\u672c\u6765\u662fm\u6001\u7684\u5bc4\u5b58\u5668\uff0c\u5728s\u6001\u4e0d\u80fd\u8bfb\u5199\uff0c\u4f46\u662fopensbi\u5df2\u7ecf\u8bbe\u7f6e\u8fc7\u53ef\u4ee5\u8bfb\u5199m\u6001

    "},{"location":"CS/OS/lab/#_6","title":"\u5bc4\u5b58\u5668\u64cd\u4f5c","text":"

    \u64cd\u4f5ccsr\u5bc4\u5b58\u5668\u7684riscv\u6307\u4ee4\u96c6 TODO\u5f85\u6574\u7406

    func scr rs1 rd

    \u5316\u7528\u4e00\u4e2a\u6682\u65f6\u4e0d\u60f3\u53bb\u627e\u6765\u6e90\u7684 CSDN \u5e16\u5b50\u7684\u603b\u7ed3\uff1a

    "},{"location":"CS/OS/lab/#lab2","title":"lab2","text":""},{"location":"CS/OS/lab/#_7","title":"\u7ebf\u7a0b","text":"

    \u672c\u5b9e\u9a8c\u5efa\u7acb\u7684\u7ebf\u7a0b\u90fd\u662f\u5185\u6838\u6001\u7ebf\u7a0b\u3002\u4e00\u4e2a\u4f9d\u636e\u5c31\u662f\u67d0\u4e2a\u7ebf\u7a0b trap \u540e\u4e0d\u4f1a\u963b\u585e\u5176\u5b83\u7ebf\u7a0b\u3002

    \u7ebf\u7a0b\u7684 task_struct \u53ef\u4ee5\u7406\u89e3\u4e3a\u7406\u8bba\u8bfe\u4e0a\u8bb2\u7684 PCB (\u662f\u4e0d\u662f\u8be5\u53eb TCB\uff1f)\u3002\u91cc\u9762\u7684\u4e1c\u897f\u4f1a\u968f\u7740\u9010\u4e2a lab \u6dfb\u52a0\u8fdb\u53bb\uff0c\u6700\u7ec8\u4f1a\u6709\u4ee5\u4e0b\u4e1c\u897f\uff1a

    Warning

    TODO \u4ee5\u4e0b\u5185\u5bb9\u9700\u8981\u518d\u68c0\u67e5\uff0c\u5ffd\u7136\u5206\u4e0d\u6e05\u6bcf\u4e2a\u7ebf\u7a0b\u603b\u5171\u662f\u5f00\u4e86\u4e00\u4e2a\u8fd8\u662f\u4e24\u4e2a\u5185\u5b58\u7a7a\u95f4

    \u7ebf\u7a0b\u5185\u5b58\u7a7a\u95f4\u7ed3\u6784\u5982\u4e0b\u3002

    \u5185\u6838\u865a\u62df\u5b58\u50a8\u5668 \u7528\u6237\u4e0d\u53ef\u89c1\u7684\u5b58\u50a8\u5668 0xc000 0000 \u7528\u6237\u6808 \u2190 sp 0x4000 0000 \u5171\u4eab\u5e93\u7684\u5b58\u50a8\u5668\u6620\u5c04\u533a\u57df \u8fd0\u884c\u65f6\u5806\uff08\u7531malloc\u521b\u5efa\uff09 \u2190 brk \u8bfb\u5199\u6bb5 .data .bss \u4ece\u53ef\u6267\u884c\u6587\u4ef6\u52a0\u8f7d \u53ea\u8bfb\u6bb5 .init .text .rodata \u4ece\u53ef\u6267\u884c\u6587\u4ef6\u52a0\u8f7d 0x0804 8000 \u672a\u7528\u7684 \u4ece\u53ef\u6267\u884c\u6587\u4ef6\u52a0\u8f7d"},{"location":"CS/OS/lab/#lab3","title":"lab3","text":"

    \u5230\u672c\u5b9e\u9a8c\u7ed3\u675f\u65f6\uff0c\u6211\u4eec\u7684\u7a0b\u5e8f\u5c06\u8981\u5b9e\u73b0\u8fd9\u6837\u4e00\u4e2a\u4ece\u542f\u52a8\u5230\u5f00\u542f\u6620\u5c04\u7684\u8fc7\u7a0b\uff08\u4e5f\u5bf9\u5e94 head.S \u5f00\u5934\u7684\u4e00\u5806\u51fd\u6570\u8c03\u7528\u6d41\u7a0b\uff09\uff1a

    "},{"location":"CS/OS/lab/#virtual-memory","title":"virtual memory","text":"

    lab2\u4e2d\u6211\u4eec\u505a\u7684\u90fd\u662f\u5185\u6838\u7ebf\u7a0b\uff0c\u53ef\u4ee5\u5171\u4eab\u8fd0\u884c\u7a7a\u95f4\uff0c\u5373\u8fd0\u884c\u4e0d\u540c\u7ebf\u7a0b\u5bf9\u5185\u8bad\u7684\u4fee\u6539\u662f\u76f8\u4e92\u53ef\u89c1\u7684\u3002\u5982\u679c\u9700\u8981\u7ebf\u7a0b\u76f8\u4e92\u9694\u79bb\u5c31\u9700\u8981\u5f15\u5165\u865a\u62df\u5185\u5b58\uff0c\u65b9\u4fbf\u591a\u7ebf\u7a0b\u9ad8\u6548\u5171\u4eab\u5185\u5b58\u3002\u5982\u679c\u5f88\u865a\u5730\u53bb\u8bb2\u865a\u62df\u5185\u5b58\u7684\u4f5c\u7528\uff1a

    \u6211\u4eec\u8981\u5b9e\u73b0\u7684\u865a\u62df\u5185\u5b58\u5e03\u5c40\uff0c\u9996\u5148\u7528\u4e00\u4e2a\u622a\u56fe\u6765\u7406\u89e3\uff1a

    \u4f4e\u5730\u5740<-                                       ->\u9ad8\u5730\u5740\n\nstart_address             end_address\n    0x0                  0x3fffffffff\n     \u2502                        \u2502\n\u250c\u2500\u2500\u2500\u2500\u2518                  \u250c\u2500\u2500\u2500\u2500\u2500\u2518\n\u2193        256G           \u2193                                \n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502      User Space       \u2502    ...   \u2502  Kernel Space  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                                   \u2191      256G      \u2191\n                      \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                \u2502 \n                      \u2502                             \u2502\n              0xffffffc000000000           0xffffffffffffffff\n                start_address                  end_address\n

    \u7136\u540e\u5fc5\u987b\u8981\u641e\u660e\u767d\uff1a\u865a\u62df\u5185\u5b58\u4ece\u6765\u6ca1\u6709\u88ab\u771f\u6b63\u5f00\u8f9f\u8fc7\uff0c\u88ab\u771f\u6b63\u5f00\u8f9f\u7684\u53ea\u6709\u7269\u7406\u5185\u5b58\u3002\u6211\u4eec\u5728\u7a0b\u5e8f\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\u5f00\u7684\u53d8\u91cf\u548c alloc \u7684 page\uff0c\u90fd\u662f\u5f00\u5728 kernel \u7684\u6808\u6216\u8005\u5806\u4e0a\uff08.data\u548c.bss\u6bb5\uff09\uff0c\u56e0\u4e3a\u67e5\u5730\u5740\u65f6\u53ef\u4ee5\u67e5\u5230\u5b83\u4eec\u7684\u7269\u7406\u5730\u5740\u3002\u800c\u5404\u79cd csr \u5728 cpu \u91cc\uff0c\u4e0d\u4f1a\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u3002\u800c\u672c\u6b21\u5b9e\u9a8c\u6240\u8bb2\u7684\u201c\u5f00\u542f\u865a\u62df\u5185\u5b58\u201d\uff0c\u672c\u8d28\u4e0a\u53ea\u662f\u8bbe\u8ba1\u4e00\u4e2a\u865a\u62df\u5730\u5740\u5230\u7269\u7406\u5730\u5740\u7684\u8f6c\u6362\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u653e\u5728\u9875\u8868\u91cc\u3002

    "},{"location":"CS/OS/lab/#sv39","title":"Sv39 \u7684\u9875\u8868\u9879","text":"

    \u7406\u89e3\u4e00\u4e0b\u9875\u8868\u9879\uff08pte\uff09\u3002\u5b83\u7684\u4f4e\u4f4d\uff1a

    "},{"location":"CS/OS/lab/#_8","title":"\u5730\u5740\u7ffb\u8bd1\u8fc7\u7a0b","text":"

    create_mapping() \u51fd\u6570\u904d\u5386\u6574\u4e2a\u6620\u5c04\u5927\u5c0f\uff0c\u4f9d\u6b21\u6309\u4e8c\u7ea7\u9875\u8868\uff08\u5373\u6839\u9875\u8868\u7684\u4e0b\u4e00\u7ea7\uff09\u2192\u4e09\u7ea7\u9875\u8868\u2192\u7269\u7406\u9875\uff0c\u68c0\u67e5\u9875\u8868\u9879\u7684V bit\u770b\u9875\u8868\u9879\u662f\u5426\u5b58\u5728\uff0c\u4e0d\u5b58\u5728\u5219\u7528kalloc() \u5206\u914d\u4e00\u9875\u4f5c\u4e3a\u9875\u8868\u76ee\u5f55\uff1b\u5b58\u5728\u5219\u5728\u9875\u8868\u9879\u4e2d\u8bb0\u5f55\u9875\u8868\u7684\u7269\u7406\u5730\u5740\u3002

    pte : [ PPN2: 53-28 ][ PPN1: 27-19 ][ PPN0: 18-10 ][ perm: 9-0 ]

    vm_addr: [ VPN2: 38-30 ][ VPN1: 29-21 ][ VPN0:20-12 ][ offset: 11-0 ]

    \u56e0\u4e3a\u67e5\u8be2\u4e09\u7ea7\u9875\u8868\u7684\u6d41\u7a0b\u4e3a\uff1a

    \u6240\u4ee5\u53cd\u63a8\u8bbe\u7f6e\u7684\u6d41\u7a0b\u4e3a\uff1a

    "},{"location":"CS/OS/lab/#heads-todo-va2pa_offset","title":"\u4e3a\u4ec0\u4e48\u5728 head.S \u91cc\u4e00\u5f00\u59cb\u8981\u7ed9\u9875\u8868\u9879\u5730\u5740 (TODO\u574f\u4e86\u4e0d\u8bb0\u5f97\u662f\u4e0d\u662f\u5b83\u4e86) \u51cf\u53bb\u4e00\u4e2a VA2PA_offset","text":"

    \u5728 2023 \u5e74\u7248\u7684\u5b9e\u9a8c\u4e2d\uff0cvmlinux.lds \u4e2d\u8bbe\u7f6e\u4e86\u5c06\u7f16\u8bd1\u51fa\u7684\u7b26\u53f7\u8868\u90fd\u7528\u865a\u62df\u5730\u5740\u6765\u8868\u793a\uff0c\u65b9\u4fbf\u8c03\u8bd5\u3002\u4e5f\u5373\u7a0b\u5e8f\u8fd0\u884c\u5230\u6b64\u5904\u8bfb\u5230\u7684\u9875\u8868\u9879\u5730\u5740\u662f\u865a\u62df\u5730\u5740\u3002\u663e\u7136\uff0c\u5728 setup_vm() \u4e4b\u524d\uff0c\u865a\u62df\u5185\u5b58\u8fd8\u6ca1\u6709\u88ab\u5f00\u542f\uff0c\u6240\u4ee5\u8981\u51cf\u6389\u4e00\u4e2a\u504f\u79fb\u91cf\u4f7f\u5176\u80fd\u8bfb\u5230\u9875\u8868\u9879\u7684\u7269\u7406\u5730\u5740\u3002\u5728 relocate: \u5904\u7406\u504f\u79fb\u4e4b\u540e\u5c31\u4e0d\u7528\u7ba1\u4e86\u3002

    "},{"location":"CS/OS/lab/#lab4","title":"lab4","text":""},{"location":"CS/OS/lab/#_9","title":"\u66f4\u65b0\u540e\u7684\u865a\u62df\u5185\u5b58\u5e03\u5c40","text":"

    \u6211\u4eec\u56de\u5fc6 lab3 \u91cc\u865a\u62df\u5730\u5740\u53ea\u7528\u4e86\u9ad8\u4f4d\uff0c\u4f4e\u4f4d\u6ca1\u6709\u7528\uff0c\u5728\u672c\u5b9e\u9a8c\u6211\u4eec\u8981\u5c06\u4f4e\u4f4d 0x0-0x4000000 \u5206\u7ed9\u7528\u6237\u8fdb\u7a0b\u3002\u800c\u7528\u6237\u8fdb\u7a0b\u7684\u4ee3\u7801\u5b9e\u9645\u5728\u7269\u7406\u5730\u5740\u4e0a\u5206\u914d\u51fa\u6765\u7684\u67d0\u4e2a\u5730\u65b9\u3002\u603b\u4e4b\uff0c\u8981\u5b9e\u73b0\u4ee5\u4e0b\u7684\u5185\u5b58\u5e03\u5c40\uff1a

                   PHY_START   new allocated memory            allocated space end                              PHY_END\n                   \u2502         \u2502                                \u2502                                                 \u2502\n                   \u25bc         \u25bc                                \u25bc                                                 \u25bc\n       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n PA    \u2502           \u2502         \u2502 uapp (copied from _sramdisk)   \u2502                                                 \u2502\n       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                             \u25b2                                \u25b2\n       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                                \u2502\n       \u2502            (map)                                     \u2502\n       \u2502                        \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n       \u2502                        \u2502\n       \u2502                        \u2502\n       \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n VA    \u2502           UAPP         \u2502                                                                   \u2502u mode stack\u2502\n       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n       \u25b2                                                                                                         \u25b2\n       \u2502                                                                                                         \u2502\n\n   USER_START                                                                                                USER_END\n
    "},{"location":"CS/OS/lab/#riscv_1","title":"riscv\u5904\u7406\u5668\u652f\u6301\u7684\u6a21\u5f0f","text":"

    lab3\u521b\u5efa\u7684\u90fd\u662f\u5185\u6838\u7ebf\u7a0b \u516c\u7528\u4e86\u5730\u5740\u7a7a\u95f4\uff08\u9875\u8868swapper_pg_dir\uff09\u3002\u8981\u5f15\u5165\u7528\u6237\u6001\u8fdb\u7a0b\u9700\u8981\u505a\uff1a

    \u5177\u4f53\u5728\u6211\u4eec\u7684\u5b9e\u9a8c\u64cd\u4f5c\u4e2d\uff0c\u5b9e\u73b0\u7528\u6237\u6001\u548c\u5185\u6838\u6001\u5207\u6362\u7684\u65b9\u6cd5\u662f\uff1asstatus[SUM] \u548c PTE[U]

    Warning

    \u60f3\u5199\u4e00\u4e0b\u5728\u6c47\u7f16\u4ee3\u7801\u91cc\u7684\u64cd\u4f5c\uff0c\u5fd8\u5e72\u51c0\u4e86\uff0c\u6574\u4f53\u601d\u8def\u662f\u8fd9\u6837\u7684\uff0c\u4f46\u4e00\u4e9b\u7ec6\u8282\u5f85\u6838\u5b9e

    \u5e76\u4e14\u5728\u6c47\u7f16\u4ee3\u7801\u91cc\u9700\u8981\u5b9e\u73b0\u4e00\u7cfb\u5217 csr \u8bfb\u5199\u64cd\u4f5c\uff1a

    "},{"location":"CS/OS/lab/#buddy-system","title":"buddy system","text":"

    \u4e00\u79cd\u7269\u7406\u5185\u5b58\u7ba1\u7406\u7b97\u6cd5\uff0c\u7a7a\u95f2\u7a7a\u95f4\u9996\u5148\u88ab\u770b\u6210 2^N \u4e2a\u7269\u7406\u9875\u7684\u5927\u7a7a\u95f4\uff0c\u5f53\u4e00\u4e2a\u5927\u5c0f\u4e3a m \u7684\u9875\u8bf7\u6c42\u5185\u5b58\u5206\u914d\u65f6\uff0c\u4e0d\u505c\u628a\u7a7a\u95f4 /2 \u5212\u5206\uff0c\u6700\u540e\u627e\u5230\u6700\u63a5\u8fd1m\u76842\u7684\u6b21\u65b9\u7684\u4e00\u4e2a\u7a7a\u95f4\u5927\u5c0f\u5206\u7ed9 m\u3002\u5f53\u5757\u91ca\u653e\u65f6\uff0c\u5206\u914d\u5668\u5c31\u4f1a\u627e\u5230\u5176\u5b83\u7a7a\u95f2\u7684\u4f19\u4f34\u5757\u53bb\u5408\u5e76\u3002\u5b83\u7684\u5b9e\u73b0\u5728\u8fd9\u4e2a\u6587\u7ae0\u91cc\u8bb2\u5f97\u66f4\u597d Lab 6\uff1aRISC-V \u52a8\u6001\u5185\u5b58\u5206\u914d\u4e0e\u7f3a\u9875\u5f02\u5e38\u5904\u7406 - \u77e5\u4e4e (zhihu.com)\u3002

    "},{"location":"CS/OS/lab/#elf","title":"elf \u6587\u4ef6","text":"

    \u4e00\u4e2a elf \u6587\u4ef6\u50cf\u4e00\u4e2a\u5c01\u88c5\u590d\u6742\u7248\u7684\u4e8c\u8fdb\u5236\u7528\u6237\u7a0b\u5e8f\u3002\u7528\u62bd\u8c61\u7684\u753b\u56fe\u7ed9\u5b83\u7684\u7ed3\u6784\u505a\u4e00\u4e2a\u6bd4\u55bb\uff08\u5bf9\u4e0d\u8d77\u592a\u62bd\u8c61\u4e86\uff09\uff1a

    Elf_Ehdr     ehdr->e_phoff\n\u2b07\ufe0f            \u2b07\ufe0f\n[            [type: ???][type: LOAD][type: ???] ]\n

    \u5c31\u662f elf \u6587\u4ef6\u91cc\u6563\u843d\u7740\u51e0\u4e2a\u5c0f\u6bb5\uff0c\u5176\u4e2d\u4e00\u4e2a\u7c7b\u578b\u4e3a LOAD \u7684\u6bb5\u662f\u9700\u8981\u590d\u5236\u5230\u7ebf\u7a0b\u4ee3\u7801\u6bb5\u7684\uff0c\u4f46\u4e0d\u4e00\u5b9a\u590d\u5236\u5230\u7ebf\u7a0b\u5934\u7684\u8d77\u59cb\u5730\u5740 0x0\uff0cp_vaddr \u4f1a\u544a\u8bc9\u4f60\u8fd9\u6bb5\u4ee3\u7801\u5e0c\u671b\u88ab\u590d\u5236\u5230\u54ea\u91cc\u53bb\u3002e_entry \u4e5f\u8d34\u5fc3\u544a\u8bc9\u4f60\u7b2c\u4e00\u6761\u4ee3\u7801\u6307\u4ee4\u7684\u8d77\u59cb\u5730\u5740\u5728\u54ea\u3002\u603b\u4e4b\uff0c\u4f60\u9700\u8981\u5148\u901a\u8fc7\u4e00\u4e9b\u504f\u79fb\u91cf\u5728 Elf64_Ehdr \u8fd9\u4e2a\u6307\u9488\u91cc\u627e\u5230\u7b2c\u4e00\u4e2a segment\uff0c\u7136\u540e\u4ee5\u4e00\u4e2a Elf63_phdr \u7684\u5927\u5c0f\u4e3a\u5355\u4f4d\uff0c\u6328\u4e2a\u53bb\u5bfb\u627e\u4e00\u4e2a\u7c7b\u578b\u4e3a LOAD \u7684 segment\u3002\u7b49\u627e\u5230\u4e86\u5c31\u53ef\u4ee5\u62f7\u8d1d\u4e86\u3002

    \u5982\u679c\u4f60\u6309\u7167\u4e00\u5806\u6307\u9488\u7684\u5199\u6cd5\u88ab\u641e\u5f97\u6655\u5934\u8f6c\u5411\uff0c\u751a\u81f3\u53ea\u662f\u5148\u7528 readelf -h \u67e5\u770b\u4e00\u4e0b elf \u6587\u4ef6\u91cc\u5404\u4e2a\u4e1c\u897f\u7684\u5730\u5740\uff08\u67e5\u770b\u540e\u53ef\u4ee5\u53d1\u73b0\u4e0e\u5b9e\u9a8c\u6307\u5bfc\u4e2d\u7ed9\u7684\u4f8b\u5b50\u5c31\u662f\u540c\u4e00\u4e2a\u6587\u4ef6\uff09\uff0c\u7136\u540e\u76f4\u63a5\u628a\u6574\u4e2a uapp \u7a0b\u5e8f\u5168\u90e8\u62f7\u5230\u8fdb\u7a0b\u91cc\u6765\uff0c\u76f4\u63a5\u628a __dummy \u8fd4\u56de\u5730\u5740\u6307\u5230\u4f60\u5728\u6587\u4ef6\u91cc\u8bfb\u51fa\u6765\u7684\u90a3\u4e2a\u4ee3\u7801\u8d77\u59cb\u5730\u5740\uff0c\u751a\u81f3\u90fd\u80fd\u8dd1\u3002\u5728\u8dd1\u8d77\u6765\u4e4b\u540e\uff0c\u6839\u636e\u4f60\u7684\u7406\u89e3\u4e00\u70b9\u4e00\u70b9\u628a\u8bbe\u7f6e\u6307\u9488\u7684\u4ee3\u7801\u6309\u7167\u542b\u4e49\u66ff\u6362\u4e0a\uff0c\u6211\u611f\u89c9\u8fd9\u6837\u53cd\u7740\u505a\u4e5f\u884c\u3002

    "},{"location":"CS/OS/lab/#lab5","title":"lab5","text":"

    Warning

    \u4e0b\u9762\u51e0\u4e2a\u5b9e\u9a8c\u6211\u5199\u5f97\u6709\u70b9\u7b80\u7565\uff0c\u5c0f\u90e8\u5206\u56e0\u4e3a\u6211\u4e0d\u8bb0\u5f97\u4e86\uff0c\u5927\u90e8\u5206\u56e0\u4e3a\u6211\u81ea\u6211\u611f\u89c9\u6ca1\u6709\u5403\u900f\u8fd9\u4e2a\u5b9e\u9a8c\uff0c\u4e0d\u73ed\u95e8\u5f04\u65a7\u4e86\u3002\u4f46\u662f\u8fd9\u4e2a\u5730\u65b9\u53d1\u81ea\u5185\u5fc3\u5730\u60f3\u7559\u4e2a TODO \u5e0c\u671b\u80fd\u6709\u673a\u4f1a\u8865\u5b8c\u3002

    \u672c\u5b9e\u9a8c\u4e0e lab4 \u5185\u5b58\u5206\u914d\u7684\u533a\u522b\u662f\uff0c\u4e3a\u4e86\u9632\u6b62\u7269\u7406\u5185\u5b58\u4e0d\u8db3\uff0c\u5728 task \u521d\u59cb\u5316\u8bf7\u6c42\u7a7a\u95f4\u65f6\uff0c\u5148\u4e0d\u5206\u914d\u7269\u7406\u5185\u5b58\uff0c\u800c\u662f\u7528 do_mmap() \u5148\u628a task \u7684\u8bf7\u6c42\u7684\u6240\u6709\u53c2\u6570\u8bb0\u5f55\u4e0b\u6765\uff0c\u7b49 task \u771f\u6b63\u53bb\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u5fc5\u7136\u4f1a\u89e6\u53d1 page fault\uff0c\u7136\u540e\u5728 page fault handler \u91cc\u6839\u636e\u8bb0\u5f55\u7684\u53c2\u6570\uff0c\u518d\u5206\u914d\u7269\u7406\u5185\u5b58\u3002

    "},{"location":"CS/OS/lab/#lab6","title":"lab6","text":"

    \u5b9e\u9a8c\u4e3b\u8981\u76ee\u6807\u662f\u5b9e\u73b0\u521b\u5efa\u5b50\u8fdb\u7a0b\u7684\u903b\u8f91\uff0c\u5373\u5728\u7528\u6237\u7a0b\u5e8f\u8c03\u7528fork()\u51fd\u6570\uff0c\u4ea7\u751f220\u53f7\u7cfb\u7edf\u8c03\u7528\u7684\u65f6\u5019\uff0c\u5728sys_clone()\u8fd9\u4e2a\u51fd\u6570\u91cc\u521b\u5efa\u5b50\u8fdb\u7a0b\uff0c\u5e76\u4f7f\u5176\u52a0\u5165\u88ab\u8c03\u7528\u7684task\u961f\u5217\u3002

    "},{"location":"CS/OS/lab/#lab7","title":"lab7","text":"

    Warning

    lab7 \u6211\u53ea\u5b8c\u6210\u4e86\u5360 60% \u7684\u7b2c\u4e00\u90e8\u5206\uff0c\u4f46\u5176\u5b9e\u5de5\u4f5c\u91cf\u6bd4\u8f83\u5927\u7684\u8fd8\u5728\u7b2c\u4e8c\u90e8\u5206\u3002\u6211\u8fd9\u91cc\u53ea\u80fd\u603b\u7ed3\u7b2c\u4e00\u90e8\u5206\u4e86\u3002

    \u672c\u5b9e\u9a8c\u6bcf\u4e2atask\u90fd\u6709\u4e00\u4e2a\u7ed3\u6784\u4f53\u53bb\u7ef4\u62a4\u5df2\u7ecf\u6253\u5f00\u7684\u6587\u4ef6\u8868\u3002\u672c\u5b9e\u9a8c\u9996\u5148\u4fee\u6539task struct\uff0c\u5728\u6bcf\u4e2atask struct\u4e2d\u6dfb\u52a0\u4e86\u4e00\u4e2a\u9875(struct file* \u578b)\u53bb\u7ef4\u62a4\u8fd9\u4e2a\u6587\u4ef6\u8868\u3002

    \u6bcf\u4e2a\u6587\u4ef6\u8868\u6709\u4e00\u4e9b\u51fd\u6570\u6307\u9488\uff0c\u5206\u522b\u6307\u5411\u5bf9\u6587\u4ef6\u7684\u8bfb\u5199\u64cd\u4f5c\u51fd\u6570\u3002\u9996\u5148\u9700\u8981\u5b9e\u73b0\u8fd9\u4e9b\u51fd\u6570\uff0c\u5982 stdout_write() \u548c stdin_read() \u7b49\u3002

    \u5f53\u7528\u6237\u7a0b\u5e8f\u4ea7\u751f\u6587\u4ef6\u8bfb\u5199\u7684 system call \u65f6\uff0ctrap_handler() \u4e2d\u9700\u8981\u5b9e\u73b0\u5bf9\u8fd9\u4e9b system call \u7684\u5904\u7406\u51fd\u6570\u3002\u5177\u4f53\u64cd\u4f5c\u5c31\u662f\u6355\u83b7\uff0c\u7136\u540e\u4ec0\u4e48\u4e5f\u4e0d\u505a\uff0c\u76f4\u63a5\u628a\u53c2\u6570\u4ea4\u7ed9\u4e0a\u8ff0\u5b9e\u73b0\u7684\u6587\u4ef6\u8bfb\u5199\u51fd\u6570\u6765\u64cd\u4f5c\u3002

    "},{"location":"CS/OS/lab/#_10","title":"\u5e38\u89c1\u95ee\u9898\u4e4b\u8865\u5145\u53c8\u540d\u6211\u4e4b\u603b\u662f\u9047\u89c1\u95ee\u9898","text":"

    Q1: \u8fd0\u884c\u53d1\u73b0\u7a0b\u5e8f\u5728\u51e0\u4e2a\u521d\u59cb\u5316\u51fd\u6570\u4e4b\u95f4\u6765\u56de\u8df3\u8dc3\uff0c\u6bd4\u5982\u5df2\u7ecf\u5230\u4e86 set_up_vm_final()\uff0c\u53c8\u8df3\u56de set_up_vm()\uff0c\u518d\u5f80\u4e0b\u8fd0\u884c\u5c31\u5728\u8fd9\u51e0\u4e2a\u51fd\u6570\u4e4b\u95f4\u5faa\u73af\u3002\u8fdb\u5165 gdb \u8c03\u8bd5\uff0c\u5219\u53d1\u73b0\u53d1\u751f\u8df3\u8f6c\u7684\u5730\u65b9\u5e76\u6ca1\u6709\u4efb\u4f55 branch \u6216\u8005 call \u8bed\u53e5\u6307\u5411\u8df3\u5f80\u7684\u5730\u5740\uff0c\u4f46\u662f\u80fd\u89c2\u5bdf\u5230\u51fa\u73b0\u8df3\u8f6c\u7684\u5730\u65b9\uff0c\u5f80\u5f80\u662f\u8fdb\u4e86 memset() \u6216\u8005 memcopy() \u51fd\u6570\u3002

    A1: \u6574\u4e2a\u5b9e\u9a8c\u8fc7\u7a0b\u4e2d\u6211\u9047\u5230\u4e86\u4e09\u56db\u6b21\uff0c\u4e00\u5f00\u59cb\u89c9\u5f97\u662f\u4ee5\u5947\u602a\u7684\u65b9\u5f0f\u89e3\u51b3\u4e86\uff08\u6bd4\u5982\uff0c\u7a81\u7136\u53d1\u73b0\u81ea\u5df1\u5728\u521d\u59cb\u5316\u8fdb\u7a0b\uff0c\u5f15\u5165\u5916\u90e8\u9875\u8868\u65f6\u7528\u5230\u7684\u4ee3\u7801\u662f extern unsigned long *swapper_pg_dir;\uff0c\u800c\u4e0d\u662f extern unsigned long swapper_pg_dir[512] __attribute__((__aligned__(0x1000)));\uff0c\u5373\uff0c\u7f3a\u5c11\u4e86\u4e00\u4e2a\u5730\u5740\u5bf9\u9f50\u3002\u540c\u5b66\u6307\u51fa\u5982\u679c\u6ca1\u6709\u5bf9\u9f50\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u9875\u8868\u8fb9\u7f18\u7684\u4e00\u4e9b\u6570\u636e\u7684\u4e22\u5931\u635f\u574f\u3002\uff09\uff0c\u540e\u6765\u6162\u6162\u53d1\u73b0\u89c4\u5f8b\u662f\uff1a\u53d1\u751f\u8fd9\u6837\u8df3\u8f6c\u7684\u6307\u4ee4\uff0c\u90fd\u5728\u5c1d\u8bd5\u5f80 0x80000000 \u8fd9\u4e2a\u7269\u7406\u5730\u5740\u4ee5\u4e0b\u7684\u7269\u7406\u5730\u5740\u5199\u4e1c\u897f\u3002\u6211\u4eec\u6ce8\u610f\u5230 qemu \u63d0\u4f9b\u7ed9\u6211\u4eec\u7684\u7269\u7406\u5730\u5740\u90fd\u662f 0x80000000 \u4ee5\u4e0a\u7684\u5730\u5740\uff0c\u867d\u7136\u6ca1\u6709\u8003\u8bc1\uff0c\u4f46\u662f\u5408\u7406\u731c\u6d4b\u5176\u4e0b\u7684\u5730\u5740\u662f qemu \u81ea\u5df1\u7684\u4ee3\u7801\u533a\uff0c\u652f\u6301 qemu \u81ea\u5df1\u7684\u8fd0\u884c\u903b\u8f91\u3002\u5982\u679c\u4e0d\u5c0f\u5fc3\u5199\u5230\u4e86\u8fd9\u4e2a\u5730\u65b9\uff0c\u5f53\u7136\u53ef\u80fd\u53d1\u751f\u4e0d\u80fd\u89e3\u91ca\u7684 qemu \u884c\u4e3a\u3002

    \u6240\u4ee5\u5982\u679c\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u884c\u7684\u4e00\u6b65\u4e00\u6b65\u68c0\u67e5\u65b9\u6cd5\u662f\uff1a

    \u603b\u4e4b\uff0c\u6839\u672c\u76ee\u6807\u662f\u53bb\u770b\u4e00\u4e0b\u6709\u6ca1\u6709\u5f80\u7269\u7406\u5730\u5740 0x80000000 \u4ee5\u4e0b\u7684\u5730\u65b9\u5199\u4e1c\u897f\u3002

    Q2: \u8fd0\u884c\u7a0b\u5e8f\u5230\u4e00\u534a\u5361\u4f4f\uff0c\u6ca1\u6709\u4efb\u4f55\u8f93\u51fa\u4e86\uff0c\u8c03\u8bd5\u53d1\u73b0\u6700\u540e\u662f\u5728 __dummy \u7684 sret \u540e\u5361\u4f4f\u4e86\u3002

    A2: \u53ef\u4ee5\u5148\u5b9e\u73b0\u4e00\u4e2a\u6f02\u4eae\u70b9\u7684 trap_handler() \u5e2e\u52a9\u8c03\u8bd5\u3002\u8fd9\u70b9\u5728 lab7 \u7684\u6307\u5bfc\u91cc\u624d\u6709\u63d0\u793a\u5230\uff0c\u4e0d\u8fc7\u6211\u89c9\u5f97\u5e94\u8be5\u65e9\u70b9\u5b9e\u73b0\u8d77\u6765\u3002\u6bd4\u5982\uff1a

    void trap_handler(uint64 scause, uint64 sepc, struct pt_regs* regs) {  // a0, a1, a2\nuint64 stval = csr_read(stval);\n// printk(\"[S] Trap @sepc = %#llx, @scause = %#llx, @stval = %#llx\\n\", sepc, scause, stval);\nint done = 0;\n/* Interrupt */\nif ((scause >> 63) && (scause & 0x7FFFFFFFFFFFFFFF) == 5) {\nclock_set_next_event();\nprintk(\"[S] Supervisor Timer Intterupt\\n\");\ndo_timer();\n} /* Exception */\nelse {\n/* instrution addr misaligned */\nif (scause == 0) {}\n/* Instruction access fault */\nelse if (scause == 1) {}\n/* Illegal instruction */\nelse if (scause == 2) {}\n/* breakpoint */\nelse if (scause == 3) {}\n/* load addr misaligned */\nelse if (scause == 4) {}\n/* load access fault */\nelse if (scause == 5) {}\n/* store/amo addr misaligned */\nelse if (scause == 6) {}\n/* store/amo access fault */\nelse if (scause == 7) {}\n/* ecall U-mode */\nelse if (scause == 8) {\nif (sys_call_num == SYS_WRITE) {\n// ...\n} else if (sys_call_num == SYS_GETPID) {\n// ...\n} else if (sys_call_num == SYS_CLONE) {\n// ...\n}\nregs->sepc += 4; // pc + 4\n} /* ecall S-mode */\nelse if (scause == 9) {}\n/* Instruction page fault */\n/* Load page fault */\n/* Store/amo page fault */\nelse if (scause == 12 || scause == 13 || scause == 15) {\ndone = do_page_fault(scause, regs);\n} else {\nprintk(\"[S] Unhandled exception with scause = %d, sepc = %lx\\n\", scause, sepc);\nwhile (1);\n}\n}\n// if (!done) while(1);\n}\n
    \u603b\u4e4b\uff0c\u5efa\u8bae\u5bf9 trap_handler() \u505a\u7684\u6539\u8fdb\u6709\u4e24\u4ef6

    \u5982\u679c\u786e\u5b9e\u662f\u5faa\u73af trap \u5bfc\u81f4\u7684\u7a0b\u5e8f\u5361\u4f4f\uff0c\u90a3\u4e48\u6309\u6253\u5370\u7684\u4fe1\u606f\u53bb\u601d\u8003\u5c31\u53ef\u4ee5\u4e86\u3002\u5982\u679c\u8fd8\u662f\u4ec0\u4e48\u8f93\u51fa\u90fd\u6ca1\u6709\uff08\u6211\u8bb0\u5f97\u4e5f\u6709\u8fd9\u79cd\u60c5\u51b5\uff09\uff0c\u6211\u4e0d\u8bb0\u5f97\u662f\u4ec0\u4e48\u539f\u56e0\u4e86\uff0c\u4f46\u662f\u8d77\u7801\u5e2e\u4f60\u6392\u9664\u4e86\u53d1\u751f\u4e86 trap \u7684\u53ef\u80fd\u6027\uff0c\u4f60\u53ef\u4ee5\u5728\u6b64\u57fa\u7840\u4e0a\u7ee7\u7eed\u601d\u8003\u662f\u4e3a\u4ec0\u4e48\u3002

    "},{"location":"DL/","title":"\u7d22\u5f15","text":"

    \u672c\u7ae0\u8282\u5305\u62ec\u6df1\u5ea6\u5b66\u4e60\u7406\u8bba+\u5de5\u7a0b\u7b14\u8bb0\uff0c\u5df2\u5b8c\u6210\u4ee5\u4e0b\u5185\u5bb9 - NLP\u5b66\u4e60\u548c\u5de5\u7a0b\u7b14\u8bb0

    \u8fd9\u4e2a\u7d22\u5f15\u6ca1\u5199\u5b8c

    \u800c\u4e14\u6211\u4e5f\u4e0d\u8bb0\u5f97\u4e3a\u4ec0\u4e48\u4e0b\u9762\u653e\u4e86\u8fd9\u5f20\u56fe\u4e86

    "},{"location":"DL/NLPTheory/explainable_nlp/","title":"Explainable NLP","text":"

    TODO

    "},{"location":"DL/NLPTheory/explainable_nlp/#survey","title":"Survey","text":""},{"location":"DL/NLPTheory/explainable_nlp/#a-survey-of-the-state-of-explainable-ai-for-natural-language-processing","title":"A Survey of the State of Explainable AI for Natural Language Processing","text":"

    This survey thoroughly explains the state of explainable NLP. The Introduction discusses two distinguishing criteria for explanability models (1) whether the explanation is for each prediction individually or the model\u2019s prediction process as a whole, and (2) determining whether generating the explanation requires post-processing or not. In Categorization of Explanations, this paper categorizes the explanation models into local (provides information or justification for the model's prediction on a specific input) vs. global (provides similar justification by revealing how the model's predictive process works, independently of any particular input), and self-explaining (also directly interpretable, generates the explanation at the same time as the prediction, e.g. decision trees, rule-based models, and feature saliency models like attention models) vs. post-hoc (an additional operation is performed after the predictions are made). This section also states that the different categories of models can overlap. In section Aspects of Explanations, this paper introduces three types of explanation techniques: (1) explainability techniques (feature importance, surrogate model, example-driven, provenance-based, declarative induction), (2) operations to enable explainability (first-derivation saliency, layer-wise relevance propagation, and input perturbations, attention, LSTM gating signals, explainability-aware architecture design) and (3) visualization techniques (saliency, raw declarative representations, natural language explanation). The section Evaluation introduces several evaluating metrices.

    "},{"location":"DL/NLPTheory/explainable_nlp/#opinion-papers","title":"Opinion Papers","text":""},{"location":"DL/NLPTheory/explainable_nlp/#climbing-towards-nlu-on-meaning-form-and-understanding-in-the-age-of-data-2020","title":"Climbing towards NLU: On Meaning, Form, and Understanding in the Age of Data (2020)","text":"

    This paper argues that the modern NLP models trained on form has no abilities in understanding natural languages based on both the science and philosophy theories. It is structured as follows. In section Large LMs: Hype and analysis, this paper samples example pieces from news and academic literature that exaggerate the understanding abilities in using words including \"understand\"\"comprehension\"\"recall factual knowledge\", and argues that the current LMs have the ability no other than learning the surface linguistic forms of language rather than understanding them. In section What is meaning?, this paper clarifies the meaning of language as the communicative intent that a parole intends to express, and distinguishes the concept \"meaning\" and \"truth\" as the truth is the meaning that is \"grounded\" to the real world. In section The octopus test, this paper detailedly tells a thought experiment of a super intelligent octopus who can mimic the human response by never receiving the knowledge of the grounded real world of the language meaning, by which this paper argues that it might be that how the language receiver decodes the communicative intends affects the conventional meaning of language. In section More constrained thought experiments, two more thought experiments are provided, training the JAVA and training the English LMs without providing the executing methods the communicative intends, and the paper argues that such tasks are impossible. In section Human language acquisition, this paper supports its idea by providing the example of human children's acquiring knowledge is not only grounded on the world image, but also in the interaction with other people. In section Distributional semantics, this paper argues that in NLP, two methods based on the instincts above are training distributional models on corpora augmented with perceptual data, and looking to interaction data (according to Wittgenstein's \"meaning in use\").

    "},{"location":"DL/NLPTheory/explainable_nlp/#information-theory-based-compositional-distributional-semantics-2021","title":"Information Theory-based Compositional Distributional Semantics (2021)","text":"

    According to the abstract, the contribution of this paper can be concluded as proposing the notion of Information Theory-based Compositional Distributional Semantics (ICDS): (i) We first establish formal properties for embedding, composition, and similarity functions based on Shannon\u2019s Information Theory; (ii) we analyze the existing approaches under this prism, checking whether or not they comply with the established desirable properties; (iii) we propose two parameterizable composition and similarity functions that generalize traditional approaches while fulfilling the formal properties; and finally (iv) we perform an empirical study on several textual similarity datasets that include sentences with a high and low lexical overlap, and on the similarity between words and their description. In section Introduction, the author introduces Frege's concepts of compositionality and contextuality, which respectively refers to that \"the meaning of the whole is a function of the meaning of its parts and the syntactic way in which they are combined\", and that \"the meaning of words and utterances is determined by their context\". This section also introduces the main concern of lacking systematicity by the linguists to the NLP, where systematicity is defined as \"A system is said to exhibit systematicity if, whenever it can process a sentence, it can process systematic variants, where systematic variation is understood in terms of permuting constituents or (more strongly) substituting constituents of the same grammatical category.\" Thus, this section introduces that this paper aims to propose a novel system called Information Theory-based Compositional Distributional Semantics (ICDS). In section Related Work, the author introduces a set of properties in selective proper text representation paradigms which includes \"systematicity\", \"usage context\", \"continuity\", and \"information measurbility\", and introduces a series of previous work under this standard. In section Theoretical Framework, this paper first establishes a geometric interpretation of ICDS, that \"The direction of an embedding represents the pragmatic meaning, and the vector norm of embedding represents how much information the literal utterance provides about its meaning in the pragmatic context\", and then proposes the concept of ICDS as \"there are minimal linguistic units whose semantics are determined by their use and whose amount of information is determined by their specificity. On the other hand, the systematicity of language can be captured by compositional mechanisms while preserving the amount of information of the composite utterance\". Section Formal Definition and Properties formally defines the concepts involved in ICDS, where (\\(\\pi\\),\\(\\delta\\), \\(\\bigodot\\)) stand for \"embedding\", \"semantic similarity\", and \"composition function\" respectively. This section points out the embedding function properties (information measurability and angular isometry), composition function properties (composition neutral element, composition norm monotonicity, and sensitivity to stricture), and similarity function properties (angular distance simialrity monotonicity, orthogonal embedding similarity monotonicity, and equidistant embedding simialrity monotonicity). In section Function Analysis and Generalization, this research evaluates several current embedding vector with the proposed framework, while in section Experiment, the semantic representation abilities of several prevailing LLMs including BERT and GPT are evaluated.

    "},{"location":"DL/NLPTheory/explainable_nlp/#contrastive-explanations-for-model-interpretability-2021","title":"Contrastive Explanations for Model Interpretability (2021)","text":"

    This paper proposes a data augmentation method to generate counterexample on the bases of NLI datasets, and proves that by training on patterns \"why A rather than B\" with contrastive learning methods, the model performs better than the previous NLI baselines.

    "},{"location":"DL/NLPTheory/explainable_nlp/#using-counterfactual-contrast-to-improve-compositional-generalization-for-multi-step-quantitative-reasoning-2023","title":"Using counterfactual contrast to improve compositional generalization for multi-step quantitative reasoning (2023)","text":""},{"location":"DL/NLPTheory/mwp/","title":"Math Word Problems","text":""},{"location":"DL/NLPTheory/mwp/#an-introduction-to-math-word-problems","title":"An Introduction to Math Word Problems","text":"

    The math word problem (MWP) aims to solve simple primary school math problems (in plain-text format) with deep learning methods. The problems usually consists of numbers no larger than 100 and only 5 operators (+, -, *, / and =). This blog is structured as follows. The Dataset part will introduce two main types, one indicating the locations of variables, and the other simply embedding the math formula within the natural language texts. The Methods parts will introduce several prevailing methods in solving this task, including both the models and workflows that improves the accuracy of models.

    "},{"location":"DL/NLPTheory/mwp/#surveys","title":"Surveys","text":""},{"location":"DL/NLPTheory/mwp/#the-gap-of-semantic-parsing-a-survey-on-automatic-math-word-problem-solvers-2019","title":"The Gap of Semantic Parsing: A Survey on Automatic Math Word Problem Solvers (2019)","text":"

    This survey provides a comprehensive introduction to the MWP datasets and methods prior to 2019. This survey defines three stages of MWP solving, the Rule-based matching stage (1960-2010), Semantic parsing, feature engineering and statistical learning stage (2011-2017), and Deep learning and reinforcement learning stage (2017-2019).

    "},{"location":"DL/NLPTheory/mwp/#towards-tractable-mathematical-reasoning-challenges-strategies-and-opportunities-for-solving-math-word-problems-2021","title":"Towards Tractable Mathematical Reasoning: Challenges, Strategies, and Opportunities for Solving Math Word Problems (2021)","text":"

    This survey introduces the contemporary MWP datasets til 2021, and methods including rule-based, and neural network encoder-decoder structures. Specifically, this paper concludes three strategies for math word solving, (i) direct answer generation, (ii) expression tree generation for inferring answers, and (iii) template retrieval for answer computation. Considering the type of problem solving method, this paper concludes two classes. The first class is non-neural approaches (rule-base or pattern matching approaches, semantic parsing, and statistical machine learning approaches), within which a particular strategy of applying domain knowledge in classifying the problems (e.g. into change, part-whole and compare classes). The second class is neural approaches, including intuitions of (i) predicting the answer directly (ii) generating a set of equations or mathematical expressions and inferring answers from the by executing them (iii) retrieving the templates from a pool of templates derived from training data and augmenting numerical quantities to compute the answer. These neural approaches generally follow encoder-decoder architectures, which fall in four types (i) seq-to-seq (ii) Transformer-to-tree (iii) seq-to-tree (iv) graph-to-tree. Among the four methods, the tree-structured decoder attend both parents and siblings to generate the next token, while the bottom-up representation of sub-tree of a sibling could further help to derive better outcomes. The graph-based encoder aims to learn different types of relationships among the constituents of MWPs. This section also mentions that \"Data augmentation is a popular preprocessing technique to increase the size of training data\" (reverse operation-based augmentation techniques, different traversal orders of expression trees, and weak supervision). In section Math Reasoning in Neural Approaches, this paper mentions several further topics under math reasoning, interpretability and explainability, infusing explicit and definitive knowledge, and reinforcement learning.

    "},{"location":"DL/NLPTheory/mwp/#datasets","title":"Datasets","text":""},{"location":"DL/NLPTheory/mwp/#mawps-a-math-word-problem-repository-2016","title":"MAWPS: A Math Word Problem Repository (2016)","text":"

    sroy9/mawps: Code for MAWPS: A Math Word Problem Repository (github.com) The data format is as follows.

    [\n{\n\"iIndex\": 1,\n\"sQuestion\": \"Joan found 70.0 seashells on the beach. She gave Sam some of her seashells . She has 27.0 seashells . How many seashells did she give to Sam ?\",\n\"lEquations\": [\"X=(70.0-27.0)\"],\n\"lSolutions\": [43.0]\n},\n]\n

    "},{"location":"DL/NLPTheory/mwp/#math23k-deep-neural-solver-for-math-word-problems-2017","title":"Math23k: Deep Neural Solver for Math Word Problems (2017)","text":"

    Deep Neural Solver for Math Word Problems (aclanthology.org) This dataset is in Chinese.

    Problem: Dan have 2 pens, Jessica have 4 pens. How many pens do they have in total ? \nEquation: x = 4+2 \nSolution: 6\n

    "},{"location":"DL/NLPTheory/mwp/#mathqa-2019","title":"MathQA (2019)","text":"

    MathQA-Dataset (math-qa.github.io) This paper proposes a math dataset which enhances the AQuA dataset by providing fully-specified operational programs. This dataset has a diverse range of operators.

    "},{"location":"DL/NLPTheory/mwp/#math-2021","title":"MATH (2021)","text":"

    arxiv.org/pdf/2103.03874.pdf MATH is a LaTeX format dataset, with its answer highlighted in a square block.

    "},{"location":"DL/NLPTheory/mwp/#svmap","title":"SVMAP","text":"

    arkilpatel/SVAMP: NAACL 2021: Are NLP Models really able to Solve Simple Math Word Problems? (github.com) This dataset does not distinguish the data with the texts. An example data is as follows.

    "},{"location":"DL/NLPTheory/mwp/#gsm8k-grade-school-math-2021","title":"GSM8k: grade school math (2021)","text":"

    Collected by OpenAI, this dataset consists of math problems in natural language descriptions, with the math formulas highlighted with special notes.The numbers are not explicitly highlighted with special symbols. Several examples of the data format are as follows.

    "},{"location":"DL/NLPTheory/mwp/#draw","title":"DRAW","text":"

    Providing 1000 grounded word problems.

    "},{"location":"DL/NLPTheory/mwp/#algebra","title":"Algebra","text":""},{"location":"DL/NLPTheory/mwp/#asdiv","title":"AsDiv","text":""},{"location":"DL/NLPTheory/mwp/#multiarith","title":"MultiArith","text":""},{"location":"DL/NLPTheory/mwp/#singleeq","title":"SingleEq","text":""},{"location":"DL/NLPTheory/mwp/#methods","title":"Methods","text":""},{"location":"DL/NLPTheory/mwp/#models","title":"Models","text":"

    Prior to 2017, the models for solving MWP are mainly concerning with neural networks. After Transformer has been released in 2017, attention-based models have been thriving. The novel models based on Transformer are mainly modifying the encoder and decoder structures, among which there are graph-encoder and tree-decoders.

    "},{"location":"DL/NLPTheory/mwp/#graph-to-tree-learning-for-solving-math-word-problems-2020","title":"Graph-to-Tree Learning for Solving Math Word Problems (2020)","text":"

    This paper proposes a attention-based model Graph2Tree, consisting of graph-based encoder and a tree-based decoder. The math word problems are constructed into Quantity Comparison Graph.

    "},{"location":"DL/NLPTheory/mwp/#math-word-problem-solving-with-explicit-numerical-values-2021","title":"Math Word Problem Solving with Explicit Numerical Values (2021)","text":"

    A novel approach called NumS2T is proposed to solve MWP. NumS2T is constructed with (a) an attention-based seq2seq model to generate its math expressions, (b) a numerical value encoder to obtain the number-aware problem state which are then concatenated with the problem hidden state in (a) to obtain number-aware problem representation, and (c) a numerical properties prediction mechanism for comparing the paired numerical values, determining the category of each numeral and measuring whether they should appear in the target expression.!

    "},{"location":"DL/NLPTheory/mwp/#learning-to-reason-deductively-math-word-problem-solving-as-complex-relation-extraction-2022","title":"Learning to Reason Deductively: Math Word Problem Solving as Complex Relation Extraction (2022)","text":"

    This paper proposes a novel approach

    "},{"location":"DL/NLPTheory/mwp/#workflows","title":"Workflows","text":"

    Most of the recent works follow the method of knowledge distilling, which means to generate high quality data with LLMs and then train a small model with the generated (and sometimes then augmented) data. The workflow of such tasks mainly assembles that of the following paper.

    "},{"location":"DL/NLPTheory/mwp/#large-language-models-are-reasoning-teachers","title":"Large Language Models Are Reasoning Teachers","text":"

    This paper proposes a knowledge distilling method in solving math reasoning problems.

    "},{"location":"DL/NLPTheory/mwp/#solving-math-word-problems-via-cooperative-reasoning-induced-language-models-acl-2023","title":"Solving Math Word Problems via Cooperative Reasoning induced Language Models (ACL 2023)","text":"

    This paper develops a cooperative reasoning-induced PLM for solving MWPs called Cooperative Reasoning (CoRe), with a generator to generate reasoning paths and a verifier to supervise the evaluation.

    "},{"location":"DL/NLPTheory/mwp/#scaling-relationship-on-learning-mathematical-reasoning-with-large-language-models-2023","title":"Scaling Relationship on Learning Mathematical Reasoning with Large Language Models (2023)","text":"

    This paper mainly focus on the following two questions: (i) Which is a better performance indicator of LLMs? (pre-training loss amount/model size) (ii) How to improve small model's performance by data augmentation? To answer the second question, this paper proposes a novel methods in data augmentation in the LLM data generation step which is called Rejection Finetuning (RFT). The algorithm of sampling data in RFT mainly adopts the thought of rejection sampling, which is expressed in the following pseudo-code. This paper assumes such an algorithm will yield as many as possible diverse reasoning paths. The workflow of the RFT method is illustrated as follows, where the SFT stands for supervised finetuning. With the novel method RFT, small models such as Llama-7b yields an accuracy of at most 49.7% on GSM8k, 14% higher than the previous SOTA method SFT.

    "},{"location":"DL/NLPTheory/mwp/#pal","title":"PAL","text":"

    This work is a prompt engineering work.

    Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? \nA: Roger started with 5 tennis balls. tennis_balls = 5 2 cans of 3 tennis balls each is bought_balls = 2 * 3 tennis balls. The answer is answer = tennis_balls + bought_balls \nQ: The bakers at the Beverly Hills Bakery baked 200 loaves of bread on Monday morning. They sold 93 loaves in the morning and 39 loaves in the afternoon. A grocery store returned 6 unsold loaves. How many loaves of bread did they have left?\n

    A: The bakers started with 200 loaves loaves_baked = 200 They sold 93 in the morning and 39 in the afternoon loaves_sold_morning = 93 loaves_sold_afternoon = 39 The grocery store returned 6 loaves. loaves_returned = 6 The answer is answer = loaves_baked - loaves_sold_morning - loaves_sold_afternoon + loaves_returned\n
    "},{"location":"DL/NLPTheory/mwp/#preview","title":"Preview","text":""},{"location":"Ling/","title":"Linguistic Notes","text":"

    It is commonly considered that the subject linguistics consists of 6 main branches.

    Liguistics\n    |     -------------\n    | -   | Phonetics |\n    |     -------------       -> Interface: TODO\n    | -   | Phonology |\n    |     -------------       -> Interface: \n    | -   | Morphology |\n    |     -------------       -> Interface: \n    | -   |   Syntax   |\n    |     -------------       -> Interface: \n    | -   | Semantics |\n    |     -------------       -> Interface: \n    | -   | Pragmatics |\n    |     -------------\n

    Besides, border topics of linguistics include - Psycholinguistics - Phylosophy of linguistics - Computational linguistics

    "},{"location":"Ling/pol_en_todo/","title":"TODO","text":"

    Aug. 25th. 2023

    This talk aims both to provide an introduction to the subject Philosophy of Language (a similar subject with semantics and pragmatics, according to its definition; PoL hereafter), and give a summary on the recent ongoing discussion on the linguistics concepts in NLP (e.g. \"meaning\", \"understanding\", \"reasoning\", \"grounding\").

    "},{"location":"Ling/pol_en_todo/#a-preview-of-this-talk","title":"A Preview of This Talk","text":"

    1st 40min: History of philosophy of language 2nd 40min: Recent papers and discussions on PoL topics in NLP 3rd 10min: Discussion on take-away

    "},{"location":"Ling/pol_en_todo/#the-location-of-pol-on-the-academic-coordinate","title":"The Location of PoL on the Academic Coordinate","text":"

    Before we start this talk, we will first provide a brief definition of the term Philosophy of Language in our talk here. The PoL concerns mainly the two following questions, (i) The relationship between the natural language and the world, (ii) The relationship between the human languages and their meaning. Chen (2003) believes that the PoL and the linguistics are two different subjects. He suggests that the linguistics is the study of language rules and patterns and the application of them, while the PoL pays more attention on the more abstract and essential features of the human language (e.g. its relation to the cognition). The author of this talk believes, according to the definition of PoL, it is a subject that closely involves the semantics and pragmatics branches in linguistics. However the PoL and linguistics overlap or not, it is commonly believed that the subject PoL was born in the 1920s, when the linguistic turn was put on stage in the European philosophy.

    "},{"location":"Ling/pol_en_todo/#history-of-pol","title":"History of PoL","text":"

    Now we will dive into the history of PoL. This section is parted \"person by person\". It is noticed that \"person-by-person\" is a common structure of most of the philosophy history, as most of the philosophy progresses are propelled by giants instead of the common people.

    "},{"location":"Ling/pol_en_todo/#gottfried-wilhelm-leibniz","title":"Gottfried Wilhelm Leibniz","text":"

    The main contribution of Leibniz is

    "},{"location":"Ling/pol_en_todo/#ferdinand-de-saussure","title":"Ferdinand de Saussure","text":""},{"location":"Ling/pol_en_todo/#friedrich-ludwig-gottlob-frege","title":"Friedrich Ludwig Gottlob Frege","text":""},{"location":"Ling/pol_en_todo/#bertrand-russell","title":"Bertrand Russell","text":"

    Bertrand Russell is a pure logician.

    "},{"location":"Ling/pol_en_todo/#ludwig-wittgenstein","title":"Ludwig Wittgenstein","text":""},{"location":"Ling/pol_en_todo/#noam-chomsky","title":"Noam Chomsky","text":""},{"location":"Ling/pol_zh/","title":"Philosophy of Language \u8bed\u8a00\u54f2\u5b66","text":"

    Nov. 9th. 2022

    "},{"location":"Ling/pol_zh/#talk","title":"\u8fd9\u6b21talk\u4f1a\u8bb2\u4ec0\u4e48","text":"

    \u2705\u00a0\u4ecb\u7ecd\u8bed\u8a00\u54f2\u5b66\u7684\u601d\u6f6e\u6d41\u53d8\u5386\u7a0b\uff0c\u4ecb\u7ecd\u8bed\u8a00\u4e0a\u7684\u5b9e\u9a8c\u601d\u60f3\u5b9e\u9a8c\uff0c\u8ba8\u8bba\u4e00\u4e9b\u8bed\u8a00\u5b66\u3001\u8ba4\u77e5\u3001\u903b\u8f91\u548c\u54f2\u5b66\u7684\u5173\u8054

    "},{"location":"Ling/pol_zh/#pol","title":"PoL","text":"

    \u8bed\u8a00\u54f2\u5b66\u7684\u57fa\u672c\u95ee\u9898\uff1a 1. \u8bed\u8a00\u548c\u4e16\u754c\u7684\u5173\u7cfb 2. \u8bed\u8a00\u6216\u8bed\u8bcd\u7684\u610f\u4e49\u95ee\u9898

    \u8bed\u8a00\u54f2\u5b66\u548c\u8bed\u8a00\u5b66 \u8bed\u8a00\u5b66\u548c\u8bed\u8a00\u54f2\u5b66\u7684\u8054\u7cfb\u7d27\u5bc6\uff0c\u4f46\u662f\u662f\u4e24\u95e8\u5b66\u79d1\u3002

    20\u4e16\u7eaa\u54f2\u5b66\u4e0a\u53d1\u751f\u4e86\u8bed\u8a00\u8f6c\u5411\uff0c\u8fd9\u4e5f\u662f\u73b0\u4ee3\u8bed\u8a00\u5b66\u5f62\u6210\u7684\u65f6\u5019\u3002

    \u8bed\u8a00\u5b66\u662f\u5bf9\u8bed\u8a00\u89c4\u5f8b\u548c\u8fd9\u4e9b\u89c4\u5f8b\u7684\u5e94\u7528\u7684\u7814\u7a76\uff0c\u8bed\u8a00\u54f2\u5b66\u66f4\u5173\u5fc3\u8bed\u8a00\u66f4\u672c\u8d28\u66f4\u62bd\u8c61\u7684\u610f\u4e49\u3002

    "},{"location":"Ling/pol_zh/#history-of-pol","title":"History of PoL","text":"

    \u83b1\u5e03\u5c3c\u8328\uff1a\u63d0\u51fa\u903b\u8f91\u8bed\u8a00\uff0c\u7b80\u5386\u4eba\u5de5\u8bed\u8a00\u7684\u52aa\u529b

    \u5f3a\u8c03\u81ea\u7136\u8bed\u8a00\u4f9d\u8d56\u4e8e\u77e5\u8bc6\uff0c\u56e0\u6b64\u5206\u6709\u77e5\u89c9\u7684\u6a21\u7cca\u3001\u6b67\u4e49\u7b49\u79cd\u79cd\u7f3a\u9677\u3002\u81ea\u7136\u8bed\u8a00\u4e0d\u662f\u63cf\u8ff0\u5ba2\u89c2\u4e8b\u7269\u7684\u6700\u4f73\u5de5\u5177\uff0c\u4e3a\u4e86\u63a2\u7a76\u771f\u7406\uff0c\u5fc5\u987b\u5efa\u7acb\u4e00\u4e2a\u7531\u666e\u904d\u7b26\u53f7\u7ec4\u6210\u7684\u66f4\u4e3a\u6e05\u695a\u7684\u7b26\u53f7\u4f53\u7cfb\u3002\u8fd9\u79cd\u52aa\u529b\u5728\u6570\u5b66\u65b9\u9762\u662f\u5353\u6709\u6210\u6548\u7684\uff0c\u6bd4\u5982\u5fae\u79ef\u5206\u7b26\u53f7\u3002

    \u7d22\u7eea\u5c14\uff1a \u7d22\u7eea\u5c14\u6700\u5927\u7684\u5f71\u54cd\u662f\u300a\u666e\u901a\u8bed\u8a00\u5b66\u300b\u3002\u6211\u4eec\u4e00\u822c\u8ba4\u4e3a\u7d22\u7eea\u5c14\u662f\u4e00\u4f4d\u8bed\u8a00\u5b66\u5bb6\uff0c\u4f46\u662f\u4ed6\u5728\u8fd9\u672c\u4e66\u4e2d\u63d0\u51fa\u7684\u201c\u80fd\u6307\u201d\u4e0e\u201c\u6240\u6307\u201d\u7406\u8bba\uff0c\u662f\u54f2\u5b66\u91cc\u7684\u7b26\u53f7\u5b66\u7684\u5f00\u7aef\u3002

    \u8bed\u8a00\u662f\u7528\u58f0\u97f3\u8868\u8fbe\u601d\u60f3\u7684\u7b26\u53f7\u7cfb\u7edf\uff0c\u7b26\u53f7\u662f\u7528\u4ee5\u8868\u793a\u8005\u548c\u88ab\u8868\u793a\u8005\u7684\u7ed3\u5408\u3002

    \u6211\u4eec\u4f1a\u8bf4\uff0c\u58f0\u97f3\u672c\u8eab\u4e0d\u80fd\u65bd\u6307\uff0c\u53ea\u6709\u5904\u5728\u67d0\u79cd\u7279\u5b9a\u5173\u7cfb\u4e2d\uff08\u8bed\u8a00\u5b9a\u4e49\u4e86\u58f0\u97f3\u548c\u5b9e\u4f53\u4e4b\u95f4\u7684\u5173\u7cfb\uff09\uff0c\u58f0\u97f3\u624d\u6709\u4e86\u610f\u4e49\u3002

    \u4efb\u610f\u6027\u539f\u5219\u662f\uff0c\u5982\u6b64\u8fd9\u822c\u7684\u65bd\u6307\u548c\u5982\u6b64\u8fd9\u822c\u7684\u6240\u6307\u7ed3\u5408\u800c\u6210\u7684\u4e00\u4e2a\u7b26\u53f7\uff0c\u662f\u4efb\u610f\u7684\u3002eg. \u989c\u8272\u4e0e\u989c\u8272\u8bcd\u7684\u8054\u7ed3\u662f\u4efb\u610f\u7684\uff0c\u989c\u8272\u7684\u754c\u9650\u4e0e\u989c\u8272\u8bcd\u7684\u8054\u7ed3\u4e5f\u662f\u4efb\u610f\u7684\u3002

    \"\u7eff\"\u4e0d\u4ec5\u548c\u7eff\u989c\u8272\u76f8\u8fde\uff0c\u800c\u4e14\u548c\u201c\u84dd\u201d\u201c\u9752\u201d\u7b49\u8bed\u8bcd\u76f8\u8fde\u3002\n\u5982\u679c\u6ca1\u6709\u201c\u84dd\u201d\u201c\u9752\u201d\uff0c\u6211\u4eec\u5c31\u4e0d\u80fd\u77e5\u9053\u201c\u7eff\u201d\u6240\u754c\u5b9a\u7684\u989c\u8272\u8303\u56f4\u3002\n\n\u201c\u4e03\u8272\u5f69\u8679\u201d\n\u65e5\u8bed\u4e0d\u533a\u5206\u201c\u84dd\u201d\u548c\u201c\u7eff\u201d\uff0c\u53ea\u6709\u4e00\u4e2a\u5355\u8bcd\u201c\u9752\u201d\uff08aoi\uff09\uff0c\u65e5\u8bed\u6bcd\u8bed\u8005\u5728\u9274\u522b\u84dd\u8272\u548c\u7eff\u8272\u65f6\u53cd\u5e94\u65f6\u9ad8\u4e8e\u82f1\u8bed\u6bcd\u8bed\u8005\u3002\n\u4e00\u79cd\u5317\u6b27\u8bed\u8a00\u6709\u4e03\u79cd\u84dd\u8272\u7684\u540d\u79f0\u3002\n

    \u6211\u4eec\u4e60\u60ef\u628a\u8bed\u8bcd\u548c\u60c5\u5883\u7684\u8054\u7cfb\u79f0\u4f5c\u7eb5\u5750\u6807\u6216\u8bed\u5883\u5750\u6807\uff0c\u628a\u8bed\u8bcd\u4e4b\u95f4\u7684\u8054\u7cfb\u79f0\u4f5c\u6a2a\u5750\u6807\u548c\u903b\u8f91\u5750\u6807\u3002

    eg. \u5b8c\u5f62\u586b\u7a7a\u9898

    eg. \u6570\u636e\u5e93\u5173\u7cfb\u6a21\u578b\u7684\u5c5e\u6027\u3001\u5143\u7ec4

    \u975e\u5e38\u6709\u8da3\uff0c\u7d22\u7eea\u5c14\u5199\u8fd9\u672c\u8bed\u8a00\u5b66\u6559\u6750\u65f6\uff0c\u4e16\u754c\u4e0a\u5e76\u6ca1\u6709\u7b26\u53f7\u5b66\u8fd9\u4e2a\u5b66\u79d1\u3002\u5728\u4ed6\u63d0\u51fa\u201c\u80fd\u6307\u201d\u201d\u6240\u6307\u201c\u8fd9\u4e2a\u6982\u5ff5\u540e\uff0c\u7b26\u53f7\u5b66\u5728\u4ed6\u201d\u80fd\u6307\u201c\u5728\u201d\u6240\u6307\u201c\u7684\u94fe\u6761\u4e0a\u6ed1\u52a8\u8fd9\u4e00\u8bba\u65ad\u7684\u57fa\u7840\u4e0a\u8bde\u751f\uff0c\u5e76\u81f3\u4eca\u6210\u4e3a\u6cd5\u56fd\u54f2\u5b66\u7684\u4e00\u4e2a\u91cd\u8981\u95ee\u9898\u3002

    \u5f17\u96f7\u683c\uff1a

    \u5f17\u96f7\u683c\u662f\u516c\u8ba4\u7684\u5206\u6790\u54f2\u5b66\u3001\u8bed\u8a00\u54f2\u5b66\u548c\u73b0\u4ee3\u6570\u7406\u903b\u8f91\u7684\u5f00\u521b\u8005\u3002

    \u300a\u6982\u5ff5\u6587\u5b57\uff1a\u4e00\u79cd\u6a21\u4eff\u7b97\u672f\u8bed\u8a00\u6784\u9020\u7684\u7eaf\u601d\u7ef4\u7684\u5f62\u5f0f\u8bed\u8a00\u300b\u4e3b\u8981\u5de5\u4f5c\u662f\uff0c\u8bbe\u8ba1\u4e86\u4e00\u5957\u4eba\u5de5\u7b26\u53f7\u7cfb\u7edf\uff0c\u6392\u9664\u4e86\u81ea\u7136\u8bed\u8a00\u4e2d\u4fee\u8f9e\u4e4b\u7c7b\u7684\u4e1c\u897f\uff0c\u4e13\u6ce8\u4e8e\u6982\u5ff5\u672c\u8eab\u548c\u6982\u5ff5\u4e4b\u95f4\u7684\u8054\u7cfb\uff0c\u56e0\u6b64\uff0c\u5b83\u5c06\u6392\u9664\u81ea\u7136\u8bed\u8a00\u7684\u6a21\u7cca\u6027\u548c\u4e0d\u786e\u5b9a\u6027\u3002\u7528\u8fd9\u5957\u7b26\u53f7\u7cfb\u7edf\u6765\u91cd\u65b0\u8868\u8ff0\u7b97\u672f\u7684\u57fa\u672c\u6982\u5ff5\u548c\u63a8\u7406\u89c4\u5219\uff0c\u660e\u786e\u6240\u6709\u63a8\u7406\u7684\u524d\u63d0\uff0c\u4fdd\u8bc1\u4e00\u4e2a\u8bc1\u660e\u4e2d\u5404\u4e2a\u547d\u9898\u95f4\u7684\u6240\u6709\u63a8\u7406\u89c4\u5219\uff0c\u4f7f\u63a8\u7406\u4e0d\u518d\u57fa\u4e8e\u76f4\u89c9\uff0c\u4e5f\u6ca1\u6709\u8df3\u8dc3\u548c\u8131\u8282\u3002

    \u5bf9\u8bed\u8a00\u54f2\u5b66\u5f71\u54cd\u6700\u6df1\u7684\u662f\u4ed6\u5728\u300a\u7b97\u672f\u57fa\u7840\u300b\u4e2d\u63d0\u51fa\u7684\u4e09\u6761\u8457\u540d\u539f\u5219\uff1a

    1. \u59cb\u7ec8\u628a\u5fc3\u7406\u7684\u4e1c\u897f\u548c\u903b\u8f91\u7684\u4e1c\u897f\u3001\u4e3b\u89c2\u7684\u4e1c\u897f\u548c\u5ba2\u89c2\u7684\u4e1c\u897f\u4e25\u683c\u533a\u5206\u5f00\u3002\u8fd9\u4e00\u6761\u53cd\u5bf9\u5f53\u65f6\u751a\u4e3a\u6d41\u884c\u7684\u5fc3\u7406\u4e3b\u4e49\u3002\u5f17\u96f7\u683c\u4e3b\u5f20\u903b\u8f91\u5b66\u5bb6\u7814\u7a76\u7684\u662f\u8bed\u8a00\u8868\u8fbe\u5f0f\u3002\u8bed\u8a00\u8868\u8fbe\u5f0f\u662f\u53ef\u4ee5\u516c\u5f00\u8003\u5bdf\u7684\uff0c\u610f\u4e49\u7814\u7a76\u5e94\u5f53\u57fa\u4e8e\u8fd9\u4e9b\u8868\u8fbe\u5f0f\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u4e8e\u5bf9\u5fc3\u7406\u8fc7\u7a0b\u7684\u81c6\u6d4b\u3002
    2. \u7edd\u4e0d\u5b64\u7acb\u5730\u5bfb\u95ee\u4e00\u4e2a\u8bcd\u7684\u610f\u4e49\uff0c\u800c\u53ea\u5728\u4e00\u4e2a\u547d\u9898\u7684\u4e0a\u4e0b\u6587\u4e2d\u5bfb\u95ee\u8bcd\u7684\u610f\u601d\u3002\u88ab\u79f0\u4e3a\u8bed\u5883\u539f\u5219\u548c\u4e0a\u4e0b\u6587\u539f\u5219\uff0c\u6307\u51fa\u8bed\u4e49\u7814\u7a76\u7684\u6700\u5c0f\u5355\u4f4d\u8d77\u7801\u662f\u53e5\u5b50\uff0c\u4e0d\u662f\u8bcd\uff0c\u4e0d\u662f\u8868\u5c42\u8bed\u6cd5\u3002\u6211\u4eec\u6ce8\u610f\u5230\u8fd9\u4e00\u6761\u4e0e\u7b2c\u4e00\u6761\u76f8\u5173\uff0c\u56e0\u4e3a\u5982\u679c\u7814\u7a76\u8bcd\uff0c\u8bcd\u4f9d\u8d56\u7684\u5fc5\u7136\u662f\u610f\u4e49\u5728\u5fc3\u7406\u8fc7\u7a0b\u4e2d\u7684\u6620\u5c04\uff0c\u800c\u7814\u7a76\u53e5\u5b50\uff0c\u6211\u4eec\u4f1a\u628a\u8bed\u8bcd\u5728\u53e5\u5b50\u4e2d\u7684\u8054\u7cfb\u5f53\u4f5c\u610f\u4e49\u3002
    3. \u7edd\u4e0d\u5fd8\u8bb0\u6982\u5ff5\u548c\u5bf9\u8c61\u7684\u533a\u522b\u3002

    \u4e24\u4e2a\u601d\u7ef4\u5b9e\u9a8c\uff1a

    1. \u6307\u79f0\u76f8\u540c\u800c\u610f\u4e49\u4e0d\u540c\u7684\u8bcd

      \u201c\u542f\u660e\u661f\u201d\u548c\u201c\u957f\u5e9a\u661f\u201d\u662f\u540c\u4e00\u9897\u884c\u661f\u2014\u2014\u2014\u2014\u91d1\u661f\u3002\n\u4f46\u662f\u4e24\u4e2a\u540d\u8bcd\u7684\u610f\u4e49\u4e0d\u540c\uff0c\u5927\u591a\u6570\u65f6\u5019\u4e0d\u80fd\u66ff\u6362\u3002\n\u201c\u4ed6\u5929\u8fd8\u6ca1\u4eae\u5c31\u8d77\u8eab\uff0c\u8fce\u7740\u542f\u660e\u661f\u5411\u4e1c\u8d70\u53bb\u3002\u201d\n

    2. \u51fd\u5f0f\u7406\u8bba

      \uff08 \uff09\u662f\u4e2d\u56fd\u7684\u9996\u90fd\n\uff08 \uff09= \"\u4f26\u6566\"\u3001\"\u5317\u4eac\"\n\u53ea\u6709\u586b\u5165\u5317\u4eac\u7684\u65f6\u5019\u624d\u662f\u771f\u547d\u9898\n

    \u7f57\u7d20\uff1a\u903b\u8f91

    \u6df1\u5165\u4e13\u540d\u548c\u901a\u540d\u3001\u6096\u8bba\u3001\u6392\u4e2d\u5f8b\u3002

    \u7ef4\u7279\u6839\u65af\u5766\uff1a

    \u524d\u671f\u601d\u60f3\u300a\u903b\u8f91\u54f2\u5b66\u8bba\u300b

    \u201c\u4e16\u754c\u662f\u4e8b\u5b9e\u7684\u7efc\u5408\u201d\uff1a\u201c\u53f8\u9a6c\u5149\u662f\u5510\u671d\u4eba\u201d\u7b26\u5408\u903b\u8f91\uff0c\u4f46\u4e0d\u7b26\u5408\u4e8b\u5b9e\u3002

    \u56fe\u50cf\u8bba

    \u8bed\u8a00\u662f\u547d\u9898\u7684\u603b\u548c\u800c\u4e0d\u662f\u540d\u79f0\u7684\u603b\u548c\u3002

    \u4eba\u5728\u4ea4\u6d41\u601d\u60f3/\u547d\u9898\u65f6\uff0c\u4ea4\u6d41\u7684\u662f\u8111\u4e2d\u7684\u56fe\u50cf\u3002

    \u4ed6\u7684\u524d\u671f\u601d\u60f3\u542f\u53d1\u4e86\u7ef4\u4e5f\u7eb3\u5b66\u6d3e\uff1a\u4eba\u5de5\u8bed\u8a00\uff0c\u903b\u8f91\u8bed\u8a00

    \u5341\u4e5d\u4e16\u7eaa\u672b\u4ee5\u6765\u4eba\u5de5\u8bed\u8a00\u7684\u5c1d\u8bd5\uff1a\u201c\u4e16\u754c\u8bed\uff08Esperanto\uff09\u201d\uff0c\u4e18\u5409\u5c14\u63a8\u5d07\u7684\u57fa\u672c\u82f1\u8bed\uff0c\u81ea\u7136\u8bed\u8a00\u4e2d\u5bf9\u201c\u5973\u4eba\u201d\u201c\u5973\u6027\u201d\u201c\u5973\u58eb\u201d\u201c\u5987\u5973\u201d\u8fd9\u6837\u7684\u6307\u79f0\u7684\u89c4\u8303\u5c1d\u8bd5\u3002

    \u540e\u671f\u601d\u60f3\u300a\u54f2\u5b66\u7814\u7a76\u300b

    \u8bed\u8a00\u6e38\u620f\uff08Sprachspiel\uff09

    \u8bed\u8a00\u7684\u529f\u80fd\u7684\u672c\u8d28\uff1a\u4e00\u65b9\u558a\u51fa\u8bed\u8bcd\uff0c\u53e6\u4e00\u65b9\u4f9d\u7167\u8fd9\u4e9b\u8bed\u8bcd\u6765\u884c\u52a8\u3002

    \u8001\u5e08\u6307\u7740\u77f3\u5934\u8bf4\u201c\u77f3\u5934\u201d\uff0c\u5b66\u751f\u8ddf\u7740\u8bf4\u201c\u77f3\u5934\u201d\u3002\n
    \u4e22\u624b\u7ee2\u65f6\u5531\u7740\u201c\u8f7b\u8f7b\u5730\u653e\u5728\u5c0f\u670b\u53cb\u7684\u8eab\u540e\u201d\uff0c\u628a\u624b\u7ee2\u653e\u5728\u5c0f\u670b\u53cb\u7684\u8eab\u540e\n

    \u4e0e\u524d\u671f\u56fe\u50cf\u7406\u8bba\u7684\u5bf9\u6bd4\uff1a\u5728\u56fe\u50cf\u7406\u8bba\u4e2d\uff0c\u8bed\u8a00\u4ece\u6839\u672c\u4e0a\u662f\u4e00\u79cd\u53cd\u6620\uff1b\u5728\u8bed\u8a00\u6e38\u620f\u8bf4\u4e2d\uff0c\u8bed\u8a00\u9996\u5148\u662f\u4e00\u79cd\u6d3b\u52a8\u3002

    \u610f\u4e49\u6765\u6e90\u4e8e\u4f7f\u7528\u3002

    \u6211\u4eec\u5173\u5fc3\u201c\u9524\u5b50\u201d\u662f\u4ec0\u4e48\u65f6\uff0c\n\u5173\u5fc3\u7684\u662f\u201c\u4f7f\u7528\u4e00\u628a\u9524\u5b50\u201d\uff0c\n\u800c\u4e0d\u662f\u201c\u9524\u5b50\u610f\u5473\u7740\u2026\u2026\u201d\n\u4e8b\u5b9e\u4e0a\uff0c\u6211\u4eec\u4e5f\u6b63\u662f\u4ece\u201c\u4f7f\u7528\u4e00\u628a\u9524\u5b50\u201d\u6765\u5b9a\u4e49\u9524\u5b50\n
    \u5982\u4f55\u533a\u5206\u201c\u4f7f\u7528\u201d\u201c\u6709\u7528\u201d\u201c\u5229\u7528\u201d\uff1f\n\u5728\u4e00\u4e9b\u60c5\u5883\u4e2d\u80fd\u7528\uff0c\u5728\u4e00\u4e9b\u60c5\u5883\u4e2d\u4e0d\u80fd\u7528\u3002\n

    \u8bed\u8a00\u6e38\u620f\u7684\u7c7b\u522b

    \u5bb6\u65cf\u76f8\u4f3c\u7406\u8bba\uff08Familien\u00e4hnlichkeiten\uff09

    \u201c\u4e00\u4e2a\u5bb6\u65cf\u7684\u6709\u4e9b\u6210\u5458\u6709\u4e00\u6837\u7684\u9f3b\u5b50\uff0c\u53e6\u4e00\u4e9b\u6709\u4e00\u6837\u7684\u7709\u6bdb\uff0c\u8fd8\u6709\u4e00\u4e9b\u6709\u4e00\u6837\u7684\u6b65\u6001\uff1b\u8fd9\u4e9b\u76f8\u4f3c\u4e4b\u5904\u4ea4\u53c9\u91cd\u53e0\u3002\u201c

    \u5185\u6db5\uff1a\u4e00\u4e2a\u6982\u5ff5\u7684\u5b9a\u4e49

    \u5916\u5ef6\uff1a\u4e00\u4e2a\u6982\u5ff5\u5305\u542b\u7684\u4e0b\u5c5e\u6982\u5ff5\u7684\u8303\u56f4

    \u901a\u540d\u7684\u4e0b\u5c5e\u8bcd\uff0c\u5404\u79cd\u4e13\u540d\u4e4b\u95f4\u5e76\u6ca1\u6709\u4e25\u683c\u7684\u754c\u9650\uff0c\u4e00\u4e2a\u76f8\u4f3c\u53e6\u4e00\u4e2a\uff0c\u5206\u4eab\u4e0d\u540c\u7684\u5171\u540c\u7279\u5f81\u3002

    \u751f\u6d3b\u5f62\u5f0f\uff08Lebens Form\uff09\uff1a\u5e38\u8bc6\u7684\u91cd\u8981\u6027

    \u201c\u626b\u5e1a\u5728\u90a3\u91cc\u201d\u5df2\u7ecf\u8db3\u591f\u6e05\u6670\u3002\n\u201c\u626b\u5e1a\u628a\u548c\u626b\u5e1a\u5934\u5728\u90a3\u91cc\u201d\uff0c\u867d\u7136\u5206\u6790\u5f97\u66f4\u6e05\u695a\uff0c\u4f46\u5728\u4ea4\u9645\u4e2d\u8ba9\u4eba\u8d39\u89e3\u3002\n

    \u4eff\u4f5b\u6211\u4eec\u53ea\u8981\u66f4\u591a\u8bf4\u4e00\u70b9\uff0c\u591a\u5206\u6790\u4e00\u70b9\uff0c\u4e8b\u60c5\u5c31\u4f1a\u66f4\u6e05\u695a\uff0c\u4eff\u4f5b\u6ca1\u6709\u4e00\u53e5\u8bdd\u672c\u8eab\u5c31\u662f\u8db3\u591f\u6e05\u695a\u7684\u3002

    "},{"location":"Ling/pol_zh/#conclusion-of-agreements","title":"Conclusion of Agreements","text":"
    1. \u8bed\u8a00\u7684\u610f\u4e49\u4f9d\u8d56\u4e8e\u7b26\u53f7\u4e0e\u7b26\u53f7\u4e4b\u95f4\u76f8\u4e92\u5b9a\u4e49\uff0c\u4e0e\u771f\u5b9e\u4e16\u754c\u7684\u5bf9\u8c61\u6ca1\u6709\u7edd\u5bf9\u7684\u4e00\u4e00\u5bf9\u5e94\u5173\u7cfb\u3002
    2. \u8bed\u8a00\u7684\u529f\u80fd\u5728\u4e8e\u53d1\u51fa\u548c\u5b8c\u6210\u547d\u4ee4\u3002
    3. \u81ea\u7136\u8bed\u8a00\u771f\u5b9e\u73b0\u8c61\u6bd4\u4eba\u9020\u8bed\u8a00\u89c4\u5219/\u903b\u8f91\u8868\u8fbe\u5f0f\u66f4\u80fd\u53cd\u5e94\u4eba\u8111\u7684\u8ba4\u77e5\u3001\u66f4\u503c\u5f97\u7814\u7a76\u3002
    "},{"location":"Ling/pol_zh/#history-of-nlp","title":"History of NLP","text":"
    1. \u57fa\u4e8e\u89c4\u5219\u7684 \u2192 \u7ef4\u7279\u6839\u65af\u5766\u524d\u671f\u53ca\u4ee5\u524d\u7684\u7eaf\u903b\u8f91\u8bed\u8a00\uff0c\u4eba\u9020\u8bed\u8a00\u3002
    2. \u57fa\u4e8e\u7edf\u8ba1\u7684\u548c\u6df1\u5ea6\u5b66\u4e60 \u2192 \u7ef4\u7279\u6839\u65af\u5766\u540e\u671f\u7684\u8bed\u8a00\u610f\u4e49\u5728\u4f7f\u7528\u4e2d\u3002
    3. \u548c\u7ed3\u5408\u8bed\u8a00\u5b66\u3001\u8ba4\u77e5\u77e5\u8bc6 \u2192 \u4e54\u59c6\u65af\u57fa\u7684\u8bed\u8a00\u7684\u610f\u4e49\u5728\u521b\u9020\u4e2d\u3002
    "},{"location":"Ling/pol_zh/#pol_1","title":"PoL\u7684\u5176\u5b83\u95ee\u9898","text":"

    \u963f\u4f69\u5c14\u603b\u7ed3\u897f\u65b9\u54f2\u5b66\u7684\u53d1\u5c55\uff1a

    \u53e4\u4ee3\u54f2\u5b66\u6ce8\u91cd\u7684\u662f\u672c\u4f53\u8bba\uff0c\u4ece\u8fd1\u4ee3\u5f00\u59cb\uff0c\u54f2\u5b66\u6ce8\u91cd\u7684\u662f\u8ba4\u8bc6\u8bba\uff0c\u523020\u4e16\u7eaa\uff0c\u54f2\u5b66\u6ce8\u91cd\u7684\u662f\u8bed\u8a00\u3002

    \u672c\u4f53\u8bba\u7684\u95ee\u9898\uff1a\u4ec0\u4e48\u4e1c\u897f\u5b58\u5728\uff0c\u4ec0\u4e48\u662f\u5b9e\u5728\u7684\u57fa\u672c\u5b58\u5728\u5f62\u5f0f\u3002

    \u8ba4\u8bc6\u8bba\u7684\u95ee\u9898\uff1a\u54ea\u4e9b\u4e1c\u897f\u662f\u6211\u4eec\u80fd\u8ba4\u8bc6\u7684\uff0c\u6211\u4eec\u662f\u600e\u6837\u8ba4\u8bc6\u8fd9\u4e9b\u4e1c\u897f\u7684\u3002

    \u8bed\u8a00\u7684\u95ee\u9898\uff1a\u6211\u4eec\u5728\u4f55\u79cd\u610f\u4e49\u4e0a\u80fd\u591f\u8ba4\u8bc6\u5b58\u5728\u2014\u2014\u800c\u610f\u4e49\u7684\u9996\u8981\u8f7d\u4f53\u662f\u8bed\u8a00\u3002\u2192 Linguistic Turn

    PoL\u7684\u5176\u5b83topic\uff1a 1. \u6307\u79f0\u4e0e\u5b9e\u4f53\uff0c\u8bed\u8a00\u4e0e\u610f\u4e49\u7684\u5173\u7cfb 2. \u901a\u540d\u4e0e\u4e13\u540d\uff0c\u8bcd\u4e49\u7684\u8303\u56f4 3. \u771f\u7406\u7406\u8bba 4. \u300a\u6211\u4eec\u8d56\u4ee5\u751f\u5b58\u7684\u9690\u55bb\u300b\uff1a\u9690\u55bb\u65e0\u5904\u4e0d\u5728\uff0c\u4e0d\u4ec5\u5b9a\u4e49\u4e2d\u7684\u201cxx\u662fxx\u201d\u662f\u9690\u55bb\uff0c\u6709\u65f6\u5355\u4e2a\u8bcd\u5c31\u662f\u4e00\u4e2a\u9690\u55bb\u3002

    \u52a8\u8bcd\u662f\u9690\u55bb

    \u65f6\u95f4\u5728\u6d41\u901d\u3002\n

    \u4ecb\u8bcd\u662f\u9690\u55bb

    I\u2019m feeling up today.\nHe is down.\n\u9ad8\u5174\u4e3a\u4e0a\uff0c\u60b2\u4f24\u4e3a\u4e0b\u3002\nWake up.\nHe fell asleep.\n\u6709\u610f\u8bc6\u4e3a\u4e0a\uff0c\u65e0\u610f\u8bc6\u4e3a\u4e0b\u3002\nHe fell ill.\nShe dropped dead.\n\u5065\u5eb7\u548c\u751f\u547d\u4e3a\u4e0a\uff0c\u75be\u75c5\u548c\u6b7b\u4ea1\u4e3a\u4e0b\u3002\nI have controlled over her.\nHe fell from power.\n\u63a7\u5236\u6216\u5f3a\u8feb\u4e3a\u4e0a\uff0c\u88ab\u63a7\u5236\u6216\u88ab\u5f3a\u8feb\u4e3a\u4e0b\u3002\nMy income rose last year.\nThe number of errors is low.\n\u66f4\u591a\u4e3a\u4e0a\uff0c\u66f4\u5c11\u4e3a\u4e0b\u3002\n

    \u4e54\u59c6\u65af\u57fa\uff1a

    \u7ed3\u6784\u4e3b\u4e49\u8bed\u8a00\u5b66\u5230\u8f6c\u6362\u751f\u6210\u8bed\u6cd5\u3002

    1. \u8bed\u8a00\u80fd\u529b/\u8bed\u8a00\u8868\u73b0\uff1a\u8bed\u8a00\u80fd\u529b\u662f\u4eba\u5148\u5929\u5177\u6709\u7684\u72ec\u7acb\u80fd\u529b\uff0c\u5b83\u901a\u8fc7\u5b66\u4e60\u67d0\u79cd\u6216\u67d0\u4e9b\u7279\u5b9a\u8bed\u8a00\u5c55\u73b0\u51fa\u6765\u3002
    2. \u6df1\u5c42\u7ed3\u6784/\u8868\u5c42\u7ed3\u6784\uff1a\u6df1\u5c42\u7ed3\u6784\u901a\u8fc7\u8f6c\u6362\u89c4\u5219\u751f\u6210\u8868\u5c42\u7ed3\u6784\u3002

    \u8bed\u8a00\u5b66\u7684\u5de5\u4f5c\u4e0d\u5e94\u5f53\u662f\u641c\u96c6\u8bed\u8a00\u7d20\u6750\u52a0\u4ee5\u5f52\u7eb3\uff0c\u800c\u662f\u8981\u89e3\u91ca\u8bed\u8a00\u7684\u521b\u9020\u6027\u3002

    CNF

    S -> AB\nA -> AA | a\nB -> b | e\n

    \u8f6c\u6362\u751f\u6210\u8bed\u6cd5\u89c4\u5219 \\(\\Sigma = \\{NP, Vp, T, N, Npsing, NPpl, Aux, V, C, M, En, S, Past, Af\\}\\)

    S -> NP + VP\nVP -> Verb + NP\nNP -> Det + N\nVerb -> Aux + V\nDet -> the, a...\nN -> man, ball...\nAux -> will, can...\nV -> hit, see...\n

    \u4f20\u7edf\uff08\u6210\u5206\uff09\u8bed\u6cd5\u89c4\u5219

    1. \u4e3b + \u8c13\n2. \u4e3b + \u8c13 + \u5bbe\n3. \u4e3b + \u7cfb + \u8868\n4. \u4e3b + \u8c13 + \u5bbe + \u53cc\u5bbe\n5. \u4e3b + \u8c13 + \u5bbe + \u5bbe\u8865\n6. \u4e3b + \u8c13 + \u5e76\u5217\u5bbe\n\n...\n

    \u300a\u53e5\u6cd5\u7ed3\u6784\u300b\uff081957\uff09\u6838\u5fc3\u53e5\u548c\u8f6c\u6362\u6982\u5ff5\u3002

    \u751f\u6210\u6b65\u9aa4 1. \u751f\u6210\u6838\u5fc3\u53e5\u3002

    S -> X1 | X2 | ... Xn\n

    1. \u8f6c\u6362\u7ed3\u6784\uff08\u66ff\u6362\u3001\u7701\u7565\u3001\u6dfb\u52a0\u3001\u6362\u4f4d\uff09\u3002

      X1 -> Y1Z1 | ...\n...\n

    2. \u6dfb\u52a0\u5f62\u6001\u97f3\u4f4d\u89c4\u5219\u3002

      Z1 -> W1\n...\nZn -> Wn\n

    \u8f6c\u6362\uff1a\u6574\u4e2a\u8f6c\u6362\u751f\u6210\u8fc7\u7a0b\u53ef\u4ee5\u5206\u4e3a\u4e09\u4e2a\u6b65\u9aa4

    1. \u901a\u8fc7\u77ed\u8bed\u7ed3\u6784\u6539\u5199\u89c4\u5219\uff0c\u5f97\u5230\u8868\u8fbe\u5f0f\\(R_c\\)\uff0c\\(R_c\\)\u7531\u975e\u7ec8\u7aef\u8bed\u7c7b\u7b26\u53f7\u7ec4\u6210\uff0c\u662f\u6df1\u5c42\u7ed3\u6784\u3002
    2. \u901a\u8fc7\u8bcd\u6c47\u63d2\u5165\u89c4\u5219\u5f97\u5230\u8868\u8fbe\u5f0f\\(R_1\\)\uff0c\\(R_1\\)\u7531\u7ec8\u7aef\u8bed\u7c7b\u7b26\u53f7\u7ec4\u6210\uff0c\u4f46\u4ecd\u662f\u6df1\u5c42\u7ed3\u6784\u3002
    3. \u901a\u8fc7\u8f6c\u6362\u89c4\u5219\u5f97\u5230\u8868\u8fbe\u5f0f\\(R_1\\)\uff0c\\(R_1\\)\u5f53\u7136\u8fd8\u662f\u7531\u975e\u7ec8\u7aef\u8bed\u7c7b\u7b26\u53f7\u7ec4\u6210\uff0c\u4f46\u5b83\u662f\u8868\u5c42\u7ed3\u6784\u3002

    \u6df1\u5c42\u7ed3\u6784\u548c\u8868\u5c42\u7ed3\u6784

    \u4e54\u59c6\u65af\u57fa\u8bed\u6cd5\u4f53\u7cfb\u4e2d\uff0c\u6307\u53e5\u5b50\u751f\u6210\u8fc7\u7a0b\u4e2d\u7279\u5b9a\u9636\u6bb5\u6240\u91c7\u7528\u7684\u4e00\u79cd\u7279\u6b8a\u64cd\u4f5c\u624b\u6bb5\u6216\u89c4\u5219\u3002\u6df1\u5c42\u7ed3\u6784\u662f\u5b83\u7684\u8f93\u5165\uff0c\u8868\u5c42\u7ed3\u6784\u662f\u5b83\u7684\u8f93\u51fa\u3002

    \u6709\u7684\u53e5\u5b50\u8868\u5c42\u7ed3\u6784\u4e0d\u540c\uff0c\u6df1\u5c42\u7ed3\u6784\u76f8\u4f3c\u3002\u901a\u8fc7\u8f6c\u6362\u64cd\u4f5c\u53ef\u4ee5\u76f8\u4e92\u8f6c\u5316\u3002

    \u6709\u7684\u53e5\u5b50\u6df1\u5c42\u7ed3\u6784\u4e0d\u540c\uff0c\u8868\u5c42\u7ed3\u6784\u76f8\u4f3c\u3002\u901a\u8fc7\u8f6c\u6362\u64cd\u4f5c\u4e0d\u80fd\u76f8\u4e92\u8f6c\u5316\u3002

    \u4e3a\u4ec0\u4e48\u4eca\u5929\u6211\u4eec\u8981\u8c08\u8bed\u8a00\u54f2\u5b66\uff1f

    \u9648\u5609\u6620\u8001\u5e08\uff1a\u79d1\u5b66\u662f\u4e00\u4e2a\u4e25\u5bc6\u7684\u6574\u6d01\u7684\u4f53\u7cfb\uff0c\u539f\u56e0\u662f\u5b83\u628a\u6240\u6709\u6df7\u6c8c\u7684\u65e0\u6cd5\u89e3\u51b3\u7684\u95ee\u9898\u629b\u5728\u4e86\u8fd9\u4e2a\u4f53\u7cfb\u4e4b\u5916\u3002[\u300a\u8d70\u51fa\u552f\u4e00\u771f\u7406\u89c2\u300b\uff0c2020]

    \u6240\u4ee5\u54f2\u5b66\u7684\u95ee\u9898\u662f\u7814\u7a76\u88ab\u79d1\u5b66\u6254\u51fa\u53bb\u7684\u6df7\u6c8c\u3002

    \u8bed\u8a00\u54f2\u5b66\u5c31\u50cf\u201c\u5165\u4fb5\u7684\u5b9e\u5728\u754c\u201d\uff0c\u201c\u8fb9\u754c\u7684\u6d4b\u8bd5\u70b9\u201d\u3002

    "},{"location":"Ling/pol_zh/#recommended-reading","title":"Recommended Reading","text":"

    \u300a\u8bed\u8a00\u54f2\u5b66\u300b\u9648\u5609\u6620

    \u300a\u666e\u901a\u8bed\u8a00\u5b66\u300b\u7d22\u7eea\u5c14

    \u300a\u903b\u8f91\u54f2\u5b66\u8bba\u300b\u7ef4\u7279\u6839\u65af\u5766

    \u300a\u54f2\u5b66\u7814\u7a76\u300b\u7ef4\u7279\u6839\u65af\u5766

    \u300a\u6211\u4eec\u8d56\u4ee5\u751f\u5b58\u7684\u9690\u55bb\u300b\u4e54\u6cbb\u00b7\u83b1\u8003\u592b

    \u300a\u5fc3\u667a\u3001\u8bed\u8a00\u548c\u673a\u5668\u300b\u5f90\u82f1\u747e

    "},{"location":"Ling/pol_zh/#_1","title":"\u8ba8\u8bba","text":"

    \u662f\u5426\u6240\u6709\u6ca1\u6709\u7528\u8bed\u8a00\u8868\u8fbe\u7684\u77e5\u8bc6\uff0c\u90fd\u53ef\u4ee5\u88ab\u7528\u8bed\u8a00\u8868\u8fbe\uff1f\uff08not NP or NP-hard\uff09

    \u53ea\u5b66\u4e60\u8bed\u8a00\u662f\u5426\u80fd\u6a21\u62df\u4eba\u7684\u667a\u80fd\u6c34\u5e73\uff1f

    \u6a21\u578b\u662f\u5426\u9700\u8981\u5e94\u5bf9\u6240\u6709\u7684\u5f02\u5e38\u60c5\u51b5/\u673a\u5668\u8bed\u8a00\u7684\u76ee\u6807\u672c\u8eab\u8981\u4e0e\u4eba\u7c7b\u8bed\u8a00\u6709\u6240\u533a\u522b

    "},{"location":"Ling/Morphology/","title":"Morphology","text":""},{"location":"Ling/Morphology/#outline","title":"outline","text":""},{"location":"Ling/Pragmatics/ca_da/","title":"Research Methods: Conversation Analysis and Discourse Analysis","text":""},{"location":"Ling/Pragmatics/ca_da/#discourse-analysis","title":"Discourse Analysis","text":"

    Some discourse analysis are taught in linguistic departments (Johnstone, 2018)

    Foucault (1972, 1980) use 'discourse' to refer to the ways of talking and thinking constitute ideologies (set of interrelated ideas) and serve to circulate power in society, and in the sense involved patterns of belief and habitual actions as well as patterns of language.

    Johnstone, Barbara. 2018. Discourse Analysis (3rd ed.). UK: Wiley-Blackwell.

    "},{"location":"Ling/Pragmatics/ca_da/#conversational-analysis","title":"Conversational Analysis","text":"

    Definition

    Conversation analysis is the study of interactional activities. The object being studied involves at least two persons.

    Unit

    conversation > sequence > adjacency pair > turn

    types of adjacency pairs

    turn-taking feature

    One involved in a conversation is supposed to give floor to the other party (parties) at a proper point of time. to keep the balance between the time one spends talking and the time the others spend talking.

    pre-sequence

    insertion sequence

    A: Are you coming tonight?\nB: Can I bring a guest?\nA: Male or female?\nB: What difference does that make?\nA: An issue of balance.\nB: Female.\nA: Sure.\nB: Yeah, I\u2019ll be there.\n

    preference organization

    first part second part preferred dispreferred assessment agree disagree invitation accept refuse offer accept decline proposal agree disagree request acccept refuse"},{"location":"Ling/Pragmatics/intro/","title":"Introduction and Concepts","text":""},{"location":"Ling/Pragmatics/intro/#what-is-pragmatics","title":"What is Pragmatics","text":""},{"location":"Ling/Pragmatics/intro/#how-pragmatics-differ-from-other-linguistics-branches","title":"How pragmatics differ from other linguistics branches?","text":"

    Charles W. Morris (1901-1979) American semiotician and philosopher. supervised by Charles S. Pierce. In his Foundations of the Theory of Signs (1938), Morris proposed that semiotics should have three divisions:

    syntax  -------------> semantics -------------> pragmatics\n              \u2b06\ufe0f\u00a0                        \u2b06\ufe0f\u00a0           \n                        decoding              use in context\n

    During the course of everyday communication, human beings as social animals convey more than the literal, propositional meaning (i.e. we don\u2019t always mean what we say literally).

    There is more to the literal meaning of a sentence when we consider the sentence in relation to the context, i.e., the situation of uttering the sentence.

    Sentence that cannot be considered in isolation \u2192 utterance

    Pragmatics looks beyond truth-conditional meanings, and explores non-literal, implicit, context-related meanings.

    Thus both semantics and pragmatics deal with meaning, yet there is a division of labour: semantics deals with meaning in context.

    "},{"location":"Ling/Pragmatics/intro/#levels","title":"Levels","text":""},{"location":"Ling/Pragmatics/intro/#context-deixis-and-reference","title":"Context, Deixis and Reference \u8bed\u5883\uff0c\u6307\u793a\u4e0e\u6307\u79f0","text":""},{"location":"Ling/Pragmatics/intro/#deixis","title":"Deixis","text":"

    Definition

    Deixis and context: Deictic does not have concrete meanings. Deictic words depend on context for meaning.

    Types of deixis

    defined in relation to the deictic center (person, time, place, discourse, social)

    The deictic cycle. Harman, 1990.

    "},{"location":"Ling/Pragmatics/intro/#reference","title":"Reference","text":"

    Definition: The act of using a word/phrase to pick out something in the world.

    Types of referring expressions (\u6307\u793a\u8bed)

    Choice of referring expressions: based on the speaker\u2019s assumption about what the listener knows.

    Conditions for successful reference: must be collaborative

    "},{"location":"Ling/Pragmatics/intro/#presupposition","title":"Presupposition","text":"

    Differences between semantic and pragmatic presuppositions

    for pragmatic presupposition

    cancellation of presuppositions

    Presuppositions are cancellable or defeasible by changing the words to alter the previous proposition.

    F: \u6709\u4e9b\u4eba\u517b\u732b\u4e86\n~F: \u6709\u4e9b\u4eba\u6ca1\u517b\u732b\n

    projection problem

    presupposition may not survive when simple sentences are projected into complex ones.

    Mary didnt manage to find a job.\nMary didnt manage to find a job. In fact, she didnt even try.\n
    Mike didnt date Mary again.\nMike didnt date Mary gain, if indeed he ever did.\n

    presupposition triggers (\u89e6\u53d1\u8bed): how to determine speakers\u2019 presupposition in the course of verbal communication?

    "},{"location":"Ling/Pragmatics/intro/#conversational-implicature","title":"Conversational Implicature","text":"

    Implicature

    Grice\u2019s theory of conversational implicature, Logic and Conversation.

    An outline of a systematic theory of language use, which can account for the way people read between the lines when understanding everyday language.

    meaning of a sentence

    Grice\u2019s new terms

    Grice draws a distinction

    - Smith doesn't seem to have a girlfriend these days.\n\n- He has been paying a lot of visits to New York lately.\n\n=> entailment: he visits New York recently\n=> implicature: Smith may be having a girlfriend in New York.\n

    features

    Grice\u2019s cooperative principle

    common purpose/common direction: Conversational partners normally recognize a common purpose or a common direction in their conversation.

    common objectives (~= joint project): At any point of a conversation, certain \u201cconversational moves\u201d are judged suitable or unsuitable for accomplishing their common objectives.

    How the cooperative principle is applied:

    How to follow the maxims:

    How to break the maxims:

    The cooperative maxims are guidelines instead of rules. They can be creatively infringed/violated.

    The Horn scales & scalar implicature

    When any form on a scale (most, some, always, often, must, may\u2026) is used or asserted, the negative of all forms higher on the scale is implicated.

    types of implicature

    graph TD\nimplicatures --> conventional/lexical\nimplicatures --> conversational\nconversational --> generalized\nconversational --> particularized\n
    "},{"location":"Ling/Pragmatics/intro/#lexical-pragmatics","title":"Lexical Pragmatics","text":"

    Criticism of relevance theory

    To calculate the processing cost,

    Lexical pragmatics

    pragmatic enrichment

    graph TD\n\npragmatic_enrichment --> pragmatic_narrowing\npragmatic_enrichment --> pragmatic_broadening\npragmatic_broadening --> approximation\npragmatic_broadening --> metaphorical_extension\n
    "},{"location":"Ling/Pragmatics/socio/","title":"Sociopragmatics","text":"

    \u8fd9\u5757\u5185\u5bb9\u4f3c\u4e4e\u6ca1\u6709\u8bb2\u5f88\u591a\u4e1c\u897f. \u7c98\u4e00\u70b9ppt\u539f\u8bdd

    Intercultural Pragmatics

    Intercultural Pragmatics has the potential to help establish a \u201charmonious\u201d interaction and relationship between people from different cultures.

    IP aims to study how to deal with the differences arising from cross-cultural communication and how they may affect the universality of pragmatic principles (theory of speech acts, co-

    operative principle, politeness principle, etc.)

    intercultural pragmatics\u2019 two way perspective

    sociopragmatics

    "},{"location":"Ling/Pragmatics/theories/","title":"Theories and Hypothesis","text":""},{"location":"Ling/Pragmatics/theories/#speech-act-theory","title":"Speech Act Theory \u8a00\u8bed\u884c\u4e3a\u7406\u8bba","text":"

    Speech action definition:

    Speech act theory:

    A speech act = locutionary act + illocutionary act + perlocutionary act

    Illocutionary force \u8bed\u529b: communicative purposes or social functions

    Classification of speech act

    Funtion-based classification system:

    by John Searle, UCB philosopher

    Structure-based classification system:

    "},{"location":"Ling/Pragmatics/theories/#politeness-theory","title":"Politeness Theory","text":"

    Development of Gricean theory

    Definition of politeness theory

    Conversationalists work together, each trying to maintain his/her own face and the face of his/her counterpart.

    type of face

    Acts involved

    Leech\u2019s six Politeness Principle: extension of Gricean theory

    (Note that the term \u2018neo-Gricean\u2019 is most often used to describe the works of Laurence Horn, Stephen Levinson, etc. not other theories e.g. relevance theory)

    "},{"location":"Ling/Pragmatics/theories/#relevance-theory","title":"Relevance Theory","text":"

    Only preserving the maxim of relation in Gricean theory

    Definition of relevance theory

    its investigates how aspects of meaning are generated in context and in relation to the speakers intentions.

    R(relevance) = E(#contextual effects)/C(cost of efforts in obtaining E)

    Relevance is higher when cognitive effects are higher, but it is lower when more processing efforts is required.

    Two aspects of relevance principle

    Application of RT

    "},{"location":"Ling/Semantics/","title":"Index","text":""},{"location":"Ling/Semantics/#contents","title":"Contents","text":"

    1 - Definition Clearification

    This chapter provides a brief introduction to the terminologies involved in semantics.\n

    2 - Logics & Formal Semantics

    This chapter first introduces the semiotics in formal semantics (which adopts a similar system with that in the logics). It then discusses about the semantics in two perspectives: the propositional logic and the predicate logic. It also introduces several basic rules in logic inference.\n

    3 - Scope Ambiguity

    This chapter discusses on the unsolved questions in scope ambiguity.\n
    "},{"location":"Ling/Semantics/#grading","title":"Grading","text":"

    mid-term: 35%

    final: 50%

    participation: 15%

    "},{"location":"Ling/Semantics/#two-tests","title":"Two tests","text":"

    Two tests will be given during the term, one in the middle and one at the end of the term, covering all the material covered up to that point in the course. The tests will be a combination of various types of questions, including true/false and short essay.

    "},{"location":"Ling/Semantics/#final-review-for-fun","title":"Final Review & For Fun","text":"

    The following parts are written in preparation for the final review but I upload it as well for you to read for fun.

    "},{"location":"Ling/Semantics/#noble-semanticians","title":"Noble Semanticians","text":"Name Field Contribution Live Nation Institution Fun facts Noam Chomsky mainly in syntax generative grammar, transformational grammar, government and binding theory, minimalist program, productivity of language, recursivity of language 1928- USA MIT Most prominent linguist alive Ferdinand de Saussure linguist and semiotician founder of semiotics. concepts: sign, signifier vs. signified, diachronic vs. synchronic, language vs. parole, paradigmatic vs. syntagmatic 1857-1913 Switzerland University of Geneva, Switzerland Charles Sanders Peirce philosopher, mathematician, logician founder of semiotics. concepts: index, icon, symbol. 1839-1914 Milford Pennsylvania JHU Michel Br\u00e9al comparative grammar coined the term \u201csemantics\u201d, diachronic focus 1832-1915 born in Rheinlan (Germany), studied in Paris and Berlin in Paris Leonard Bloomfield structural linguistics structural linguistics, language as a self-regulating system, behaviorism(stimulus-response testing) 1887-1949 Yale University reject introspection Aristotle polymath term logic, initiator of western scientific tradition 384-322 BC Stagira, Greece tutor of Alexander the Great Gottlob Freg philosopher, logician, mathematician predicate logic, sense(sentence\u2019s proposition) vs. reference (its truth value) 1848-1925 German University of Jena extreme right-wing views Peter Geach philosopher, professor of logic donkey sentence (1962) 1916-2013 England Oxford Richard Montegue semanticist Montegue grammar: syntax and semantics go together 1930-1971 student of Alfred Tarski, gay man, killed in his apartment, four influential papers Gareth Evans philosopher philosophy of mind, work on reference, e-type anaphora 1946-1980 England Oxford Irene Heim semanticist definite and indefinite pronouns 1954- German, Munich MIT, phd 1982 advisor: Barbara Partee Hans Kamp philosopher and linguist discourse representation theory (DRT) 1954- Dutch Bertrand Russell philosopher, logician logic, philosophy of mathematician 1872-1970 Wales, Britain Cambridge Henri\u00ebtte de Swart linguist tense and aspect, negation, bare nominals and indefinite noun phrases. She has also investigated the role of semantics in language evolution, and was involved in the development of bidirectional optimality theory. 1961- Dutch director of Netherlands Graduate School of Linguistics and Utrecht Institute of Linguistics"},{"location":"Ling/Semantics/#example-questions","title":"Example questions","text":"

    What is a donkey pronoun?

    A donkey sentence is such that an expected existential is interpreted as universal taking wide scope.\n

    What is a discourse pronoun:

    outside the scope of existing quantifier\ne.g. No student studies semantics. He is outside.\n

    The scope of a quantifier is always bound in the clause it appears.

     True\n

    What is quantifier raising?

    Chmosky and May.\nLF, \n

    What are De Morgan\u2019s laws?

    ~(p or q) <=> (~p) and (~q)\n~(p and q) <=> (~p) or (~q)\n

    What are conditional laws

    p -> q <=> ~p or q\n

    When is the indefinite \u201ca\u201d not an existential quantifier?

    1. donkey sentence\n2. generic noun phrase. A woman is difficult to please. \\forall x(Wx -> Dx)\n3. John is a plumber.pj\n

    2 readings: Some boy smiled at Jane and some boy kissed Molly.

    \\exist x(Bx and Sx,j and Kx,m)\n\\exist x(Bx and Sx,j) and \\forall y(By and Ky,m)\n

    2 Types of Recursion

    embedding and coordination\n
    "},{"location":"Ling/Semantics/ambiguity/","title":"Scope Ambiguity","text":""},{"location":"Ling/Semantics/ambiguity/#scope-ambiguity","title":"Scope Ambiguity","text":""},{"location":"Ling/Semantics/ambiguity/#scope-and-anaphora","title":"Scope and Anaphora","text":"

    antecedent vs. postcedent

    anaphor vs. cataphor

    Predicate logic is suited to capture natural language meaning

    allow recursion = recursivity

    two sources of recursion

    some boy kissed every girl.\n\nEvery girl was kissed by some boy.\n
    Someone mentioned tehy called everyone.\n\n\\forall x: Px\\forall y(M(x, Cxy))\n

    linear order: negative polarity item

    graph TD\n  DS -.Transformation.-> SS\n    SS -.send off.-> PF\n    SS -.send off.-> LF\n    PF -.acoustic representation.-> SS\n    LF -.semantic interpretation.-> SS\n

    Transformation:

    CALLOUT: annotation, connotation and denotation

    "},{"location":"Ling/Semantics/ambiguity/#solution-for-scope-ambiguity","title":"Solution for scope ambiguity","text":"

    Quantifier-raising - NC RM - syntactic structure comes before the semantic structure - The movement we make in SS to remove ambiguity in DS is called quantifier-raising. - take the quantifier to the higher position to show the scope

    Quantifier-in - Montague grammar - The derivational illustration is called quantifier-in. - each predicate take an argument once a time

    Quantifier storage - Cooper storage - semantic ambiguity not represented in syntactic structure - semantic representation in which scope ambiguities are obtained without special syntactic rules

    "},{"location":"Ling/Semantics/ambiguity/#quantifier-in","title":"Quantifier-in","text":"

    interrogative: asking a question

    which woman does every man love?\n

    which scopes over every.

    "},{"location":"Ling/Semantics/ambiguity/#scope-ambiguity_1","title":"Scope ambiguity","text":"

    e.g. some boy did not laugh.

    \\exist x (Boy(x) and ~Laugh(x))\n~\\exist x (Boy(x) and Laugh(x))\n

    some boy kissed no girl.

    \\exist x (Boy(x) and ~\\exist y (Girl(y) and Kiss(x, y)))\n~\\exist y (Girl(y) and \\exist x (Boy(x) and Kiss(x, y))): there was no girl kissed by a boy\n

    every boy kissed no girl.

    \\forall x (Boy(x) and ~\\forall y(Girl(y) and Kiss(x, y)))\n

    "},{"location":"Ling/Semantics/ambiguity/#deictic","title":"Deictic","text":"

    No boy said he was hungry.

    No boy was present. He was outside instead.: \u201che\u201d is trying to refer to \u201dno boy\u201d but outside the scope.

    pronoun \\(\\sub\\) anaphora

    "},{"location":"Ling/Semantics/ambiguity/#discourse-anaphora","title":"Discourse Anaphora","text":"

    e.g.

    Every student was present and she was interested.\n

    every: scopes over \u201cEvery student was present\u201d

    every: an indefinite quantifier. \u201cshe\u201d\u2019s antecedent is not clear

    \u201cshe\u201d is hardly bound by the antecedent. \u201cshe\u201d is free * ungrammatical: \u4e0d\u5408\u8bed\u6cd5\u7684, syntactic

    "},{"location":"Ling/Semantics/ambiguity/#infelicitous-semantic-fit-the-context","title":"infelicitous: \u4e0d\u5408\u9002\u7684, semantic, fit the context","text":"

    So we may conclude the following rules for e-type anaphora. BUT this part has NOT been verified with any authority. Do NOT take them as given truths during exams.

    e.g. No boy thinks that he has a chance.

    ~\\exist x(Boy(x) and Think(x, Has-a-chance(x)))\n

    A particular boy said he wanted to kiss every girl. He then did it.

    \\exist !x(Bx and  W(x, K(x, \\forall y(Gy -> K(x, y))))) and K(x, y)\n

    "},{"location":"Ling/Semantics/ambiguity/#donkey-anaphora","title":"Donkey anaphora","text":"

    if a farmer owns a donkey, he beats it.

    * \\exist x (Fx and \\exist y (Dy and O(x, y))) -> B(x, y)\n\\forall x \\forall y (Fx and Dy and O(x, y) -> B(x, y))\n

    = every farmer who owns a donkey beats it.

    \\exist x(Fx and \\exist y (Dy and O(x, y)) -> B(x, y))  // y is free\n

    \u2757\u2757\u2757

    A donkey sentence is such that an expected existential is interpreted as universal taking wide scope.

    donkey pronoun can be: it, him, they (can also be plural forms)

    \u201ca\u201d: generic indefinite

    A woman is a difficult thing to please.\n

    [Every farmer [who owns a donkey] beats it.]

    universal wide scope: it scopes more over the relative clause

    The problem - Existential with narrow scope - interpreted as universal with wide scope - in conditional clauses - in restriction of every

    Conclusion - the machinery of predicate logic is broken - cannot capture meaning of natural language

    If a student tries, she passes the exam.

    (\\exist x(Sx and Tx)) -> Py   ; y is free\n\\exist x((Sx and Tx)) -> Py)\n

    interpretation

    \\forall x((Sx and Tx) -> px)\n

    Solutions for donkey anaphora:

    Reference: Unselective Binding

    "},{"location":"Ling/Semantics/ambiguity/#chapter-6-in-short-discoursedonkey-anaphora","title":"Chapter 6 in short: Discourse/Donkey Anaphora","text":"

    (\u52a0\u7c97\u7684\u662fDonkey anaphora\u548cE-type anaphora\u7684\u533a\u522b)

    Discourse: basic unit of interpretation

    Anaphoric relations in sentence and discourse - E-type anaphora: pronoun outside the scope of binder, not bound, content of pronoun reconstructed, reconstruction based on context - in separate sentences

        ```\n    A student came in. *She*(the student came in) had a question about the exam.\n    ```\n\n- in the same sentence but outside the scope\n    ```\n    If a student likes Copenhagen, *she*(for every case we examine, the student in question who likes Copenhagen) is happy.\n    ```\n\n- problem of compound: antecedent must appear as a noun?\n    ```\n    Bill owns a cat. Max takes care of it.\n    Bill is a cat-owner. # Max takes care of it.\n    ```\n

    Anaphora resolution - TODO

    "},{"location":"Ling/Semantics/definitions/","title":"Definition Clarification","text":""},{"location":"Ling/Semantics/definitions/#what-is-semantics","title":"What is semantics?","text":""},{"location":"Ling/Semantics/definitions/#the-topics-involving","title":"The topics involving:","text":""},{"location":"Ling/Semantics/definitions/#meaning-capturing-metalanguage-tools","title":"Meaning capturing: metalanguage tools","text":""},{"location":"Ling/Semantics/definitions/#ways-to-capture-meaning-henriette-de-swart","title":"Ways to capture meaning: (Henri\u00ebtte de Swart)","text":""},{"location":"Ling/Semantics/definitions/#predicatepredicate-calculusfirst-order-predicate-logic","title":"Predicate/Predicate Calculus/First-order Predicate Logic","text":""},{"location":"Ling/Semantics/definitions/#map-of-linguistics-theory","title":"Map of Linguistics Theory","text":"
    graph TD\n  Language_Ability --> Competence\n  Language_Ability --> Performance\n  Competence --> Grammar\n  Competence --> Lexicon\n  Grammar --> Semantics\n  Grammar --> Phonology\n  Grammar --> Syntax\n  Grammar --> Pragmantics\n
    "},{"location":"Ling/Semantics/definitions/#semantics-syntax","title":"Semantics & Syntax","text":""},{"location":"Ling/Semantics/definitions/#syntax-needs-semantics","title":"Syntax needs semantics","text":""},{"location":"Ling/Semantics/definitions/#semantics-needs-syntax","title":"Semantics needs Syntax","text":""},{"location":"Ling/Semantics/definitions/#semantics-pragmatics","title":"Semantics & Pragmatics","text":""},{"location":"Ling/Semantics/definitions/#context-and-deixis","title":"Context and Deixis","text":""},{"location":"Ling/Semantics/definitions/#deixis-needs-context","title":"Deixis needs context","text":"

    Deixis is how objects, events and situations relate to the here and now of the speakers. It shows that utterance meaning cannot be fully determined by sentence meaning.

    (Last week) (I) play(ed) tennis with Chris.\n
    "},{"location":"Ling/Semantics/definitions/#deictic-vs-anaphoric-use-of-pronouns","title":"Deictic vs. Anaphoric use of pronouns","text":"

    Deictic: pointing context Anaphoric: linguistic expression context. pronoun resolution: antecedent - pronoun

    \ud83d\udcad index - indices (higher register) / indexes \ud83d\udcad Desiderata (high-register way to say Goal, desideratum. sl.)"},{"location":"Ling/Semantics/definitions/#map-of-semantics-taxomony","title":"Map of Semantics / Taxomony","text":"

    Semantics - lexical semantics - meaning of lexical items - smaller unites - mainly words - morphemes - compositional semantics - meaning of larger units - phrases and sentences - word combination

    "},{"location":"Ling/Semantics/definitions/#utterance-sentence-proposition","title":"Utterance / Sentence / Proposition","text":""},{"location":"Ling/Semantics/definitions/#lexical-semantics","title":"lexical semantics","text":"
    abiguity: bank, punch, pitcher\nsynonymy: beautiful-lovely, antonymy: male-female\nhyponymy: set -> superset\ntaxonomy: set -> subset\nsymmetric relation: marry. mutually entail each other\nconverse relation: send, sell\nmeronomy: 
    "},{"location":"Ling/Semantics/definitions/#1-homonymy","title":"1) homonymy","text":""},{"location":"Ling/Semantics/definitions/#2-polysemy","title":"2) polysemy","text":""},{"location":"Ling/Semantics/definitions/#3-synonymy","title":"3) synonymy","text":""},{"location":"Ling/Semantics/definitions/#4-antonymy","title":"4) antonymy","text":""},{"location":"Ling/Semantics/definitions/#5-hyponymy","title":"5) hyponymy","text":""},{"location":"Ling/Semantics/definitions/#6-meronymy","title":"6) meronymy","text":"

    part-whole relationship

    subtypes of meronymy

    pistachio - almond taxonymy\nlaugh - cry move in - move out\ncry - weep\nRMB - monetary unit\ngrilfriend - wife\nsit - stand\njump - hop\ngood - bad\nbeat - beet\nrise - fall reverse\ncigarette - cigar taxonymy\nkid - goat dragon - monster\n
    "},{"location":"Ling/Semantics/definitions/#compositional-semantics","title":"Compositional semantics","text":""},{"location":"Ling/Semantics/definitions/#inventory-of-components","title":"Inventory of components","text":""},{"location":"Ling/Semantics/definitions/#important-linguistics","title":"Important linguistics","text":"

    Michel Br\u00e9al: coined semantics

    Ferdinand de Saussure: semiotician, diachronic vs. synchronic.

    Leonard Bloomfield: structural linguistics, Language, behaviorism(stimulus-response testing). reject introspection(theorize about language learning by thinking about on ones own experience)

    "},{"location":"Ling/Semantics/definitions/#diachronic-synchronic","title":"Diachronic & Synchronic","text":""},{"location":"Ling/Semantics/definitions/#signifier-signified-referent","title":"Signifier & Signified & Referent","text":""},{"location":"Ling/Semantics/definitions/#langue-parole","title":"Langue & Parole","text":""},{"location":"Ling/Semantics/definitions/#paradigmatic-syntagmatic","title":"Paradigmatic & Syntagmatic","text":"

    Noam Chomsky Syntax

    "},{"location":"Ling/Semantics/definitions/#generative-grammar","title":"Generative Grammar","text":""},{"location":"Ling/Semantics/definitions/#ambiguity","title":"Ambiguity","text":"

    e.g. Flying planes can be dangerous.

    graph TD\n  are --> planes\n    planes --> flying\n    are --> dangerous\n
    graph TD\n    is --> flying\n    flying --> planes\n    is --> dangerous\n
    "},{"location":"Ling/Semantics/definitions/#pronoun-resolution","title":"pronoun resolution","text":""},{"location":"Ling/Semantics/definitions/#inference","title":"Inference","text":"

    notes: cf. compare, e.g. for example

    graph TD\n  Inference --> Entailment\n  Inference --> Presuppositions\n  Inference --> Implicature\n

    any conclusion drawn from a set of propositions, from something someone has said and so on.

    "},{"location":"Ling/Semantics/definitions/#entailment","title":"Entailment","text":"
    Three girls were present. -> More than two girls were present.\nThree girls were not present. kills More than two girls were present.\n

    Cannot be cancelled

    # Three girls were present, but actually two girls come.\n#: semantically wrong\n
    "},{"location":"Ling/Semantics/definitions/#presupposition","title":"Presupposition","text":"
    Jim regrets ignoring the first problem. -> Jim has the first problem.\nJim does not regret ignoring the first problem. -> Jim has the first problem.\n

    cannot be cancelled

    # Jim regrets ignoring the first problem, but he does not have the first problem.\n
    "},{"location":"Ling/Semantics/definitions/#implicature","title":"Implicature","text":"
    Susan blushes when Jim looks at her, but she does not have a crush on him.\n
    "},{"location":"Ling/Semantics/definitions/#compositionality","title":"Compositionality","text":"

    Proposed by Noam Chomsky, the term compositionality entails three dimension.

    "},{"location":"Ling/Semantics/definitions/#principle-of-compositionally-of-meaning","title":"Principle of compositionally of meaning","text":"

    The meaning of the whole is a function of the meaning of its parts and the way they are put together.: \u2026 is determined by\u2026

    "},{"location":"Ling/Semantics/formal_semantics/","title":"Logics & Formal Semantics","text":""},{"location":"Ling/Semantics/formal_semantics/#metalanguage","title":"Metalanguage","text":"
    a. January has 31 days.\nb. *******January******* has 7 letters.\nb*. 'January' has 7 letters.\n

    Liar sentence

    (31) Sentence (31) is false.\n

    solutions: (\u4e0d\u8003)

    "},{"location":"Ling/Semantics/formal_semantics/#connectives-truth-and-truth-conditions","title":"Connectives, truth, and truth conditions","text":"

    logic overview

    graph TD\n  Logic --> Logic_from_antiquity\n    Logic --> Predicate_Logic\n    Logic_from_antiquity --> Term_Logic\n    Logic_from_antiquity --> Propositional_Logic\n

    logic from antiquity: older

    predicate logic: newer

    Aristotle: term logic

    Gottlob Frege: predicate logic

    "},{"location":"Ling/Semantics/formal_semantics/#history-of-logics","title":"History of Logics","text":"

    Not applied for - question (?) - exclamation - modal: modal logic

    \ud83d\udcad ergo: therefore"},{"location":"Ling/Semantics/formal_semantics/#term-logic","title":"Term logic","text":""},{"location":"Ling/Semantics/formal_semantics/#modus-ponens","title":"Modus Ponens","text":"

    Means of putting, MP syllogism, affirming the antecedent

    P(conditional statement): If it rain, I do not go to school.\nH: It rains.\nC: I do not go to class.\n

    Formal fallacy: affirming the consequent. Abductive reasoning.

    P: If it rains, I will not go to class.\nH: I do not go to class.\nC: * It rains.\n

    "},{"location":"Ling/Semantics/formal_semantics/#modus-tollens","title":"Modus Tollens","text":"

    Means of carrying, MT syllogism, denying the consequent.

    P: If it has not been cloudy, it does not rain.\nH: It rains.\nC: It has been cloudy.\n

    "},{"location":"Ling/Semantics/formal_semantics/#hypothetical-syllogism","title":"Hypothetical syllogism","text":"

    principle of transitivity

    P: If it rains, the soils goes wet. If the soil goes wet, the plants grow.\nH: It rains.\nC: The plants grow.\n

    "},{"location":"Ling/Semantics/formal_semantics/#disjunctive-syllogism","title":"Disjunctive syllogism","text":"

    two premises and a conclusion

    P: It either rains or its sunny.\nH: It rains.\nC: It is not sunny.\n

    "},{"location":"Ling/Semantics/formal_semantics/#three-types-of-reasoning","title":"Three types of reasoning","text":""},{"location":"Ling/Semantics/formal_semantics/#propositional-logic","title":"Propositional logic","text":""},{"location":"Ling/Semantics/formal_semantics/#conditional-material-implication","title":"conditional, material implication","text":""},{"location":"Ling/Semantics/formal_semantics/#biconditional","title":"biconditional","text":""},{"location":"Ling/Semantics/formal_semantics/#de-swarts-formalizations","title":"De Swarts formalizations","text":""},{"location":"Ling/Semantics/formal_semantics/#well-formed-formula","title":"Well-formed formula","text":""},{"location":"Ling/Semantics/formal_semantics/#propositional-practice","title":"Propositional practice","text":"John is happy. p John is not happy. ~p John is happy or sad. p or q exlusive John is happy, not sad. p and ~q If John has eaten, John is happy. p -> q If John has not eaten, John is not happy. ~p -> ~q John is hungry or thirsty. p or q inclusive. John left before you did. p John is not hungry or thirsty. ~(p or q inclusive) <-> ~p and ~q John is not hungry and thirsty. ~(p and q) <-> ~p or ~q inclusive If John did not laugh, then John cried. ~p \u2192 q \u2194 p or q If John laughed, then John also cried. p \u2192 q \u2194 ~p or q inclusive John did not laugh, or John cried. ~p or q \u2194 p \u2192 q John laughed, or John cried and beat on the table. p and (q or r) \u2194 (p and q) or (p and r) John is not happy, but rather sad. (scope of \u201cnot\u201d) ~p and q. * ~(p and q) John is not happy, or sad. ~(p and q) John is not happy, or John is sad. ~p or q John did not help us or hinder us. ~(p or q) \u2194 ~p and ~q John did not help us or John hinders us. ~p or q
    John is friendly or John is not friendly.\n
    p V_e ~p T T F F T T
    John is friendly and John is not friendly.\n
    p and ~p T F F F F T
    It is not the case that John is not friendly.\n
    ~ ~ p T F T F T F

    contingent.

    It is not the case that John is hungry or John is not grumpy.\n
    ~( p or ~q F T T T F T T F F F T T T F F F"},{"location":"Ling/Semantics/formal_semantics/#material-implication","title":"Material implication \u2192","text":"

    converse: q\u2192p. affirming the consequent

    inverse: ~p\u2192~q. denying the antecedent

    contrapositive: ~q\u2192~p. modus tollens

    given p\u2192q.

    Although it was extremely cold, Sally did not stay indoors.

    ~q->p\np and ~q\n

    We get a holiday, or we protest.

    ~p->q\np or q\n

    Jone said that Jane helped him.

    p\np and q\n

    John\u2019s sister burped

    p: John has a sister. presupposition, assume it true\nq: This sister burped.\np\np and q\n

    John arrives before Jane left

    p before q\n

    John did not arrive before Jane left.

    ~p before q\np ~before q\n
    "},{"location":"Ling/Semantics/formal_semantics/#predication-and-quantification","title":"Predication and Quantification","text":"

    universal quantifier: every, each, all, any, only

    existential quantifier: a, some, there is \\(\\exist\\), for all \\(\\forall\\)

    predicate, argument

    John may like Sally.

    predicate: may like\n

    John has a crush on Sally.

    predicate: has a crush on\n

    Frank is the father of Susan.

    predicate: is the father of\n

    Frank is Susan\u2019s father.

    predicate: is...'s father\n

    Adjunct: if, probably, means, of course, early

    Valent, empty place holder: formal subject

    "},{"location":"Ling/Semantics/formal_semantics/#collective-and-distributive-readings","title":"Collective and distributive readings","text":"
    Jogn and Molly ate a pizza.\np: one pizza, ate one together.   distributive\np and q: two pizzas, each ate a pizza.  collective\n
    Cinthia and Sam have saved 100 dollars.\np: together 100 dollars\np and q: 200 dollars\n

    Content verb is a predicate, but functional verbs are not

    John obviously spoke with Jane because he had to.

    predicate: spoke with\nargument: John, Jane\nadjuncts: obviously, because he had to.\n

    If I get a chance, I will probably try to avoid the mistake.

    predicate: will try to \nargument: I, avoid the mistake\nadjuncts: If I get a chance, probably\n

    John performed Jill\u2019s operation first.

    \n

    The person who talk loudly is Jim\u2019s father.

    predicate: is someone's father\nargument: the person who talk loudly, Jim\nadjunct: \n

    the talking loudly person

    predicate: talking\nargument: person\nadjunct: loudly\n

    predicate: the nodes that are connected in SUD parsing tree

    universal dependency (UD)

    syntactic-universal dependency (SUD)

    graph TD\n  Primitive_units_within_propositions --> Predicates\n  Primitive_units_within_propositions --> Arguments\n    Arguments --> individuals_Terms\n    individuals_Terms --> constants\n    individuals_Terms --> variables\n

    lexical predicates vs. syntactic predicates

    individual constants vs. individual variables

    e.g. We think John likes Susan.

    T(w, Lj,s)\n

    Types of predicates:

    e.g. Monica hid her bicycle.

    x hide y: Hx,y\nMonica: m\nher bicycle: b\nHm,b\n

    e.g. Monica did not hide her bicycle.

    x hide y: Hx,y\nMonica: m\nher bicycle: b\n~Hm,b\n

    e.g. Monica laughed and cried.

    Monica: m\nlaugh: L()\ncry: C()\nLm and Cm\n

    e.g. Jim sent Monica his dog.

    Sj,m,d\n

    e.g. William did not help or hinder Mike.

    ~ (H1w,m or H2w,m) \n

    e.g. Jennifer promise to help.

    P(j, Hj)\n

    e.g. Jennifer did not promise to help.

    ~P(j,Hj)\n

    e.g. Jennifer promise to not laugh.

    P(j,~Lj)\n

    e.g. Mike claimed he wanted to help.

    C(m, W(m/x, Hm/x))\n\nm: Mike\nx: maybe some other\n

    e.g. John asked Mandy to stop laughing.

    A(j, m, S(m, Lm))\n

    e.g. John and Larry called Molly.

    Cj,m and Cl,m\nC(j and l, m)\n

    e.g. Molly did not call John and Larry.

    ~C(m, j) and ~C(m, l)\n~C(m, j and l)\n~C(m, j) or ~C(m, l)\n

    entailment: (universal instantiation)

    every dog barks \u2192 if something is a dog, then it is a dog.

    Universal quantification

    \\(\\forall\\)x (Dx \u2192 Bx)

    D = (d1, d2, d3,\u2026)

    \\(\\forall\\)x (Dx \u2192 Bx)= (Bd1 and Bd2 and Bd3, \u2026.)

    Existential quantification

    \\(\\exist\\)x (Dx and Bx)

    D = (d1, d2, d3,\u2026)

    \\(\\exist\\)x (Dx and Bx) = (Bd1 or Bd2 or Bd3, \u2026.)

    e.g. Every cat barfed.

    \\forall x (Cx -> Bx)\n

    e.g. The cat barfed.

    Bc\n

    e.g. Bill fed cat.

    \\forall x (Cx -> Fb,x)\n

    e.g. Some dog barked at Fred.

    \\exist x (Dx and Bx,f)\n

    e.g. Fred scolded some dog.

    \\exist x (Dx and Sf,x)\n

    e.g. Fred and Susan avoid some dog.

    \\exist x (Dx and Af,x and As,x)\n\\exits x (Dx and Af,x) and \\exist y (Dy and Af,s)\n

    e.g. No dog barks.

    \\forall x (Dx -> ~Bx)\n~\\exist x (Dx and Bx)\n

    e.g. Bill fed no dog.

    ~\\exist x (Dx and Fb,x)\n\\forall x (Dx -> ~Fb,x)\n

    e.g. No dog barked at Susan or chased Fred.

    ~\\exist x ((Dx and (Bx,s or Cx,f))\n\\forall x ((Dx -> (~Bx,s and ~Cx,f))\n\\forall x ((Dx -> ~(Bx,s or Cx,f))\n

    Scope ambiguity

    e.g. Some boy kissed every girl.

    \\exist x \\forall y (Bx and (Gy -> Kx,y)) = \\exist x(Bx and \\forall y (Gy -> Kx,y))\n\\forall y \\exist x (Gy -> (Bx and Kx,y)) = \\forall y (Gy -> \\exist x (Bx and Kx,y))\n

    Every boy kissed some girl.

    \\forall x (Bx -> \\exist (Gy and Kxy)) <=> \\forall x \\exist y (Gy and Kxy)\n

    Every students did not laugh.

    \\forall x (Sx -> ~Lx) <=> ! \\exist x (Sx and Lx)\n~\\forall x (Sx -> Lx) <=> \\exist (Sx and ~Lx)\n

    Not every student laughs.

    ~\\forall x (Sx -> Lx) <=> \\exist (Sx and ~Lx)\n
    graph TD\n  laughed --> student\n    student --> /every\n    /every --> not\n

    each studnet did not laugh.

    \\forall x (Sx -> ~Lx) \n~\\forall x (Sx -> Lx)\n
    "},{"location":"Ling/Semantics/formal_semantics/#polarity-item","title":"Polarity item","text":"

    any: negative polarity item

    John did not pass every exam.

    ~\\forall x (Ex -> Pj,x) <=> \\exist x (Ex and Pj,x)\n\\forall x (Ex -> ~Pj,x)\n

    John did not pass any exam.

    \\forall x (Ex -> ~Pj,x)\n

    e.g.

    Jack saw a rat.

    \\exist x (Rx and Sj,x) \n

    Jack is a rat.

    the quantifier is in the predicate but not the argument. here rat is a constant.

    Rj\n

    Jack knows no genius.

    use not exist to render \u201cno\u201d

    ~\\exist x (Gx and Kj,x)  <=> \\forall x (Gx -> ~Kj,x)\n

    Jack is no genius. <=> Jack is not a genius.

    ~Gj\n

    These problems are difficult.

    Dp\n

    These problems are difficult ones.

    Dp\n

    All the problems are difficult.

    \\forall x (Px -> Dx)\n

    These problems are all the problems.

    Ap\n

    These problems are not all the problems.

    ~Ap\n

    Jack is our plumber.

    Pj\n

    Our plumer is Jack. (has presupposition)

    Pj\n

    Everything counts.

    whether thing includes animate and inanimate.

    \\forall x (Cx)\n\\forall x (Tx -> Cx)\n

    Everybody counts.

    *\\forall x (Cx)\n\\forall x (Px -> Cx)\n

    predicates

    common nouns

    content verbs are the core of syntactic predicates

    adjectives are most always the core of syntactic predicates.

    e.g. Mike\u2019s wife thinks Mikes if lazy.

    predicates inside individual constants are presuppositional

    A thin man was present.

    predicates inside \u2026 .are propositional

    e.g. Every barking is harmless

    has true or false impact on the truth

    \\forall x ((Dx and Bx) -> Hx)\n

    this proposition has to show up in the predicate

    The barking dog is harmless.

    Hd\n

    the presupposition does not show in the predicate

    John avoids every dog he sees.

    \\forall x ((Dx and Sj,x) -> Aj,x)\n

    John said every dog barks.

    intensional

    Sj\nS(j,\\forall x (Dx -> Bx)) \nSj,I  ; I for intensional argument predicate\n
    "},{"location":"Ling/Semantics/formal_semantics/#adjunct-predicates","title":"Adjunct predicates","text":"

    Jane probably teased Sam last night

    John arrived drunk.

    Jim burped twice.

    twice: propositional or presuppositional

    Susan did not cheat yesterday.

    Mary stayed because John stayed.

    Mary did not stay because John stayed

    "},{"location":"Ling/Semantics/formal_semantics/#restricted-quantification","title":"restricted quantification","text":"

    Every boy was hungry

    \\forall x: Bx(Hx)\n

    Some boy was hungry.

    \\exist x: Bx(Hx)\n

    Every cat barfed.

    \\forall x: Cx(Bx)\n

    Bill fed every cat.

    \\forall x (Cx, Fb,x)\n\\forall x: Cx(Fb,x)\n

    Some dog barked at Fred.

    \\exist x (Dx, Bx,f)\n\\exist x: Dx(Bx,f)\n

    Fred and Susan avoid some dog.

    \\exist x(Dx and (Af,x and As,x))\n\\exist x: Dx (Af,x and Af,x)\n

    No dog barks.

    ~\\exist x (Dx and Bx) <=> ~\\exist x: Dx (Bx)\n
    "},{"location":"Ling/Semantics/formal_semantics/#formal-predicate-semantics","title":"Formal Predicate Semantics","text":"
    graph TD\n  Semantic_Rules --> Model\n  Semantic_Rules --> Valuation_Function\n    Model --> Universe_of_Discourse\n    Model --> Interpretation_Function\n    Universe_of_Discourse --> entities\n
    "},{"location":"Ling/Semantics/formal_semantics/#relation","title":"Relation","text":""},{"location":"Ling/Syntax/","title":"Syntax","text":"

    \u4e0d\u597d\u8bf4 \u65bd\u5de5\u4e2d

    \u76ee\u5f55

    "},{"location":"Ling/Syntax/conv_gen/","title":"\u8f6c\u6362\u751f\u6210\u53e5\u6cd5","text":""},{"location":"Ling/Syntax/conv_gen/#x-bar-theory","title":"X-bar theory","text":"

    \u751f\u6210\u53e5\u6cd5\u548c\u6210\u5206\u53e5\u6cd5\u4e4b\u95f4\u7684\u533a\u522b

    [The big book of poems with the blue cover] is on the table.\n

    \u6210\u5206\u53e5\u6cd5\u505a\u51fa\u6765\uff0csubject\u662f\u4e00\u4e2a\u9ad8\u5ea6\u4e3a1\u7684\u6811

    \u53e5\u5b50\u4e4b\u95f4\u7684\u6210\u5206\u901a\u8fc7\u4e24\u4e24\u7ec4\u5408\u8fd8\u80fd\u505a\u51fa\u65b0\u7684\u9ad8\u5ea6

    one-replacement

    \u7528one-replacement\u63a2\u6d4b\u9650\u5b9a\u8bcd\u4e4b\u95f4\u7684\u8ddd\u79bb\u5173\u7cfb\uff08\u52a8\u8bcd\u7528did so/did too\uff09

    Mika loved the policeman intensively.\nSusan did so half-heartedly.\n*Susan did so the baker.\n
    graph TD\n  NP --> D\n    D --> the\n    NP --> N1\n    N1 --> AdjP\n    AdjP --> big\n    N1 --> N2\n    N2 --> N3\n    N2 --> PP1\n    N3 --> N\n    N --> book\n    N3 --> PP2\n    PP2 --> of_poems\n    PP1 --> with_the_blue_cover\n

    \u52a0\u5165\u4e86bar level\uff0cbook\u4e0eof poems\u6784\u6210\u4e00\u4e2a\u4e2d\u95f4\u6295\u5c04X-bar\uff0c\u6784\u6210\u4e00\u4e2aconstituent\u3002\u4f7f\u5f97\u6bcf\u4e2a\u53e5\u5b50\u90fd\u80fd\u88ab\u753b\u6210\u4e00\u4e2a\u4e8c\u53c9\u6811\u5f62\u5f0f

    \u751f\u6210\u53e5\u6cd5\u5b66\u6d3e\uff1a\u4e0a\u4e16\u7eaa\u4e94\u5341\u5e74\u4ee3\u3002classical theory and standard theory\u30021988\u5e74\u63d0\u51fa\u4e86government and binding theory\u3002lexicon, D-S, S-S, PF, LF

    "},{"location":"Ling/Syntax/conv_gen/#n-bar","title":"N-bar","text":"

    \u539f\u672cNP\u6839\u636e\u4e00\u7cfb\u5217\u89c4\u5219\u4e0d\u662f\u4e8c\u53c9\u6811\uff0c\u6bd4\u5982N\u2192

    N-bar theory\u8ba4\u4e3a\u53ef\u4ee5\u90fd\u53d8\u6210\u4e8c\u53c9\u6811

    \u89c4\u5219\u6bd4\u5982

    NP -> Det N'\nN' -> AP N'\nN' -> N PP\n

    \u7b2c\u4e00\u6761\u79f0\u4e3a\u4e00\u4e2a\u6700\u5927\u6295\u5c04

    "},{"location":"Ling/Syntax/conv_gen/#v-bar","title":"V-bar","text":"
    VP -> V'   // \u9884\u7559\u4e00\u4e2a\u4f4d\u7f6e\u7ed9\u6f5c\u5728\u7684specifier\uff0c\u5373\u4f7f\u6ca1\u6709\nV' -> AdvP V' | V' PP | V' AdvP\nV' -> V(NP)\n
    "},{"location":"Ling/Syntax/conv_gen/#abj-bar","title":"Abj-bar","text":"
    AdjP -> Adj'\nAdj' -> (AdvP) Adj' | Adj' (AdvP)\nAdj' -> Adj(PP)\n
    "},{"location":"Ling/Syntax/conv_gen/#p-bar","title":"P-bar","text":"
    PP -> P'\nP' -> P'(PP) | (AdvP)P'\nP' -> P(NP)\n

    \u4e2d\u5fc3\u8bcdX \u2192 \u4e2d\u95f4\u6295\u5c04X\u2019 \u2192 \u6700\u5927\u6295\u5c04XP\u3002\u4e0d\u80fd\u76f4\u63a5\u5230XP\uff0c\u4e00\u5b9a\u8981\u6709\u4e2d\u95f4\u6295\u5c04

    "},{"location":"Ling/Syntax/conv_gen/#parameter-of-word-orders","title":"Parameter of Word Orders \u7ba1\u7ea6\u8bba\uff0c \u539f\u5219\u4e0e\u53c2\u6570\u7406\u8bba","text":"

    \u6839\u636eX-bar\u7406\u8bba\uff0c\u53ef\u4ee5\u5bf9\u4e00\u4e9b\u8bed\u8a00\u7684\u4e0d\u540c\u8bed\u5e8f\uff08\u5982SVO\uff0cSOV\u7b49\uff09\u7ed9\u51fa\u8bed\u6cd5\u53c2\u6570\u5316\u89e3\u91ca

    specifier\u548ccomplement\u53ef\u4ee5\u51fa\u73b0\u5728\u5176sister\u7684\u4e24\u4fa7\uff0c\u8fd9\u79cd\u6295\u5c04\u7684\u5de6\u53f3\u533a\u522b\u88ab\u79f0\u4e3aparameter setting

    "},{"location":"Ling/Syntax/conv_gen/#_2","title":"\u753b\u6811\u7684","text":""},{"location":"Ling/Syntax/conv_gen/#head-movement","title":"Head Movement \u4e2d\u5fc3\u8bed\u79fb\u4f4d","text":"

    head movement: movement from a head to another head position

    \u53e5\u5b50\u53ef\u4ee5\u53d1\u751fmovement\u7684\u6807\u5fd7

    "},{"location":"Ling/Syntax/conv_gen/#-reading","title":"- \u4e00\u4e2a\u53e5\u6cd5\u7ed3\u6784\u5177\u6709\u4e24\u79cdreading","text":"

    shortest movement

    shortest: let the path of a movement be the set of nodes that dominate the original position of the moved item, and do not dominate the leading site.

    "},{"location":"Ling/Syntax/ud_sud/","title":"\u4f9d\u5b58\u53e5\u6cd5 UD & SUD","text":"

    In full spelling, Universal Dependency gammar and Surface Syntax Universal Dependency grammar.

    "},{"location":"Ling/Syntax/ud_sud/#tools","title":"Tools","text":"

    AllenNLP Demo CoreNLP Tool

    "},{"location":"Ling/Syntax/ud_sud/#concepts","title":"Concepts","text":""},{"location":"Ling/Syntax/ud_sud/#ud","title":"UD","text":"

    Dependency grammar\u00a0(DG) is an approach to the study of the syntax and grammar of natural languages that is quite distinct from\u00a0phrase structure grammar\u00a0(PSG), which is also known as\u00a0constituency grammar. The modern history of DG begins with\u00a0Lucien Tesni\u00e8re's major oeuvre (1959), whereas the modern history of PSG begins arguably with\u00a0Noam Chomsky's first prominent work (1957).

    DG views linguistic structures in terms of a\u00a0one-to-one mapping\u00a0of atomic linguistic units to the nodes in structure, whereas PSG assumes a\u00a0one-to-one-or-more mapping. The distinction is clearly visible when one compares the tree structures. The next trees are taken from the\u00a0Wikipedia article on DG:

    "},{"location":"Ling/Syntax/ud_sud/#sud","title":"SUD","text":"

    [Surface Syntactic Universal Dependencies (SUD) | SUD](https://surfacesyntacticud.github.io/ SUD is an annotation scheme for syntactic dependency treebanks, and has a nearly perfect degree of two-way convertibility with the Universal Dependencies scheme (UD). Contrary to UD, it is based on syntactic criteria (favoring functional heads) and the relations are defined on distributional and functional bases.

    "},{"location":"Ling/Syntax/ud_sud/#general-principles-of-sud","title":"General principles of SUD","text":""},{"location":"Ling/Syntax/ud_sud/#specific-sud-relations","title":"Specific SUD relations","text":"

    SUD has 4 specific syntactic relations and a few extended relations: - subj - udep - comp - comp:aux - comp:cleft - comp:obj - comp:obl - comp:pred - mod

    "},{"location":"Ling/Syntax/uni_gram/","title":"\u666e\u904d\u8bed\u6cd5 Universal Grammar","text":""},{"location":"Ling/Syntax/uni_gram/#introduction","title":"Introduction","text":"

    Syntax\u7684\u610f\u4e49\u5728\u4e8e\u627e\u5230\u4e00\u79cdgrammar\uff0c\u80fd\u591f\u751f\u6210\u67d0\u79cd\u8bed\u8a00\u4e2d\u7684\u6240\u6709\u53e5\u5b50\u3002

    Grammar\u662f\u57fa\u4e8e\u89c4\u5219\u7684\uff0c\u4e0d\u80fd\u7528high order of statistical approximation to English\u6765\u66ff\u4ee3\u3002

    "},{"location":"Ling/Syntax/uni_gram/#basic-linguistics","title":"Basic Linguistics","text":"

    DFA & Regular language

    \u8c13\u8bcd\u903b\u8f91\u3002\u4f46\u6211\u4eec\u4e0d\u5173\u5fc3\u5176\u4e2d\u7684\u8bed\u4e49\uff0c\u53ea\u9700\u5173\u5fc3CFG\u7684\u5f62\u5f0f\u3002

    "},{"location":"Ling/Syntax/uni_gram/#phrase-structure-limitation","title":"Phrase Structure & Limitation","text":"

    \u81ea\u7136\u8bed\u8a00\u7684CFG\uff08\u4ee5\u82f1\u8bed\u4e3a\u4f8b\uff09\u6784\u6210\u8bed\u6cd5\u7684\u57fa\u7840\u90e8\u5206\u3002

    \u4f46\u8fd9\u6837\u63cf\u8ff0\u81ea\u7136\u8bed\u8a00\u7684\u5de5\u5177\u8fd8\u662f\u4e0d\u80fd\u751f\u6210\u6240\u6709\u5408\u7406\u7684\u53e5\u5b50\uff0c\u6545\u5f15\u5165a more powerful model combining phrase structure and grammatical transformation\uff0c\u5f97\u5230\u8f6c\u6362-\u751f\u6210\u6587\u6cd5\u3002

    "},{"location":"Ling/Syntax/uni_gram/#on-the-goals-of-linguistic-theory","title":"On the Goals of Linguistic Theory","text":"

    \u4ece\u4e00\u822c\u8bed\u6cd5\u4e2d\u5f52\u7eb3\u51faUG\u7406\u8bba\uff0c\u5bf9UG\u7684\u671f\u671b\u7531\u5f3a\u81f3\u5f31\u4e3a\uff1a

    "},{"location":"Ling/Syntax/uni_gram/#the-explanatory-power-of-linguistic-theory","title":"The Explanatory Power of Linguistic Theory","text":"

    \u5e94\u8be5\u7814\u7a76competence\uff0c\u800c\u975eperformance

    "},{"location":"Other/","title":"\u7d22\u5f15","text":"

    TODO\uff08\u8fd8\u6ca1\u5199\uff09

    "},{"location":"Other/24fall/","title":"\u3010TODO\u3011\u6211\u768424fall\u7533\u8bf7\u8bb0\u5f55","text":"

    \u672c\u9875\u9762\u4f1a\u5728\u621112\u6708\u6295\u9012\u5b8c\u7b2c\u4e00\u6279\u7533\u8bf7\u540e\u66f4\u65b0\u4e00\u4e2a\u7533\u8bf7\u8bb0\u5f55\u3002

    \u4e3b\u8981\u76ee\u7684\u6709\u5206\u4eab\u6211\u7684\u7ecf\u9a8c\u5fc3\u5f97\u548c\u52aa\u529b\u83b7\u5f97\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u81f4\u529b\u4e8e\u7ef4\u62a4CS\u548clinguistics\u7533\u8bf7\u8d44\u6599\u5f00\u6e90\u7684\u751f\u6001\u3002

    \u9884\u8ba1\u66f4\u65b0\u5c0f\u6807\u9898\u6709\uff1a

    "},{"location":"Other/24fall/#_1","title":"\u7533\u8bf7\u683c\u8a00","text":""},{"location":"Other/24fall/#ms","title":"ms\u9009\u6821","text":"

    \u6211\u52a0\u5fc3\u9009\u5355\u4e3b\u8981\u770b\u7684\u98de\u8dc3+opencsapp\uff0c\u7136\u540e\u4ece\u91cc\u9762\u5220\u53bb\u6240\u6709\u7533\u5230\u4e5f\u4e0d\u60f3\u53bb\u7684

    \u6211\u4e3a\u4ec0\u4e48\u6ca1\u5fcd\u4f4f\u7533\u4e86\u8fd9\u4e48\u591a\uff1a\u56e0\u4e3a\u89c9\u5f97\u7533\u8bf7\u8d39\u4e0e\u5982\u679c\u7533\u8bf7\u5931\u8d25\u53ef\u80fdgap\u4e00\u5e74\u5e26\u6765\u7684\u635f\u5931\uff0c\u53ef\u80fd\u524d\u8005\u8f83\u5c0f

    "},{"location":"Other/24fall/#phd","title":"Ph.D. \u9009\u5bfc","text":""},{"location":"Other/24fall/#_2","title":"\u8bed\u8a00\u6210\u7ee9","text":"

    CMU \u5fc5\u987b\u9001\u5206

    Umich Meng ECE\u9700\u8981GRE\uff0c\u5fc5\u987b\u9001\u5206 The University of Michigan school code is 1839.

    Uchi MPCS\u9700\u8981GRE\u7684q>85%\uff08\u597d\u50cf\u662f\u8fd9\u4e2a\u6570\uff09\uff0cv\u6ca1\u6709\u8981\u6c42 Please have an official TOEFL or IELTS score sent directly to the University of Chicago. The University's institution code for TOEFL/GRE reporting is 1832

    UW CLMS \u5fc5\u987b\u8981\u5b98\u65b9\u9001\u5206 TOEFL/GRE ETS report code: 4854

    USC: 4852

    UCSD\uff1a4836

    "},{"location":"Other/24fall/#_3","title":"\u63a8\u8350\u4fe1","text":"

    \u5927\u7ea612.2\u53f7\u770b\u5230phd\u7533\u8bf7\u7fa4\u91cc\u8bf4\u7684\uff0c\u5176\u5b9e\u4e0d\u8981\u627e3\u4e2a\u63a8\u8350\u4eba\u5c31\u7ed3\u675f\uff0c\u6700\u597d\u63d0\u524d\u627e4\u52305\u4e2a\uff0c\u56e0\u4e3a\u591a\u4ea4\u6ca1\u6709\u5173\u7cfb\uff0c\u5927\u90e8\u5206\u5b66\u6821\u90fd\u6709\u6dfb\u52a0\u591a\u4e2a\u63a8\u8350\u4eba\u7684\u9009\u9879\uff08\u6211\u7684\u9009\u6821\u91cc\u53ea\u6709loo\u548cumich\u4e0a\u9650\u4e09\u4e2a\uff09\uff0c\u4f46\u662f\u7ecf\u5e38\u6709\u63a8\u8350\u4eba\u5fd9\u5fd8\u4e86\u7684\u60c5\u51b5\u3002\u518d\u95ee\u53e6\u4e00\u4e2a\u7fa4\uff0c\u5f97\u5982\u679c\u662fphd\uff0c\u4e0d\u4f1a\u56e0\u4e3a\u6709\u4e00\u4e2a\u63a8\u8350\u4eba\u5fd8\u4e86\u4ea4\u62d2\u4f60\uff0c\u4f46\u662f\u6709\u7684ms\u542c\u8bf4\u4e09\u5c01\u4ea4\u4e0d\u9f50\u5c31\u63d0\u4ea4\u4e0d\u4e86\uff08\u6211\u7684\u6682\u65f6\u6ca1\u9047\u5230\uff09\uff0c\u6216\u8005\u53ef\u80fd\u56e0\u6b64\u65e0\u58f0\u62d2\u4f60\uff0c\u6240\u4ee5\u8fd8\u662f\u63d0\u524d\u627e4\u4e2a\u4ee5\u4e0a\u3002

    \u542c\u8bf4USC MSCS\u5b8c\u5168\u4e0d\u770b\u63a8\u8350\u4fe1\uff0c\u56e0\u4e3a\u4e5f\u4e0d\u6562\u591a\u8981\uff0c\u6211\u5c31\u4ea4\u4e86\u4e00\u5c01\uff0c\u8d4c\u3002\u3002\u3002\u3002

    Uchi\u53ef\u4ee5\u5171\u4eab\u63a8\u8350\u4fe1

    Rice\u53ef\u4ee5\u5171\u4eab\u63a8\u8350\u4fe1

    CMU\u540c\u4e00\u4e2a\u7533\u8bf7\u7cfb\u7edf\u4e4b\u95f4\u53ef\u4ee5\u5171\u4eab\u63a8\u8350\u4fe1\uff0c\u6bd4\u5982MSCS\u548cPhD\u5171\u4eab\uff0cMLT\u90a3\u4e00\u5927\u4e32\u7684AI\u9879\u76ee\u5171\u4eab\u3002

    UCSD\u7684ms\u548cphd\u4e4b\u95f4\u4e0d\u80fd\u5171\u4eab\u63a8\u8350\u4fe1\uff0c\u4f46\u662f\u636e\u8bf4cs ce master\u4e4b\u95f4\u662f\u4e92\u901a\u7684\uff0c\u8ddfgit\u4e0d\u4e92\u901a

    Umich\u76ee\u524d\u53ea\u77e5\u9053\u81f3\u5c11ms\u548cmeng\u4e4b\u95f4\u4e0d\u80fd\u5171\u4eab\u63a8\u8350\u4fe1\u3002\u586b\u9519\u4e86\u53ef\u4ee5\u66f4\u6539\u63a8\u8350\u4eba\uff0c\u66f4\u6539\u540e\u65b0\u7684\u63a8\u8350\u4eba\u4f1a\u6536\u5230\u90ae\u4ef6\uff0c\u53ea\u662f\u5728\u4f60\u7684\u7533\u8bf7\u91cc\u8fd8\u662f\u663e\u793a\u539f\u6765\u63a8\u8350\u4eba\u3002

    Waterloo\u7684\u63a8\u8350\u4fe1\u5728\u7b2c\u4e00\u6b65\u63d0\u4ea4\u540e1-3\u5929\u5185\u53d1\u51fa\uff0c\u7533\u8bf7\u4eba\u4e0d\u53ef\u51b3\u5b9a\u3002\u6211\u7684\u63a8\u8350\u4eba\u6700\u5feb\u6536\u5230\u7684\u662f\u63d0\u4ea4\u540e1\u5929\u5de6\u53f3\u3002\u4e4b\u540e\u5728ddl\u524d14\u5929\u548c7\u5929\u8fd8\u4f1a\u5404\u81ea\u52a8\u53d1\u4e00\u6b21\u50ac\u4fe1

    \u7fa4\u91cc\u8bf4\u7684\uff1a\u8865\u5145\u4e00\u4e2a\u54e5\u5927cs ce ee\u4e5f\u662f\u5171\u7528\u3002\u5e94\u8be5\u662fms

    \u5df2\u77e5\u5927\u8305\u548c\u54e5\u5927\u67e5ip\u633a\u4e25\uff0c\u7fa4\u91cc\u6709\u540c\u5b66\u6536\u5230\u5b66\u6821\u90ae\u4ef6\u8bf4\u67e5\u5230\u4fe1\u662f\u81ea\u5df1\u53d1\u7684

    "},{"location":"Other/24fall/#_4","title":"\u5957\u74f7","text":"

    \u7f51\u4e0a\u8bf4\u5957\u5230\u74f7\u624d\u80fd\u7533\u3002\u7533\u8bf7\u8fc7\u7a0b\u4e2d\u5f97\u5230\u7684\u6d88\u606f\u662f\u5957\u74f7\u548c\u7533\u8bf7\u5e76\u4e0d\u5f3a\u76f8\u5173\uff0c\u6709\u6559\u6388\u5c31\u60f3\u7b49\u770b\u5230\u6c60\u5b50\u518d\u51b3\u5b9a\u7684\u60c5\u51b5\u3002

    \u7fa4\u91cc\u8bf423fall\u8fd8\u6709\u4eba\u628a\u5f3aprof\u5236\u7684\u5b66\u6821\u544a\u4e86\uff0c\u8bf4\u62ff\u4e0d\u51fa\u5177\u4f53\u7684\u62d2\u4eba\u539f\u56e0\uff0c\u6240\u4ee5\u4eca\u5e74\u5f88\u591a\u5b66\u6821\u6539committee\u5236\u4e86\uff08\u7fa4\u91cc\u6709\u4eba\u8bf4usc\u5c31\u662f\u8fd9\u6837\uff0c\u786e\u5b9e\u4eca\u5e74\u8eab\u8fb9\u4eba\u5957usc\u7684\u74f7\u4e00\u4e2a\u4e5f\u6ca1\u56de\u3002\u3002\uff09

    "},{"location":"Other/24fall/#college-specific","title":"College-specific\u7f51\u7533\u7684\u5751","text":"

    CMU\u5982\u679c\u76f4\u63a5\u641c\u7d22 MLT application \u51fa\u73b0\u7684\u4ee5\u4e0b\u9875\u9762\u53ca\u7533\u8bf7\u94fe\u63a5\u662f\u627e\u4e0d\u5230MLT\u9879\u76ee\u7684

    Application Management (cmu.edu) \u8fd9\u4e2a\u9875\u9762\u548c\u4ee5\u4e0b\u622a\u56fe\u662f\u6b63\u786e\u7684\uff0c\u540c\u7406mscv\u548cmsaii\u4ec0\u4e48\u7684\u9879\u76ee\u4e5f\u5728\u8fd9\u91cc\u7533\u8bf7\u3002

    CMU\u7684video essay\uff1a

    \u5728mscs\u7684\u7cfb\u7edf\u91cc\u662f\u63d0\u524d\u5f55\u597d\u4e86\u7136\u540e\u4e0a\u4f20\u5230youtube\u8fd9\u79cd\u7684\uff0c\u5728\u7ec6\u5206\u7684\u90a3\u51e0\u4e2aai\u9879\u76ee\u91cc\u662f\u96503\u6b21\u673a\u4f1a\uff0c\u6bcf\u6b21\u968f\u673a\u95ee\u9898\uff0c\u9650\u65f6\u51c6\u5907\uff0c\u9650\u65f6\u8bf4\u3002

    \u6211\u770b\u5230\u7684\u7f51\u4e0a\u7684\u5e16\u5b50\u8bf4\u597d\u50cfmiis ini ece\uff08\u8bb0\u4e0d\u4f4f\u8fd9\u51e0\u4e2a\u9879\u76ee\u540d\u5b57\uff0c\u603b\u4e4b\u7c7b\u4f3c\uff09\u662f30s\u51c6\u5907\uff0c180s\u8bf4\uff0c\u95ee\u7684\u95ee\u9898\u5927\u7c7b\u6709\uff1a\u4f60\u961f\u53cb\u600e\u4e48\u8bc4\u4ef7\u4f60\uff0c\u4f60\u6536\u5230\u7684\u961f\u53cb\u7684\u4e00\u6761\u8d1f\u9762\u8bc4\u4ef7\u662f\uff0c\u4f60\u600e\u4e48\u9886\u5bfcproject\uff0c\u4e00\u4e2a\u6210\u529f\u7684project\u5bf9\u4f60\u6765\u8bf4\u662f\u600e\u6837\u7684\uff0c\u4f60\u559c\u6b22\u4ec0\u4e48\u6c9f\u901a\u6a21\u5f0f\uff0c\u5bf9\u4f60\u6765\u8bf4\u4ec0\u4e48\u662f\u5f88\u96be\u505a\u7684\u51b3\u5b9a\uff0c\u4f60\u9047\u5230\u632b\u6298\u4e86\u4f1a\u600e\u4e48\u6837...\u8fd9\u79cd\u5f88\u8ddfcourse project\u548c\u5408\u4f5c\u6709\u5173\u7684\u3002

    \u4f46\u662f\u6211\u5728mlt\u91cc\u6253\u5f00\u9047\u5230\u7684\u662f10s\u51c6\u5907\uff0c210s\u8bf4\uff0c\u9047\u5230\u7684\u4e24\u4e2a\u95ee\u9898\u4f9b\u53c2\u8003: - \u8bb2\u8bb2\u4e3a\u4ec0\u4e48\u9009\u6211\u4eec\u9879\u76ee - \u4f60\u7684\u7814\u7a76\u5174\u8da3\u90fd\u6709\u4ec0\u4e48 \u8fd9\u6837\u5f88\u7814\u7a76\u5bfc\u5411\u7684\u95ee\u9898\uff0c\u611f\u89c9\u719f\u8bb0sop\u5c31\u80fd\u7b54

    UWaterloo \u7684\u7533\u8bf7\u5206\u4e3a\u4e24\u4e2a\u9636\u6bb5\uff0c\u7b2c\u4e00\u4e2a\u9636\u6bb5\u8d76\u7d27\u4ea4\u4e86\u624d\u80fd\u5728\u7b2c\u4e8c\u4e2a\u9636\u6bb5\u4e0a\u4f20cv \u6587\u4e66 \u8bed\u8a00\u6210\u7ee9\u7b49\u4e1c\u897f\uff0c\u7b2c\u4e8c\u9636\u6bb5\u7684\u94fe\u63a5\u4f1a\u5728\u7b2c\u4e00\u9636\u6bb5\u540e2-4\u5929\u6536\u5230\u3002\u7b2c\u4e00\u4e2a\u9636\u6bb5\u4e00\u5b9a\u4e00\u5b9a\u8981\u6bd412.1\u63d0\u524d\u81f3\u5c11\u56db\u4e94\u5929\u4ea4

    Umich\u7684\u7cfb\u7edf\u4e00\u5f00\u59cb\u56db\u4e94\u4e2a\u9875\u9762\u8981\u987a\u5e8f\u586b\u5b8c\uff0c\u540e\u9762\u7684\u9875\u9762\u624d\u80fd\u8df3\u7740\u586b

    "},{"location":"Other/24fall/#_5","title":"\u6587\u4e66","text":"

    CV instruction from JHU Upload a copy of your resume or curriculum vitae (CV). This document should outline clearly and briefly the following: Employment held (include title of jobs and start/end dates) Research activities Academic honors, including fellowships you have been awarded Volunteer or community service Extracurricular activities Honorary societies, awards for service or leadership you have received Publications

    \u5176\u5b9e\u6211\u4e2a\u4eba\u8ba4\u4e3a\u5728\u5ba1\u6587\u4e66\u65f6\u6bcf\u4efd\u6587\u4e665-10\u5206\u949f\uff0c\u53ef\u80fd\u6240\u6709\u4eba\u80fd\u4e00\u773c\u770b\u5230\u7684\u662f 1\uff09\u5c0f\u6807\u9898 2\uff09\u52a0\u7c97\u7684\u5173\u952e\u8bcd\u3002\u8bb2\u4e00\u4e2a\u4f8b\u5b50\u662f\u6211\u4e0a\u6b21\u53c2\u52a0\u4e00\u95e8\u8bfe\u7684group tutorial\u65f6\uff0c\u5f53\u65f6\u5c0f\u7ec4\u6210\u5458\u5408\u5199\u4e86\u4e00\u4efdrp\uff0c\u5176\u4e2d\u6211\u5199\u7684\u662f\u6700\u6666\u6da9\u7684lit review\uff0c\u5373\u4e13\u4e1a\u672f\u8bed\u5bc6\u5ea6\u6700\u9ad8\u8fd8\u53e5\u5b50\u6700\u957f\uff0c\u4f46\u662f\u6211\u7ed9\u6bcf\u4e2a\u5206\u4e3b\u9898\u52a0\u4e86\u5c0f\u6807\u9898\uff0c\u5176\u5b83\u540c\u5b66\u5199\u7684\u90e8\u5206\u6ca1\u6709\u52a0\u3002\u8001\u5e08\u5728\u4e0e\u6211\u4eec\u8c08\u8bdd\u7684\u95f4\u9699\u7784\u4e86\u51e0\u773c\u6211\u4eec\u7684\u6587\u4ef6\uff0c\u77ed\u77ed\u7684\u65f6\u95f4\u91cc\u5c31\u53ea\u770b\u8fdb\u53bb\u4e86lit review\u7684\u5c0f\u6807\u9898\uff0c\u70b9\u8bc4\u4e86\u4e00\u4e0b\u3002\u6240\u4ee5\u6211\u89c9\u5f97\u505a\u6e05\u6670\u7684\u5206\u6bb5\u548c\u5c0f\u6807\u9898\u5f88\u91cd\u8981\uff08\u8fd9\u91cc\u771f\u7684\u6709\u70b9\u50cf\u8bbe\u8ba1\u56db\u539f\u5219\uff0c\u5bf9\u6bd4/\u805a\u5408\uff09\uff0c\u5c24\u5176\u662f\u65f6\u95f4\u7cbe\u529b\u4e0d\u591f\u65f6\uff0c\u5176\u4e2d\u7684\u7ec6\u8282\u5185\u5bb9\u8bf4\u4e0d\u5b9a\u4e0d\u7528\u62a0\u592a\u7ec6\u3002

    \u60f3\u7ed9\u70b9\u5199\u6587\u4e66\u65f6\u81ea\u5df1\u7528\u7684\u683c\u5f0f

    PS\u7ed3\u6784

    \u7b2c\u4e00\u6bb5\uff1a\u4e00\u4e9bhook\uff0c\u8bb2\u4e00\u70b9\u5bf9\u81ea\u5df1\u603b\u7ed3\u6027\u7684\u8bdd/tattoo\uff0c\u6216\u8005\u5e72\u8106\u76f4\u63a5\u4ece\u201c\u6211\u672c\u79d1\u5f00\u59cb\u5bf9xxx\u611f\u5174\u8da3\uff0c\u4e8e\u662f\u4e0a\u4e86\u5f88\u591a\u8bfe\u505a\u4e86\u5f88\u591a\u7814\u7a76\u201d\u5e73\u5b9e\u5730\u5f00\u59cb

    \u7b2c\u4e8c\u6bb5\uff1a\u4e00\u822c\u4e00\u4e24\u53e5\u8bdd\u5e26\u8fc7\u8bfe\u7a0b\uff0c\u6709\u7279\u522b\u51fa\u8272\u7684score\u6216coursework\u53ef\u4ee5\u5728\u8fd9\u91cc\u8bf4

    \u7b2c\u4e09\u5230\u4e94\uff08\u6216\u56db\uff09\u6bb5\uff1a\u6bcf\u6bb5\u4e00\u4e2a\u7ecf\u5386\uff0c\u53ef\u4ee5\u603b\u5206\u603b\u5199\uff0c\u627e\u5230\u4e00\u4e2a\u8fd9\u6bb5\u7ecf\u5386\u6700\u60f3\u7a81\u51fa\u7684\u7279\u70b9/\u54c1\u8d28\uff0c\u7136\u540e\u56f4\u7ed5\u7740\u8bf4

    \u7b2c\u516d\u6bb5\uff1amoving forward \u8bb2\u4ee5\u540e\u7684\u89c4\u5212

    \u7b2c\u4e03\u6bb5\uff1awhy [program name] and why [school name]

    \u7b2c\u516b\u4e5d\u6bb5\uff1a\u5982\u679c\u5b66\u6821\u6709\u7279\u6b8a\u7684diversity \u5956\u5b66\u91d1 gre clarification\u4e4b\u7c7b\u7684\u53ef\u4ee5\u5728\u8fd9\u91cc\u5199

    References

    SoP\u7ed3\u6784

    \u7b2c\u4e00\u6bb5\uff1axxx\u662f\u5f88\u91cd\u8981\u7684\uff0c\u6211\u4e00\u76f4\u5bf9xxx\u611f\u5174\u8da3\uff0c\u6211\u9009\u62e9\u5728x\u6821\u8bfbphd is naturally a continuation of my previous interests and experiences\u3002\u5177\u4f53\u800c\u8a00\uff0c\u6211\u7684\u7814\u7a76\u5174\u8da3\u4e3a\uff1a ( \u6b64\u5904\u53ef\u4ee5\u6709\u5c0f\u6807\u9898\u548c\u4e00\u53e5\u8bdd\u4ecb\u7ecd

    1. AAA aaaa
    2. BBB bbbb
    3. CCC cccc )

    \u7b2c\u4e8c\u6bb5\uff1aAAA \u7ed3\u6784\u5982\u4e0b

    \u5199\u5b8c\u4e00\u6574\u6bb5\u540e\u6700\u540e\u518d\u8d77\u5c0f\u6807\u9898\n\u4e00\u4e2a\u65b9\u5411\u6709\u591a\u91cd\u8981\u7b80\u4ecb\n\uff08+\u81ea\u5df1\u8fc7\u53bb\u8bfe\u7a0b\u9879\u76ee\uff0c\u5982\u679c\u771f\u7684\u5f88\u91cd\u8981\u7684\u8bdd\u5427\uff09\n+\u81ea\u5df1\u8fc7\u53bb\u7814\u7a76\n+\u81ea\u5df1\u8fc7\u53bb\u7814\u7a76\n+\u672a\u6765\u7814\u7a76\n+\u672a\u6765\u7814\u7a76\n+\u5e0c\u671bachieve\u7684\u76ee\u6807\n

    \u7b2c\u4e09\u6bb5\uff1aBBB \u540c\u4e0a

    \u7b2c\u56db\u6bb5\uff1aCCC \u540c\u4e0a\u4e0a

    \u7b2c\u4e94\u6bb5\uff1aMoving forward

    \u7b2c\u516d\u6bb5\uff1awhy [program name] and why [school name]

    \u73b0\u5728\u4e00\u4e2a\u5fc3\u5f97\u662f sop \u662f\u4e3a\u8be5\u9879\u76ee\u91cd\u65b0\u5199\u8fc7\u7684\u90a3\u4e9b\u80fd\u5f55\uff0c\u7528\u522b\u7684\u9879\u76ee\u7684 sop \u7b80\u5355\u62fc\u62fc\u6539\u6539\u4ea4\u4e0a\u53bb\u7684\u90fd\u7ed9\u62d2\u4e86\u3002\u3002

    References

    \u6211\u7684\u8fc7\u53bb\u7814\u7a76\u7ecf\u5386\u4e0e\u6211\u672a\u6765\u7684\u76ee\u6807\u65b9\u5411\u7279\u522b\u4e0d\u76f8\u4f3c\uff0c\u4f46\u662f\u611f\u89c9\u4f60\u5fc5\u987b\u53bb\u5bfb\u627e\u4e00\u4e2a\u5e73\u8861\u70b9\uff0c\u5bfb\u627e\u4e24\u4e09\u4e2a\u5c0f\u6807\u9898\u80fd\u628a\u4ed6\u4eec\u90fd\u6982\u62ec\u4f4f\u3002\u8fd9\u4e24\u4e09\u4e2a\u5c0f\u6807\u9898\u9996\u5148\u8981\u670d\u52a1\u4e8e\u672a\u6765\u65b9\u5411\uff0c\u7136\u540e\u56e0\u4e3a\u4f60\u8fc7\u53bb\u7684\u6bcf\u4e2a\u9879\u76ee\u4e0d\u53ef\u80fd\u53ea\u6709\u4e00\u4e2a\u5c5e\u6027/\u9886\u57df\uff0c\u53ef\u4ee5\u9009\u62e9\u80fd\u591f\u670d\u52a1\u4e8e\u672a\u6765\u65b9\u5411\u7684\u65b9\u9762\uff0c\u7528\u201c\u6211\u53d7\u5230\u4e86xx\u65b9\u9762\u7684\u542f\u53d1\u201d\u4e4b\u7c7b\u7684\u8bdd\u8fde\u63a5\u8d77\u6765\u3002

    UCSD \u7ed9\u7684\u53c2\u8003\u6307\u5bfc \u4e94\u4e2a\u95ee\u9898 - How did you become interested in this field? - What experiences have contributed toward your preparation for further study in this field? - What are your future goals? - What are your research interests? - How are you a \"match\" for the program to which you are applying? \u5176\u5b83\u8981\u6ce8\u610f\u7684 - Give examples of personal attributes or qualities that would help you complete graduate study successfully. - Describe your determination to achieve your goals, your initiative and ability to develop ideas, and your ability to work independently. - Describe background characteristics that may have placed you at an educational disadvantage (English language learner, family economic history, lack of educational opportunity, disability, etc.). - Leave the reader believing that you are prepared for advanced academic work and will be successful in graduate school.

    "},{"location":"Other/24fall/#_6","title":"\u81f4\u8c22","text":"

    \u6211\u7684\u63a8\u8350\u4eba

    \u7ed9\u8fc7\u6211\u91cd\u8981\u4eba\u751f\u5efa\u8bae\u7684

    \u8001\u5e08

    \u8ddf\u6211\u804a\u7533\u8bf7\u7684\u540c\u5b66

    \u63d0\u4f9b\u60c5\u611f\u652f\u6301\u7684\u540c\u5b66\u548cTA\u4eec

    "},{"location":"Other/24fall/#emotion-timeline","title":"\u9644\u5f55\uff1aEmotion \u7248 \u6211\u7684 Timeline\uff08\u5efa\u8bae\u522b\u770b \u770b\u6211\u4e22\u4eba\uff09","text":"

    \u6211\u7684\u7533\u8bf7\u771f\u7684\u597d\u6781\u9650\u554a\u554a\u554a\u554a\u554a\u554a\u554a

    "},{"location":"Other/howtocite/","title":"How to cite elegantly?","text":""},{"location":"Other/howtocite/#which-format","title":"Which format?","text":""},{"location":"Other/howtocite/#in-text-citation","title":"In-text citation","text":""},{"location":"Other/howtocite/#references","title":"References","text":""},{"location":"Other/howtocite/#tools","title":"Tools","text":"

    ... But the best tool is by hand

    "},{"location":"Other/nlp_phd/","title":"NLP Global PHD Equality Digest (\u642c\u8fd0)","text":"

    \u7ffb\u8bd1\u81eahttps://github.com/zhijing-jin/nlp-phd-global-equality

    "},{"location":"Other/nlp_phd/#_1","title":"\u9996\u63a8\u8d44\u6e90","text":"
    1. ACL \u5e74\u5ea6\u5bfc\u5e08\u5236\u9879\u76ee\uff08https://acl-mentorship.github.io\uff09
    2. NLP with Friends \uff08Welcome! - NLP with Friends\uff09
    "},{"location":"Other/nlp_phd/#phd","title":"\u7b2c\u4e00\u9636\u6bb5\uff1a\u600e\u6837\u7533\u8bf7PhD\uff1f","text":""},{"location":"Other/nlp_phd/#_2","title":"\u7533\u8bf7\u5efa\u8bae","text":""},{"location":"Other/nlp_phd/#phd_1","title":"\u6211\u5e94\u8be5\u8bfbPhD\u5417\uff1f","text":"
    1. (John Hewitt, PhD@Stanford)\u00a0Undergrad to PhD, or not - advice for undergrads interested in research\u00a0(2018). [Suggestions]

    2. \u7a77\u548c\u4e0d\u806a\u660e\u4e0d\u662f\u7406\u7531

    3. \u591a\u4e0e\u4eba\u4ea4\u6d41\uff0c\u542c\u7684\u5efa\u8bae\u8d8a\u591a\u8d8a\u597d
    4. \u89c2\u5bdf\u4e86\u89e3phd\u7684\u65e5\u5e38\u751f\u6d3b
    5. \u770b\u770b\u81ea\u5df1\u662f\u5426\u6709\u70ed\u60c5
    6. \u7533\u8bf7\u524d\u76848\u6708\u52309\u6708\u8981\u5199\u597d\u81ea\u5df1\u7684SOP\uff0c\u601d\u8003\u81ea\u5df1\u8981\u505a\u600e\u6837\u7684\u7814\u7a76\uff0c\u600e\u6837\u8ba9\u81ea\u5df1\u7684\u7814\u7a76\u6709\u5f71\u54cd\u529b\u3002\u57288\u6708\u8981\u8054\u7cfb\u597d\u63a8\u8350\u4fe1

    7. (Prof Jason Eisner@JHU)\u00a0Advice for Research Students\u00a0(last updated: 2021). [List of suggestions]

    "},{"location":"Other/nlp_phd/#_3","title":"\u7533\u8bf7\u8fc7\u7a0b\u662f\u4ec0\u4e48\u6837\u5b50\u7684\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u4e3a\u4ec0\u4e48\u73b0\u5728\u5c31\u8981\u7533\u8bf7\uff1a\uff081\uff09AI\u754c\u8d8a\u6765\u8d8a\u5377\uff0c\u66f4\u65b0\u975e\u5e38\u5feb\uff0c\u6240\u4ee5\u53d1\u66f4\u591apaper\u4e0d\u4e00\u5b9a\u8868\u793a\u7533\u8bf7\u66f4\u5360\u4f18\u52bf \uff082\uff09\u7855\u58eb\u7533\u8bf7phd\u6bd4\u672c\u79d1\u7533\u8bf7phd\u9700\u8981\u66f4\u591a\u6587\u7ae0 \uff083\uff09\u4e0d\u786e\u5b9a\u6027\u5f88\u5927\uff0c\u8ba1\u5212\u5f88\u53ef\u80fd\u6ca1\u6709\u53d8\u5316\u5feb \uff084\uff09\u9664\u975e\u4f60\u8ba4\u4e3a\u8bfb\u5b8c\u7855\u58eb\u540e\u81ea\u5df1\u80fd\u53d8\u5f97\u66f4\u5f3a
    3. \u7533\u8bf7\u54ea\u91cc\uff1a\uff081\uff09\u9996\u5148\u8981\u8003\u8651\u5b66\u6821\u548c\u5bfc\u5e08\uff0c\u6709\u5efa\u8bae\u79f0\u6700\u597d\u9009\u62e9\u67092\u4f4d\u4ee5\u4e0a\u76f8\u5173\u5bfc\u5e08\u7684\u5b66\u6821\u3002\uff082\uff09\u5730\u5740\u4e5f\u5f88\u91cd\u8981\uff0c\u8fd9\u662f\u672a\u67655\u5e74\u91cc\u4f60\u7684\u5de5\u4f5c\u73af\u5883\u3002\uff083\uff09\u9009\u62e9\u4e0e\u5de5\u4e1a\u754c\u5173\u7cfb\u7d27\u5bc6\u7684\u5730\u65b9
    4. \u51c6\u5907SOP\u548c\u63a8\u8350\u4fe1\uff1a\u89c1\u4e0b\u65b9\u5c0f\u6807\u9898
    5. \u51c6\u5907\u4e09\u7ef4\u6210\u7ee9\uff1a\u5360\u5c0f\u5206\u91cf\u3002\u5176\u4e2d\u6258\u798f\u5fc5\u987b\u8fc7\u7ebf
    6. \u9762\u8bd5\uff1a\u7ed3\u6784\u662f\u201c\u4ecb\u7ecd\u4e00\u4e2a\u4f60\u6700\u60f3\u8bb2\u7684\u7814\u7a76\u9879\u76ee\u201d+\u201c\u4f60\u7684\u7814\u7a76\u5174\u8da3\u662f\u4ec0\u4e48\u201d+\u201c\u8fd8\u6709\u4ec0\u4e48\u95ee\u9898\u201d\u3002\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\u662f\u770b\u4f60\u7684\u89e3\u51b3\u95ee\u9898\u80fd\u529b\u600e\u4e48\u6837\uff0c\u7814\u7a76\u5174\u8da3\u5339\u914d\u4e0d\u5339\u914d\uff0c\u5c11\u90e8\u5206\u60c5\u51b5\u4e5f\u4f1a\u95ee\u5230\u6280\u672f\u7ec6\u8282\u3002\u5728QA\u73af\u8282\uff0c\u53ef\u4ee5\u95ee\u5bf9\u65b9\u4e4b\u524d\u7684\u5de5\u4f5c\uff0c\u53ef\u4ee5\u95ee\u672a\u6765\u4f60\u80fd\u505a\u7684\u5de5\u4f5c\uff0c\u53ef\u4ee5\u95ee\u9879\u76ee\uff0c\u95ee\u5b66\u6821\u3002\u4e0d\u77e5\u9053\u7684\u5c31\u8bf4\u4e0d\u77e5\u9053\u3002
    7. (Prof Dragomir Radev@Yale)\u00a0Advice for PhD Applications, Faculty Applications, etc\u00a0(2023). [List of Suggestions]
    1. [(Roma Patel PhD@Brown, Prof Nathan Schneider@Georgetown University)\u00a0PhD Application Series of the NLP Highlights Podcast)\u00a0(2021). [Podcast] (A new series they launched that addresses all aspects of PhD application. Besides, it is just a great podcast in general that talks about recent NLP advances)
    2. (Albert Webson et al., PhDs@Brown University)\u00a0Resources for Underrepresented Groups, including Brown's Own Applicant Mentorship Program\u00a0(2020, but we will keep updating it throughout the 2021 application season.) [List of Resources]
    3. A Princeton CS Major's Guide to Applying to Graduate School. [List of suggestions]
    4. (Tim Dettmers, PhD@UW)\u00a0Machine Learning PhD Applications \u2014 Everything You Need to Know\u00a0(2018). [Guide]
    1. (Kalpesh Krishna, PhD@UMass Amherst)\u00a0Grad School Resources\u00a0(2018). [Article] (This list lots of useful pointers!)
    2. (Prof\u00a0Mor Harchol-Balter@CMU)\u00a0Applying to Ph.D. Programs in Computer Science\u00a0(2014). [Guide]
    1. (CS Rankings)\u00a0Advice on Applying to Grad School in Computer Science. [Pointers]
    2. (Prof Scott E. Fahlman@CMU)\u00a0Quora answers on the LTI program at CMU\u00a0(2017). [Article] ---------------------------------------------------------------------------------------
    "},{"location":"Other/nlp_phd/#_4","title":"\u600e\u6837\u9009\u62e9\u5b66\u6821/\u9879\u76ee\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u6295\u591a\u5c11\u6240\u5b66\u6821\uff1a8\uff5e13\u6240
    "},{"location":"Other/nlp_phd/#sop","title":"\u600e\u6837\u51c6\u5907SOP\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u516b\u6708\u4efd\u5f00\u59cb\u5199\u7684\u6700\u591a
    3. SOP\u5e94\u5f53\u63cf\u8ff0\u4f60\u7684\u7814\u7a76\u7ecf\u5386\uff0c\u8be6\u7ec6\u4ecb\u7ecd\u505a\u8fc7\u7684\u7814\u7a76\u7684\u5177\u4f53\u8fc7\u7a0b\u3001\u7814\u7a76\u6bcf\u4e00\u6b65\u7684\u7ec6\u8282\uff0c\u8fd9\u6837\u6bd4\u8f83\u65b9\u4fbf\u8bc4\u59d4\u4f30\u8ba1\u4f60\u7814\u7a76\u7684\u4ef7\u503c\uff0c\u8ba9\u4ed6\u4eec\u77e5\u9053\u4f60\u660e\u767d\u81ea\u5df1\u7684\u7814\u7a76\u6bcf\u4e00\u6b65\u90fd\u5728\u505a\u4ec0\u4e48\u3002\u4e4b\u540e\uff0c\u4f60\u5e94\u5f53\u4ece\u6574\u4e2a\u7814\u7a76\u751f\u6daf\u7684\u89c6\u89d2\u6765\u4ecb\u7ecd\u4f60\u4e4b\u524d\u7684\u5de5\u4f5c\uff0c\u5e76\u5206\u522b\u4ece\u5177\u4f53\u7684\u7814\u7a76\u5de5\u4f5c\u3001\u4f60\u7684\u7814\u7a76\u5fc3\u5f97\u4e24\u4e2a\u65b9\u9762\u4ecb\u7ecd\u4f60\u7684\u672a\u6765\u5c55\u671b\uff0c\u4ecb\u7ecd\u4f60\u5728phd\u9636\u6bb5\u8981\u505a\u600e\u6837\u7684\u7814\u7a76\u3002
    4. \u6bcf\u6240\u5b66\u6821\u5e94\u8be5\u6295\u4e0d\u4e00\u6837\u7684SOP\uff0c\u53ea\u6539\u6700\u540e\u4e00\u4e24\u6bb5\u4e5f\u6709\u70b9\u5c11\uff0c\u6700\u597d\u6539\u52a8\u5927\u4e00\u4e9b\uff0c\u6295\u5176\u6240\u597d\u3002
    5. \u53ef\u4ee5\u628aSOP\u7ed9recommender\u770b\u4e00\u4e0b
    "},{"location":"Other/nlp_phd/#_5","title":"\u600e\u6837\u51c6\u5907\u63a8\u8350\u4fe1\uff1f","text":"
    1. (Nelson Liu, PhD@Stanfard)\u00a0Student Perspectives on Applying to NLP PhD Programs\u00a0(2019). [Suggestions Based on Surveys]
    2. \u9009\u62e9\u63a8\u8350\u4eba\uff081\uff09\u4f60\u5bf9\u63a8\u8350\u4eba\u7684\u719f\u77e5\u7a0b\u5ea6\uff082\uff09\u4f60\u4e0e\u8fd9\u4f4d\u63a8\u8350\u4eba\u5408\u4f5c\u7684\u5de5\u4f5c\u597d\u4e0d\u597d\uff083\uff09\u63a8\u8350\u4eba\u7684\u77e5\u540d\u5ea6\u3002\u56e0\u6b64\u8bfe\u7a0b\u63a8\u6216TA\u63a8\u662f\u4e0d\u597d\u7528\u7684\u3002\u5de5\u4e1a\u754c\u63a8\u662f\u597d\u7528\u7684\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u63a8\u8350\u4fe1\u4f60\u540c\u6837\u9700\u8981\u8bc4\u4f30\u63a8\u8350\u4eba\u7684\u77e5\u540d\u5ea6\u3002
    3. \u9700\u8981\u6ce8\u610f\u77e5\u540d\u7684\u63a8\u8350\u4eba\uff0c\u7ade\u4e89\u7684\u5b66\u751f\u4e5f\u591a\uff0c\u53ea\u4f1a\u63a8\u8350\u6700\u4f18\u79c0\u7684\u5b66\u751f\u3002
    4. \u63d0\u9192\u63a8\u8350\u4eba\u4f60\u7684\u4f18\u70b9\u548c\u5de5\u4f5c\uff0c\u63a8\u8350\u4eba\u5f88\u5fd9\uff0c\u53ef\u80fd\u60f3\u4e0d\u8d77\u6765\u3002\u6ce8\u610f\u5728\u63a8\u8350\u4fe1\u63d0\u4ea4\u622a\u6b62\u524d1\u661f\u671f\u548c2\u661f\u671f\u5206\u522b\u90ae\u4ef6\u63d0\u9192\u63a8\u8350\u4eba\u63d0\u4ea4\u63a8\u8350\u4fe1\u3002
    "},{"location":"Other/nlp_phd/#_6","title":"\u524d\u63d0\u6761\u4ef6\uff1a\u6691\u7814","text":"
    1. (Andrew Kuznetsov, PhD@CMU)\u00a0CS/HCI PhD Opportunity Tracker from Twitter\u00a0(Developed in 2021).\u00a0http://www.andrewkuz.net/hci-opportunities-2022.html
    2. (Eugene Vinitsky, PhD@UC Berkeley)\u00a0A Guide to Cold Emailing\u00a0(2020). [Article]
    3. (Prof Shomir Wilson@Penn State University)\u00a0Guide for Interacting With Faculty\u00a0(2018). [Suggestions]
    4. (Prof Shomir Wilson@Penn State University)\u00a0Reference Letter Procedure. [Suggestions]
    "},{"location":"Other/nlp_phd/#_7","title":"\u524d\u63d0\u6761\u4ef6\uff1a\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668","text":""},{"location":"Other/nlp_phd/#_8","title":"\u53e6\u4e00\u79cd\u9009\u62e9\uff1a\u8f6f\u4ef6\u5f00\u53d1\u5de5\u7a0b\u5e08","text":""},{"location":"Other/nlp_phd/#phd_2","title":"\u7b2c\u4e8c\u9636\u6bb5\uff1a\u600e\u6837\u505a\u4e00\u4e2a\u597dPHD\uff1f","text":""},{"location":"Other/nlp_phd/#_9","title":"\u7efc\u5408\u6307\u5bfc","text":"
    1. (Prof Isabelle Augenstein@UCopenhagen)\u00a0Increasing Well-Being in Academia\u00a0(2020). [Suggestions]
    2. (Sebastian Ruder@DeepMind)\u00a010 Tips for Research and a PhD\u00a0(2020) . [Suggestions]
    3. (Maxwell Forbes, PhD@UW)\u00a0Every PhD Is Different. [Suggestions]
    4. (Prof Mark Dredze@JHU, Prof Hanna M. Wallach@UMass Amherst)\u00a0How to be a successful PhD student (in computer science (in NLP/ML)). [Suggestions]
    5. (Andrej Karpathy)\u00a0A Survival Guide to a PhD\u00a0(2016). [Suggestions]
    6. be \u201cshe\u2019s the person who did X\u201d
    7. \u4e0d\u8981\u628aphd\u5f53\u4f5c\u5199paper\uff0c\u4f60\u8981\u628a\u81ea\u5df1\u5f53\u6210\u8be5\u9886\u57df\u7684\u4e00\u5458\uff0c\u8981\u63a8\u52a8\u9886\u57df\u7684\u8fdb\u5c55\u3002
    8. (Prof Kevin Gimpel@TTIC)\u00a0Kevin Gimpel's Advice to PhD Students. [Suggestions]
    9. (Prof Marie desJardins@Simmons University)\u00a0How to Succeed in Graduate School: A Guide for Students and Advisors\u00a0(1994). [Article] [Part II]
    10. (Prof Eric Gilbert@UMich)\u00a0Syllabus for Eric\u2019s PhD students\u00a0(incl. Prof's expectation for PhD students). [syllabus]
    11. (Marek Rei, Lecturer@Imperial College London)\u00a0Advice for students doing research projects in ML/NLP\u00a0(2022). [Suggestions]
    12. (Prof H.T. Kung@Harvard)\u00a0Useful Thoughts about Research\u00a0(1987). [Suggestions]
    13. (Prof Phil Agre@UCLA)\u00a0Networking on the Network: A Guide to Professional Skills for PhD Students\u00a0(last updated: 2015). [Suggestions] --------------------------------------------------------------------------------------------------------------------------------------
    14. (Prof Stephen C. Stearns@Yale)\u00a0Some Modest Advice for Graduate Students. [Article]
    15. (Prof Tao Xie@UIUC)\u00a0Graduate Student Survival/Success Guide. [Slides]
    16. (Mu Li@Amazon)\u00a0\u535a\u58eb\u8fd9\u4e94\u5e74\u00a0(A Chinese article about five years in PhD at CMU). [Article]
    17. (Karl Stratos)\u00a0A Note to a Prospective Student. [Suggestions]
    "},{"location":"Other/nlp_phd/#llmnlp","title":"\u70ed\u70b9\u8bdd\u9898\uff1aLLM\u65f6\u4ee3\u7684NLP\u7814\u7a76","text":"
    1. (UMich; led by Prof Rada Mihalcea)\u00a0A PhD Student's Perspective on Research in NLP in the Era of Very Large Language Models\u00a0(2023). [Paper]
    2. Multilinguality and Low-resource Languages ------------------------------------------
    3. Reasoning ---------
    4. Knowledge Bases ---------------
    5. Language Grounding ------------------
    6. Computational Social Science
    7. Child Language Acquisition
    8. Non-verbal Communication
    9. Synthetic Datasets
    10. Interpretability
    11. Efficient NLP
    12. NLP in education
    13. NLP in healthcare
    14. NLP and ethics
    15. (Prof Julian Togelius@NYU, Prof Georgios Yannakakis@UMalta)\u00a0Choose Your Weapon: Survival Strategies for Depressed AI Academics Julian Togelius, Georgios N. Yannakakis\u00a0(2023). [Tweet] [Paper]
    "},{"location":"Other/nlp_phd/#idea","title":"\u627e\u5230\u597d\u7684\u7814\u7a76Idea","text":"
    1. (Prof Jia-Bin Huang@UMaryland)\u00a0How to come up with research ideas?\u00a0(2021). [Suggestions]
    1. (John Schulman, co-founder of OpenAI)\u00a0An Opinionated Guide to ML Research (e.g., horning your taste)\u00a0(2020). [Suggestions]

    Interesting snippets: \"Goal-driven. Develop a vision of some new AI capabilities you\u2019d like to achieve, and solve problems that bring you closer to that goal.\", \"If you are working on incremental ideas, be aware that their usefulness depends on their complexity.\", \"Consider how the biggests bursts of impactful work tend to be tightly clustered in a small number of research groups and institutions. That\u2019s not because these people are dramatically smarter than everyone else, it\u2019s because they have a higher density of expertise and perspective, which puts them a little ahead of the rest of the community, and thus they dominate in generating new results.\", \"Early on in your career, I recommend splitting your time about evenly between textbooks and papers. You should choose a small set of relevant textbooks and theses to gradually work through, and you should also reimplement the models and algorithms from your favorite papers.\" 3. (Prof Fei-Fei Li@Stanford)\u00a0De-Mystifying Good Research and Good Papers\u00a0(2014). [Suggestions]

    Interesting snippets: \"This means publishing papers is NOT about \u201cthis has not been published or written before, let me do it\u201d, nor is it about \u201clet me find an arcane little problem that can get me an easy poster\u201d. It\u2019s about \u201cif I do this, I could offer a better solution to this important problem,\u201d or \u201cif I do this, I could add a genuinely new and important piece of knowledge to the field.\u201d You should always conduct research with the goal that it could be directly used by many people (or industry). In other words, your research topic should have many \u2018customers\u2019, and your solution would be the one they want to use. A good research project is not about the past (i.e. obtaining a higher performance than the previous N papers). It\u2019s\u00a0about the future (i.e. inspiring N future papers to follow and cite you, N->\\inf).\"

    "},{"location":"Other/nlp_phd/#_10","title":"\u8bfb\u6587\u7ae0\u7684\u5de5\u5177","text":""},{"location":"Other/nlp_phd/#_11","title":"\u8bfb\u6587\u7ae0","text":"
    1. (Prof Srinivasan Keshav@Cambridge)\u00a0How to Read a Paper\u00a0(2007). [Suggestions]
    1. (Prof Jason Eisner@JHU)\u00a0How to Read a Technical Paper\u00a0(2009). [Suggestions]
    1. (Prof Emily M. Bender@UW)\u00a0Critical Reading\u00a0(2003). [Suggestions]
    2. \u6279\u5224\u6027\u9605\u8bfb\u662f\u5728\u9605\u8bfb\u4e2d\u79ef\u6781\u6295\u5165\u6587\u7ae0\u7684\u8fc7\u7a0b\u3002\u4f60\u53ef\u4ee5\u5728\u9605\u8bfb\u8fc7\u7a0b\u4e2d\u95ee\u4ee5\u4e0b\u95ee\u9898\uff1a
    3. \u5b9e\u9a8c\u6587\u7ae0\uff1a
    4. \u6559\u79d1\u4e66\u6587\u7ae0\uff0c\u6982\u5ff5\u8bf4\u660e\u6587\u7ae0
    5. \u671f\u520a\u6742\u5fd7\u4e2d\u7684\u8bf4\u7406\u6027\u6587\u7ae0
    "},{"location":"Other/nlp_phd/#_12","title":"\u5199\u6587\u7ae0","text":"
    1. (Prof Jason Eisner@JHU)\u00a0How to write a paper?\u00a0(2010). [Suggestions]
    2. (Simon Peyton Jones@Microsoft)\u00a0How to write a great research paper: Seven simple suggestions\u00a0(2014). [Slides] [Talk]
    3. \u5199\u6587\u7ae0\u662f\u5e2e\u52a9\u5efa\u7acb\u7814\u7a76\u7684\u7b2c\u4e00\u6b65\uff0c\u800c\u4e0d\u662f\u4e00\u79cd\u6c47\u62a5\u7814\u7a76\u7684\u673a\u5236
    4. \u4e0d\u662f\u53ea\u6709\u597d\u7684idea\u80fd\u5199\uff0c\u968f\u4fbf\u4ec0\u4e48idea\u90fd\u53ef\u4ee5\u5199\u4e0b\u6765\uff0c\u7136\u540e\u8ddf\u522b\u4eba\u8c08\u4e00\u8c08
    5. \u4e00\u7bc7paper\u4e00\u4e2aidea\uff0c\u80fd\u591f\u6e05\u6670\u8868\u8fbe\u3002\u6bd4\u5982\u6709\u8fd9\u79cd\u53e5\u5f0f\u201cThe main idea of this paper is\u2026\u201d \u201cIn this section we present the main contributions of this paper.\u201d
    6. \u8981\u5f3a\u8c03\u4f60\u7684contribution\uff0c\u5728introduction\u91cc\u5f3a\u8c03\u3002introduction\u5c31\u662f\u7528\u6765\u63cf\u8ff0\u95ee\u9898+\u4ecb\u7ecd\u8d21\u732e\u7684\u3002
    7. \u53ef\u4ee5\u5148\u5217\u4e3e\u51fa\u6240\u6709\u7684contribution\uff0c\u7136\u540e\u7528contribution\u9a71\u52a8\u6574\u7bc7\u6587\u7ae0
    8. introduction\u91cc\u7684\u201c\u540e\u6587\u7ed3\u6784\u5982\u4e0b\u2026.\u201d\u5e94\u5f53\u7528\u5c06\u6765\u65f6\uff08\u5b58\u7591\uff09
    9. \u600e\u6837\u5199\u76f8\u5173\u7814\u7a76\uff1a
    10. \u600e\u6837\u5199\u7ed3\u679c\uff1a\u628a\u8bfb\u8005\u653e\u5728\u7b2c\u4e00\u4f4d
    11. \u8bb2\u7ed9\u522b\u4eba\u542c\uff0c\u95ee\u8bfb\u8005\u7684\u610f\u89c1\uff0c\u95ee\u8bc4\u59d4\u7684\u610f\u89c1\uff08\u975e\u5e38\u96be\u4f46\u975e\u5e38\uff0c\u975e\u5e38\uff0c\u975e\u5e38\u91cd\u8981\uff09
    12. \u7528\u4e3b\u52a8\u8bed\u6c14\uff08we can see\uff09\u4e0d\u8981\u7528\u88ab\u52a8\u8bed\u6c14\uff08it can be seen that\uff09\uff0c\u4f1a\u4f7f\u6587\u7ae0\u8bfb\u8d77\u6765\u5f88\u6b7b
    13. \u7528\u7b80\u5355\u8bcd\uff0c\u7b80\u5355\u8868\u8fbe
    14. (Prof Jennifer Widom@Stanford)\u00a0Tips for Writing Technical Papers\u00a0(2006). [Suggestions]
    15. (Prof Shomir Wilson@Penn State University)\u00a0Guide for Scholarly Writing. [Suggestions]
    16. (Prof Jia-Bin Huang@U Maryland)\u00a0How to write the introduction (and also the What-Why-How figures). [Tweet]
    17. (Prof Jia-Bin Huang@U Maryland)\u00a0How to write a rebuttal for a conference?\u00a0[Tweet]
    18. (Prof Michael Black@Max Planck Institute)\u00a0Twitter Thread about \"Writing is laying out your logical thoughts\". [Tweet]
    19. (Prof Shomir Wilson@Penn State University)\u00a0Guide for Citations and References\u00a0[Suggestions]
    20. (Carmine Gallo, a bestselling author)\u00a0The Storytellers Secret\u00a0(2016). [Video]Takeaways: Writing the Introduction section and giving talks can also be like telling a Hollywood story: the setting (what problem we are solving; how important it is), the villian (how difficult this problem is; how previous work cannot solve it well), and the superhero (what we propose). For giving talks, starting with personal stories (e.g., a story of grandma telling the kid not to drink and persist the right thing leading to the person's life pursuit on social justice) is very helpful to get the audience involved.
    21. (Maxwell Forbes@UW)\u00a0Figure Creation Tutorial: Making a Figure 1\u00a0(2021). [Suggestions]
    22. UI design as a medium of thought: see Michael Nielsen's\u00a0explanation of why UI is important for science,\u00a0Bret Victor's work,\u00a0Miegakure\u00a0that visualizes a 4D environment.
    23. (Prof Jia-Bin Huang@U Maryland)\u00a0How to write math in a paper?\u00a0(2023). [Tweet]

    \u672a\u5b8c\u5f85\u7eed\uff1a

    "},{"location":"Other/nlp_phd/#_13","title":"\u7b2c\u4e09\u9636\u6bb5\uff1a\u5de5\u4e1a\u754c\u7814\u7a76\u8005\u7684\u751f\u6d3b","text":""},{"location":"Other/nlp_phd/#_14","title":"\u7b2c\u56db\u9636\u6bb5\uff1a\u5982\u4f55\u83b7\u5f97\u6559\u804c\uff1f\u5982\u4f55\u505a\u4e00\u4e2a\u597d\u5bfc\u5e08\uff1f","text":""},{"location":"Other/nlp_phd/#nlp","title":"\u7b2c\u4e94\u9636\u6bb5\uff1a\u89c4\u5212NLP\u7684\u7814\u7a76\u751f\u6daf","text":""},{"location":"Other/nlp_phd/#_15","title":"\u4e86\u89e3\u66f4\u591a","text":""},{"location":"Other/nlp_phd/#_16","title":"\u5f15\u7528","text":"
    @misc{resources2021jin,\n  author = {Zhijing Jin},\n  title = {Resources to Help Global Equality for PhDs in NLP},\n  year = {2021},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/zhijing-jin/nlp-phd-global-equality}}\n}\n
    "},{"location":"Other/nlp_resources/","title":"DL & NLP Resources","text":"

    \u8fd9\u4e2a\u9875\u9762\u7528\u6765\u6536\u96c6 nlp \u5165\u95e8\u8d44\u6599\u7684 minimal closure\uff08\u6307\u8db3\u591f\u5b66\u4f1a\u7684\u6700\u5c0f\u8d44\u6e90\u96c6\u5408\uff09

    "},{"location":"Other/nlp_resources/#machine-learning-theory","title":"Machine Learning Theory","text":"

    Google\u7684\u4e00\u4e2a\u6559\u7a0b\uff0c\u91cc\u9762\u7684playground\u505a\u5f97\u6bd4\u8f83\u76f4\u89c2\uff0c\u65e0\u9700\u4ee3\u7801

    Machine Learning \u00a0|\u00a0 Google for Developers

    "},{"location":"Other/nlp_resources/#machine-learning-technology","title":"Machine Learning Technology","text":"

    TODO

    "},{"location":"Other/nlp_resources/#deep-learning-theory","title":"Deep Learning Theory","text":"

    TODO

    "},{"location":"Other/nlp_resources/#deep-learning-technology","title":"Deep Learning Technology","text":"

    Pytorch\u6559\u7a0b\uff0c\u53ef\u4ee5\u770b\u7740\u4ee3\u7801\u624b\u6284\u4e00\u4e0b

    Welcome to PyTorch Tutorials \u2014 PyTorch Tutorials 2.0.1+cu117 documentation

    numpy: numpy 100 exercise

    rougier/numpy-100: 100 numpy exercises (with solutions) (github.com)

    Pytorch

    PyTorch\u6df1\u5ea6\u5b66\u4e60\u5feb\u901f\u5165\u95e8\u6559\u7a0b\uff08\u7edd\u5bf9\u901a\u4fd7\u6613\u61c2\uff01\uff09\u3010\u5c0f\u571f\u5806\u3011_\u54d4\u54e9\u54d4\u54e9_bilibili

    Attention-based Models and Transformer

    Let's build GPT: from scratch, in code, spelled out. - YouTube

    "},{"location":"Other/nlp_resources/#natural-language-processing-theory","title":"Natural Language Processing Theory","text":"

    Stanford CS224N: NLP with Deep Learning | Winter 2021 | Lecture 1 - Intro & Word Vectors - YouTube

    "},{"location":"Other/nlp_resources/#natural-language-processing-technology","title":"Natural language processing technology","text":"

    Stanford CS 224N | Natural Language Processing with Deep Learning

    "},{"location":"Other/nlp_resources/#reinforcement-learning","title":"Reinforcement Learning","text":"

    \u8611\u83c7\u4e66EasyRL (datawhalechina.github.io)

    Codes:

    boyu-ai/Hands-on-RL: https://hrl.boyuai.com/ (github.com) datawhalechina/easy-rl: \u5f3a\u5316\u5b66\u4e60\u4e2d\u6587\u6559\u7a0b\uff08\u8611\u83c7\u4e66\uff09\uff0c\u5728\u7ebf\u9605\u8bfb\u5730\u5740\uff1ahttps://datawhalechina.github.io/easy-rl/

    "},{"location":"Other/nlp_resources/#computer-vision","title":"Computer Vision","text":"

    Computer Vision | Universit\u00e4t T\u00fcbingen (uni-tuebingen.de)

    "},{"location":"Other/portfolio/","title":"Portfolio for CMU METALS Application","text":"

    Hi there! \ud83d\udc4b

    This site is a temporary portfolio for CMU METALS application.

    "},{"location":"Other/portfolio/#frontend-works","title":"Frontend Works","text":"Glyph

    Gun violence in US visualization

    "},{"location":"Other/portfolio/#graphic-design","title":"Graphic Design","text":"Calendar Card1 Card2 Card3

    logo

    "},{"location":"Other/tools/","title":"\u6211\u7684\u5de5\u5177\u7bb1\uff01","text":"

    \u8bb0\u5f55\u4e00\u70b9\u597d\u7528\u7684\u5de5\u5177

    "},{"location":"Other/tools/#workflow","title":"\u6211\u7684workflow","text":""},{"location":"Other/tools/#notionobsidian","title":"\u9009\u62e9Notion\u548cObsidian","text":"

    \u5148\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u7ed3\u8bba

    \u4f18\u70b9/\u5de5\u5177 Notion Obsidian \u8bed\u6cd5 \u81ea\u5df1\u7684\u4e00\u5957\u8bed\u6cd5\uff0c\u90e8\u5206\u662fmarkdown \u7eafmarkdown \u4e66\u5199\u901f\u5ea6 \u6162 \u5feb \u6587\u6863\u6574\u9f50\u7a0b\u5ea6 \u9ad8 \u4f4e \u90e8\u7f72\u5230mkdocs\u96be\u6613 \u6613\uff0c\u53ef\u76f4\u63a5\u7528 \u96be\uff0c\u9700\u8c03\u6574\u5f88\u591a\u683c\u5f0f \u5bfc\u51fa\u4e2d\u6587\u652f\u6301\u7a0b\u5ea6 \u53ea\u6709\u4e09\u79cd\u5b57\u4f53\uff0c\u90e8\u5206\u4e2d\u6587\u7f3a\u5b57 \u5b57\u4f53\u591a\uff0c\u652f\u6301\u6bd4\u8f83\u597d

    \u76ee\u524d\u6211\u9009\u62e9\u7684 workflow: \u5b8c\u5168\u629b\u5f03 Ob \u4e86\uff01

    graph TD\n    \u542c\u5199 --> Notion \n    Notion -- \u6709\u65f6\u95f4 --> mkdocs\n
    "},{"location":"Other/tools/#todo-list","title":"TODO list \u7528\u4ec0\u4e48\u505a","text":"

    TODO

    "},{"location":"Other/tools/#_2","title":"\u6587\u732e\u7ba1\u7406\u5de5\u5177","text":"

    TODO

    \u5176\u5b9e\u4ed3\u5e93\u91cc\u672c\u6587\u4ef6\u5939\u4e0b\u7684asset\u91cc\u73b0\u5728\u6709\u4e2a\u600e\u4e48\u914d\u7f6ezotero\u7684ppt\uff0c\u592a\u61d2\u6ca1\u65f6\u95f4\u6574\u8fc7\u6765\uff0c\u53ef\u4ee5\u5148\u53bb\u4ed3\u5e93\u91cc\u627e\u627eorz

    "},{"location":"Other/tools/#_3","title":"\u96f6\u6563\u5de5\u5177","text":""},{"location":"Other/tools/#_4","title":"\u4e8c\u7ef4\u7801\u751f\u6210\u5668","text":"

    \u751f\u6210\u957f\u5f97\u4e0d\u50cf\u4e8c\u7ef4\u7801\u7684\u4e8c\u7ef4\u7801 \u76f4\u63a5\u626b\u4e0b\u9762\u7684\u4e8c\u7ef4\u7801\u53ef\u4ee5\u8fdb\u5165\u7f51\u7ad9

    "},{"location":"Other/tools/#_5","title":"\u5728\u7ebf\u6253\u65f6\u95f4\u8f74\u5de5\u5177","text":"

    https://judes.me/lrc_editor/

    "},{"location":"Other/whynote/","title":"\u4e3a\u4ec0\u4e48\u8981\u5199\u8fd9\u4e9b\u7b14\u8bb0","text":"

    \u672c\u6765\u60f3\u5199\u591a\u4e00\u70b9\u7684\uff0c\u4f46\u662f\u592a\u61d2\u4e86

    "},{"location":"Other/zju_ling_cs/","title":"ZJU English Major to CS&NLP","text":"

    \u26a0\ufe0f \u611f\u89c9\u5f53\u65f6\u5199\u5f97\u4e0d\u662f\u5f88\u597d\uff0c\u73b0\u5728\u5f88\u591a\u89c2\u5ff5\u53c8\u6709\u4e9b\u6539\u53d8\uff0c\u53ef\u80fd24\u5e74\u6625\u8282\u671f\u95f4\u7a7a\u4e0b\u6765\u4f1a\u518d\u8ba4\u771f\u6539\u4e00\u4e0borz

    "},{"location":"Other/zju_ling_cs/#_1","title":"\u672c\u6587\u6863\u662f\u4ec0\u4e48\uff1f","text":"

    \u7b14\u8005\u8f6c\u4e13\u4e1a\u8e29\u8fc7\u7684\u5751\u548c\u5bf9\u540e\u8f88\u7684\u5efa\u8bae\uff0c\u771f\u5fc3\u60f3\u5efa\u7acb\u8d77ZJU\u5185\u90e8\u826f\u597d\u7684\u4f20\u5e2e\u5e26\u6c1b\u56f4\u3002

    "},{"location":"Other/zju_ling_cs/#_2","title":"\u89c2\u5ff5&\u4e60\u60ef\u95ee\u9898","text":"

    \u5728\u5177\u4f53\u5efa\u8bae\u524d\u9996\u5148\u56de\u7b54\u4e00\u4e9b\u5e38\u6709\u7684\u62c5\u5fe7+\u505a\u4e00\u4e9b\u4e60\u60ef\u65b9\u9762\u7684\u63d0\u9192

    "},{"location":"Other/zju_ling_cs/#cs","title":"\u6211\u80fd\u8f6c\u5230CS\u5417\uff1f","text":"

    \u80fd\u3002\u6709\u5982\u4e0b\u6848\u4f8b\uff08\u4e0d\u4ee3\u8868\u6240\u6709\u4eba\u613f\u610f\u88ab\u8054\u7cfb\u5230\uff0c\u4e0d\u4fdd\u8bc1\u63d0\u4f9b\u8054\u7cfb\u65b9\u5f0f\uff09

    "},{"location":"Other/zju_ling_cs/#nlp","title":"NLP\u4e0d\u8981\u8bed\u8a00\u5b66\u540c\u5b66\u5417\uff1f","text":""},{"location":"Other/zju_ling_cs/#_3","title":"\u660e\u786e\u4e00\u4e2a\u5341\u5e74\u5230\u4e09\u5341\u5e74\u7684\u957f\u8fdc\u89c4\u5212\uff0c\u4e3b\u8981\u662f\u4ee5\u4e0b\u51e0\u4e2a\u95ee\u9898","text":"\u95ee\u9898 \u6211\u7684\u56de\u7b54 \u6211\u8981\u5728\u54ea\u91cc\u751f\u6d3b\uff0c\u56fd\u5185\u8fd8\u662f\u56fd\u5916\uff1f \u6211\u8f6cCS\u662f\u66f4\u591a\u56e0\u4e3a\u559c\u6b22\u7406\u5de5\u79d1\uff0c\u8fd8\u662f\u56e0\u4e3a\u559c\u6b22\u5de5\u8d44\uff1f \u6211\u8981\u8fdb\u5de5\u4e1a\u754c\uff0c\u53bb\u79d1\u6280\u4e92\u8054\u7f51\u516c\u53f8\u5de5\u4f5c\uff1b\u8fd8\u662f\u7559\u5728\u5b66\u672f\u754c\uff0c\u5728\u9ad8\u6821\u6216\u7814\u7a76\u6240\u5de5\u4f5c\uff1f \u6211\u8981\u505aCS\u9664NLP\u5176\u5b83\u7684\u65b9\u5411\uff0c\u5982\u7cfb\u7edf\u3001\u7f51\u7edc\u3001\u5b89\u5168\u3001CV\u6216\u7eaf\u6df1\u5ea6\u5b66\u4e60\u7406\u8bba\u65b9\u5411\uff1b\u8fd8\u662f\u505a\u504f\u6df1\u5ea6\u5b66\u4e60\u7684NLP\u65b9\u5411\uff1b\u8fd8\u662f\u505a\u504f\u8bed\u8a00\u5b66\u7684NLP\u65b9\u5411\uff1f \u6211\u6709\u591a\u5c11\u7ecf\u8d39\uff1f \u6211\u591a\u5c11\u5e74\u5185\u9700\u8981\u8f6c\u597d\u4e13\u4e1a\uff1f"},{"location":"Other/zju_ling_cs/#_4","title":"\u89c4\u5212\u4eba\u751f\u4e2d\u8be5\u505a/\u4e0d\u8be5\u505a\u7684\u4e8b\u7684\u4e24\u4e2a\u51c6\u5219","text":""},{"location":"Other/zju_ling_cs/#cs_1","title":"\u628a\u81ea\u5df1\u770b\u6210CS\u4eba","text":""},{"location":"Other/zju_ling_cs/#cs_2","title":"CS\u6709\u8001\u5e08\u540c\u5b66\u770b\u4e0d\u8d77\u6211\u600e\u4e48\u529e\uff1f","text":""},{"location":"Other/zju_ling_cs/#cs_3","title":"\u5b66\u4e0d\u597dCS\uff0c\u662f\u4e0d\u662f\u56e0\u4e3a\u5b66\u82f1\u8bed\u8bfe\u4f7f\u6211\u53d8\u4e0d\u806a\u660e\u4e86\uff1f","text":"

    \u4e0d\u662f\u7684\u3002 - \u7406\u8bba\u4e0a\u662f\u5b8c\u5168\u53ef\u4ee5\u5b66\u597d\u7684\u3002NLP\u5708\u6709\u5f88\u591a\u7814\u7a76\u8005\u8bfb\u8fc7\u8bed\u8a00\u5b66\u548cCS\u53cc\u672c\u79d1\uff0c\u4ee3\u8868AP\u6709AllenNLP Noah Smitch, Colimbia University Zhou Yu\uff08ZJU\u7684\u672c\u79d1\uff09. \u8bfb\u8bed\u8a00\u5b66\u6ca1\u6709\u803d\u8bef\u4ed6\u4eec\u7684\u8111\u5b50\uff0c\u53cd\u800c\u662f\u4e00\u4e2a\u5f88\u597d\u7684idea\u6765\u6e90\u3002\u6211\u611f\u89c9\u6709\u5f88\u591a\u5929\u624d\u7684\u6848\u4f8b\u53ef\u4ee5\u8bc1\u660e\u4eba\u7684\u77e5\u8bc6\u5bb9\u91cf\u548c\u5b66\u4e60\u80fd\u529b\u4e0a\u9650\u662f\u8d85\u51fa\u5927\u5bb6\u60f3\u8c61\u7684\uff0c\u5b66\u4e24\u4e2a\u4e13\u4e1a\u8fd9\u4ef6\u5c0f\u4e8b\u8fdc\u8fdc\u5728\u8fd9\u4e2a\u4e0a\u9650\u4e4b\u4e0b\u3002\u6211\u6c38\u8fdc\u8ba4\u4e3a\u6bc5\u529b\u548c\uff08\u5bf9\u81ea\u5df1\u4eba\u751f\u4e0a\u9650\u7684\uff09\u60f3\u8c61\u529b\u6bd4\u5f53\u524d\u80fd\u529b\u66f4\u6709\u51b3\u5b9a\u4f5c\u7528\u3002 - \u5b9e\u9645\u82f1\u8bed\u4e13\u4e1a\u53bbCS\u53cc\u4e13\u4e1a\u5bb9\u6613\u5403\u4f4e\u7ee9\u70b9\u7684\u539f\u56e0\uff0c\u5f80\u5f80\u4e0d\u662f\u80fd\u529b\u667a\u529b\u4e0d\u8db3\uff0c\u800c\u662f\u6709\u4fe1\u606f\u5dee\uff1a\u751f\u6d3b\u5728\u6587\u79d1\u7684\u6563\u6f2b\u73af\u5883\u4e2d\u96be\u4ee5\u77e5\u9053\u5927\u90e8\u5206\u540c\u5b66\u7684\u81ea\u5b66\u8fdb\u5ea6\uff0c\u548c\u5982\u679c\u67d0\u4e9b\u8bfe\u7a0b\u6709\u5b9e\u8df5\u4e0a\u7684\u5751\uff0c\u6ca1\u6709\u4e0e\u5927\u90e8\u961f\u4e00\u8d77\u5b66\u4e60\u7684\u540c\u5b66\u5c31\u96be\u4ee5\u77e5\u9053\u600e\u6837\u7075\u6d3b\u5e94\u5bf9\u3002\u6240\u4ee5\u5efa\u8bae\u4e0e\u540c\u5b66\u4e00\u8d77\u5b66\u4e60\uff0c\u53c2\u89c1\u4e0b\u4e00\u6761\u3002

    "},{"location":"Other/zju_ling_cs/#cscs","title":"\u8981\u62e5\u6709\u4e00\u4e2a\u6216\u51e0\u4e2a\u540c\u6837\u8de8\u4e13\u4e1a\u5b66CS\u7684\u670b\u53cb\uff0c\u6216\u76f4\u63a5\u878d\u5165\u540c\u4e00\u7ea7\u7684CS\u672c\u79d1\u751f\u5708\u5b50\u91cc\u3002\u5982\u679c\u5b9e\u5728\u6ca1\u6709\uff0c\u4e00\u4e9b\u5176\u5b83\u5de5\u79d1\u7684\u540c\u5b66\u4e5f\u53ef\u4ee5\u3002","text":"

    \u540c\u5b66\u7684\u7528\u5904\u6709\uff1a - \u5e2e\u52a9\u4f60\u8ddf\u4e0a\u5b66\u4e60\u8282\u594f\u3002CS\u7684\u751f\u6d3b\u8282\u594f\u662f\u82f1\u8bed\u4e13\u4e1a\u76842\u500d\uff0c\u662f\u7406\u79d1\u4e13\u4e1a\u76841.5\u500d\uff0c\u5982\u679c\u51b3\u5b9a\u8f6c\u4e13\u4e1a\u662f\u9700\u8981\u4e3b\u52a8\u63d0\u9ad8\u4e00\u4e0b\u751f\u6d3b\u8282\u594f\u7684\uff0c\u505a\u4e8b\u79ef\u6781\u4e00\u70b9\uff0c\u544a\u522b\u62d6\u5ef6\u3002 - \u4e92\u76f8\u63a8\u8350\u597d\u7684\u81ea\u5b66\u8d44\u6599\uff0c\u4e92\u76f8\u5206\u4eab\u7b14\u8bb0\u548c\u8ba8\u8bba\u9898\u76ee\uff0c\u5206\u5de5\u6574\u7406\u671f\u672b\u590d\u4e60\u8d44\u6599\uff0c\u671f\u672b\u4e92\u76f8\u63d0\u95ee\uff0c\u5f62\u6210\u81ea\u5b66\u6c1b\u56f4\uff0c\u8282\u7701\u4e00\u4e9b\u8e29\u5751\u65f6\u95f4\u3002 - \u5982\u679c\u67d0\u4e9b\u8bfe\u7a0b\u5b89\u6392\u6709\u6559\u5b66\u4e8b\u6545\uff0c\u4f60\u53ef\u4ee5\u53ca\u65f6\u77e5\u9053\u5927\u90e8\u5206\u540c\u5b66\u662f\u600e\u6837\u5e94\u5bf9\u7684\uff0c\u53ca\u65f6\u8c03\u6574\u81ea\u5df1\u7684\u5e94\u5bf9\u63aa\u65bd\uff0c\u9632\u6b62\u5982\u679c\u6210\u7ee9\u5360\u6bd4\u7a81\u7136\u8c03\u6574\uff0c\u81ea\u5df1\u5c06\u52aa\u529b\u82b1\u5728\u4e86\u6700\u540e\u5360\u6210\u7ee9\u6bd4\u91cd\u5f88\u5c0f\u7684\u5730\u65b9\u3002

    "},{"location":"Other/zju_ling_cs/#_5","title":"\u8981\u591a\u8bb0\u7b14\u8bb0","text":"

    \u8bb0\u7b14\u8bb0\u662f\u8d39\u66fc\u5b66\u4e60\u6cd5\u7684\u6295\u5165\u4ea7\u51fa\u6bd4\u6700\u9ad8\u7684\u5b9e\u8df5\u5f62\u5f0f\uff0c\u5373\u65e2\u5e2e\u52a9\u68c0\u67e5\u7406\u89e3\uff0c\u7b14\u8bb0\u53c8\u9020\u798f\u540e\u4eba\u3002\u4f60\u53ef\u4ee5\u79c9\u627f\u5f00\u6e90\u7cbe\u795e\uff0c\u50cf\u524d\u8f88\u4e00\u6837\u591a\u5c06\u7b14\u8bb0\u516c\u5e03\u9020\u798f\u540e\u4eba\uff08\u4e0d\u8fc7\u8bf7\u9075\u5b88\u8bda\u4fe1\u5b88\u5219\uff09\u3002\u975e\u5e38\u5e0c\u671bZJU\u80fd\u9010\u6e10\u5f62\u6210\u8f83\u597d\u7684\u4f20\u5e2e\u5e26\u6c1b\u56f4\uff0c\u8ba9\u540e\u8f88\u4e5f\u6709\u826f\u597d\u6821\u53cb\u8d44\u6e90\u53ef\u4eab\u7528\u3002

    "},{"location":"Other/zju_ling_cs/#_6","title":"\u6211\u53ef\u4ee5\u4ee5\u600e\u6837\u7684\u8eab\u4efd\u672c\u79d1\u6bd5\u4e1a\uff1f\u6211\u6709\u54ea\u4e9b\u53ef\u884c\u7684\u51fa\u8def\uff1f","text":"

    \u4ee5\u4e0b\u8fd9\u4e9b\u90fd\u662f\u53ef\u80fd\u505a\u5230\u7684\uff0c\u6211\u4e5f\u5206\u522b\u5217\u51fa\u4e86\u6211\u8ba4\u4e3a\u9700\u8981\u51c6\u5907\u7684\u80cc\u666f\u3002 - \u51fa\u56fdms\uff1a\u7ee9\u70b9\uff0c\u6691\u7814/\u5b9e\u4e60 - \u51fa\u56fd\u76f4\u63a5phd\uff1a\u6691\u7814\uff0cpaper - \u672c\u6821\u76f4\u535a\uff1a\u7ee9\u70b9\uff0c\u8fdb\u672c\u6821\u7ec4\uff0c\u590f\u4ee4\u8425\uff0cpaper - \u8de8\u6821\u76f4\u535a\uff1a\u7ee9\u70b9\uff0c\u5bf9\u65b9\u6821\u590f\u4ee4\u8425\uff0cpaper - \u5de5\u4f5c\uff1a\u5237\u9898\uff0c\u5b9e\u4e60 \u5176\u4e2d\u6211\u8ba4\u4e3a\u503c\u5f97\u6ce8\u610f\u7684\u8fd8\u6709\uff0c\u5177\u4f53\u6700\u597d\u7531\u8bfb\u8005\u518d\u54a8\u8be2\u76f8\u5e94\u8eab\u4efd\u7684\u4eba\u7684\u5efa\u8bae\u3002\u672c\u6761\u9002\u7528\u524d\u9762\u6240\u8ff0\u201c20\u4e2a\u4eba\u5efa\u8bae\u201d\u51c6\u5219\u3002

    "},{"location":"Other/zju_ling_cs/#_7","title":"\u8bfe\u7a0b","text":""},{"location":"Other/zju_ling_cs/#cs_4","title":"CS\u5fc5\u4fee\u8bfe","text":"

    \u9996\u5148\u8981\u660e\u786e\u4e00\u4e2a\u8ba4\u77e5\u95ee\u9898\uff1a\u8bfbCS\u53cc\u5b66\u4f4d\u662f\u4e00\u4e2a\u539f\u5b50\u6027\u7684\u4e8b\u52a1\uff0c\u8981\u4e48\u4e0d\u8bfb\uff0c\u8981\u4e48\u6309\u9700\u6c42\u8bfb\u5b8c\u6216\u8f85\u4fee\u6216\u53cc\u5b66\u4f4d\uff0c\u8fd9\u4e24\u79cd\u9009\u62e9\u90fd\u662f\u6295\u5165\u4ea7\u51fa\u6bd4\u8f83\u9ad8\u7684\uff1b\u6295\u5165\u4ea7\u51fa\u6bd4\u6700\u4f4e\u7684\u662f\u8bfb\u4e00\u534a\uff08\u5fae\u8f85\u4fee\u6216\u53cc\u4e13\u4e1a\uff09\u3002 \u8be5\u56fe\u4e2d\u9664\u6570\u7406\u57fa\u7840\u6a21\u5757\u4e0d\u662f\u53cc\u5b66\u4f4d\u5fc5\u4fee\uff0c\u5176\u5b83\u662f\u5fc5\u4fee\u3002 \uff08\u8fd9\u4e2a\u56fe\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u6709\u4e2a\u7ea2\u5708\uff0c\u627e\u4e0d\u5230\u539f\u56fe\u4e86\uff0c\u6279\u8bc4cyh\u540c\u5b66\u4e71\u753b\uff09

    \u9009\u4e0d\u4e0aCS\u7684\u8bfe\u600e\u4e48\u529e\uff1f - \u6700\u6709\u6548\uff1a\u8865\u9009+\u5728\u8865\u9009\u7684\u51e0\u5929\u91cc\u7ebf\u4e0b\u53bb\u9009\u8bfe\u529e\u6216\u7ed9\u9009\u8bfe\u529e\u53d1\u90ae\u4ef6\u3002\u674e\u6653\u8001\u5e08\u548c\u5f20\u4f20\u534e\u8001\u5e08\u90fd\u5f88nice\uff0c\u8868\u793a\u81ea\u5df1\u5f88\u60f3\u9009\u8bfe\uff0c\u8ddf\u8001\u5e08\u8bf4\u660e\u539f\u56e0\u3002 - \u7b2c\u4e8c\u6709\u6548\uff1a\u5982\u679c\u4efb\u8bfe\u8001\u5e08\u5728\u8ba1\u9662\u8bdd\u8bed\u6743\u8f83\u5927\uff0c\u8bf7\u4efb\u8bfe\u8001\u5e08\u5e2e\u5fd9\u8ddf\u9009\u8bfe\u529e\u8bf4\uff0c\u80fd\u4fdd\u8bc1\u4f60\u9009\u4e0a\u8be5\u8001\u5e08\u7684\u8bfe\u3002 - \u7b2c\u4e09\u6709\u6548\uff1a\u9009\u8bfe\u65f6\u4e0eCS\u7684\u540c\u5b66\u5546\u91cf\uff0c\u505a\u51fa\u65f6\u95f4\u6b63\u597d\u7684\u4e00\u4e9b\u8bfe\u8868\u3002\u53ef\u80fd\u6d89\u53ca\u5230\u201c\u7528\u4e00\u4e9b\u8bfe\u5835\u4f4f\u53e6\u4e00\u4e9b\u8bfe\u201d\u8fd9\u79cd\u590d\u6742\u64cd\u4f5c\uff0c\u6240\u4ee5\u5408\u4f5c\u6bd4\u8f83\u5212\u7b97\u3002

    \u600e\u4e48\u5b66\uff1f - ZJU\u8bfe\u7a0b\u5171\u4eab\u8ba1\u5212 https://github.com/QSCTech/zju-icicles - \u56fe\u7075\u73ed\u8bfe\u7a0b\u901f\u901a\u8ba1\u5212 https://github.com/ZJU-Turing/TuringCourses - \u4e00\u4f4d\u5b66\u957f\u7684\u4f18\u8d28\u7b14\u8bb0 \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4\uff01 - \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4 (xuan-insr.github.io) - \u4e00\u4f4d\u5b66\u957f\u7684\u4f18\u8d28\u7b14\u8bb0 https://github.com/Zhang-Each/CourseNoteOfZJUSE

    "},{"location":"Other/zju_ling_cs/#ai","title":"AI","text":"

    AI\u8bfe\u4e00\u822c\u6bd4CS\u8bfe\u597d\u9009\uff0c\u4f46\u662f\u5982\u679c\u9009\u4e0d\u4e0a\u4e5f\u8bf7\u9075\u7167\u4e0a\u6761\u4e2d\u7684\u5efa\u8bae\u3002 \u975e\u5fc5\u8981\u4e0d\u9009AI\u8bfe\uff0cAI\u8bfe\u6700\u5927\u7684\u6536\u83b7\u662f\u5728\u7b80\u5386\u4e0a\u4f5c\u4e3a\u4e00\u4e2a90+\u8bfe\u7a0b\u51fa\u73b0\uff0c\u57fa\u672c\u5b66\u4e0d\u5230\u4e1c\u897f\uff08\u9664\u4e86NLP\u8bfe\u6211\u611f\u89c9\u542c\u8bfe\u6536\u83b7\u633a\u5927\u7684\uff09\uff0c\u4e3b\u8981\u9760\u81ea\u5b66\u540e\u5377\u51fa\u5927\u4f5c\u4e1a\u3002

    "},{"location":"Other/zju_ling_cs/#_8","title":"\u8bed\u8a00\u5b66","text":"

    \u56e0\u4e3a\u82f1\u4e13\u57f9\u517b\u65b9\u6848\u8fd8\u662f\u8981\u6c42\u4fee\u5927\u91cf\u4e13\u4e1a\u8bfe\u7684\uff0c\u611f\u89c9\u53ef\u4ee5\u5c3d\u91cf\u628a\u8bed\u8a00\u5b66\u6a21\u5757\u591a\u4fee\u4e00\u70b9\uff0c\u6709\u4e9b\u5728\u8fdb\u7ec4\u7684\u65f6\u5019\u53ef\u80fd\u8fd8\u662f\u8ba4\u53ef\u7684\u3002 \u4ee5\u4e0b\u8bfe\u7a0b\u5982\u679c\u62ff\u4e86\u9ad8\u5206\u503c\u5f97\u5728\u7b80\u5386\u4e0a\u4e00\u63d0 - \u5f53\u4ee3\u8bed\u8a00\u5b66 - \u8bed\u97f3\u5b66 - \u53e5\u6cd5\u5b66 - \u5fc3\u7406\u8bed\u8a00\u5b66 - \u8bed\u4e49\u5b66 - \u8bed\u7528\u5b66 - \u8bed\u6599\u5e93\u8bed\u8a00\u5b66

    "},{"location":"Other/zju_ling_cs/#_9","title":"\u6570\u5b66","text":"

    \u5bf9\u4e8ePhD\u3001\u627e\u5de5\u548c\u56fd\u5185\u76f4\u535a\uff1a \u53ef\u80fd\u4e0d\u9700\u8981\u6570\u5b66\u3002\u3002\u3002\u8ba4\u4e3a\u6700\u597d\u4e0d\u8981\u989d\u5916\u9009\u6570\u5b66\u8bfe \u6211\u81f3\u4eca\u9047\u5230\u7684\u8001\u5e08\u6ca1\u6709\u56e0\u4e3a\u6211\u7b80\u5386\u4e0a\u4efb\u4f55\u6570\u5b66\u76f8\u5173\u7684\u4e1c\u897f\u800c\u5f55\u6211\u6216\u62d2\u6211\u7684\uff0c\u90fd\u662f\u53ea\u95ee\u7f16\u7a0b\u3002 CS\u4e13\u4e1a\u8bfe\u91cc\u7684\u79bb\u6563\u6570\u5b66\u548c\u8ba1\u7b97\u7406\u8bba\uff08\u548c\u53ef\u80fd\u8fd8\u6709\u6570\u903b\uff09\u5df2\u7ecf\u8db3\u591f\u57f9\u517b\u6570\u5b66\u601d\u7ef4\u3002 \u5982\u679c\u62c5\u5fc3\u6570\u636e\u5206\u6790\u548c\u7edf\u8ba1\u6280\u80fd\uff0c\u6587\u6570\u91cc\u636e\u8bf4\u5e94\u7528\u7edf\u8ba1\u5b66\u8fd9\u95e8\u8bfe\u7a0b\u6bd4\u9ad8\u7b49\u6570\u5b66\u597d\u4f7f\uff0c\u8fd8\u6709\u673a\u4f1a\u7684\u540c\u5b66\u53ef\u4ee5\u8bd5\u4e00\u4e0b\u3002

    \u5bf9\u4e8ems\uff1a \u786e\u5b9e\u6709\u4e00\u4e9b\u9879\u76ee\u8981\u6c42\u4fee\u8fc7\u4e00\u4e9b\u6570\u5b66\u8bfe\u7a0b\uff0c\u4f8b\u5982\u521a\u770b\u5230SUTD\u7684ISTD ms\u8981\u6c42\u4e24\u5b66\u671f\u5fae\u79ef\u5206\uff0c\u4e00\u5b66\u671f\u7ebf\u4ee3\u548c\u4e00\u5b66\u671f\u6982\u7edf\uff0c\u8fd9\u79cd\u65e0\u7591\u662f\u6bd4\u8f83\u4e0d\u53cb\u597d\u7684\u9879\u76ee\u4e86\u3002 \u4e5f\u6709\u6bd4\u8f83\u53cb\u597d\u7684\u9879\u76ee\uff0c\u5317\u7f8e\u4e00\u4e9b0\u57fa\u7840\u8f6c\u7801\u9879\u76ee\u53ef\u53c2\u7167OpenCSapp\uff0c\u82f1\u56fd\u7684IC\u548cUCL\u5728\u524d\u5e74\u4e5f\u5f00\u4e86\u96f6\u57fa\u7840\u8f6c\u7801\u9879\u76ee\uff0c\u4e0d\u8fc7\u51fa\u8def\u548c\u542b\u91d1\u91cf\u9700\u8981\u81ea\u5df1\u8861\u91cf\uff0c\u8fd8\u662f\u5efa\u8bae\u201c\u54a8\u8be220\u4e2a\u4eba\u201d\u51c6\u5219\u3002\u4ee3\u8868dp\u662f18\u7ea7SJTU\u82f1\u8bed\u4e13\u4e1a\uff0c4\u6bb5\u79d1\u7814\u6216\u4e92\u8054\u7f51\u5382NLP\u4ea7\u54c1\u5b9e\u4e60\uff0c\u5c11\u91cf\u9ad8\u5206\u6570\u5b66\u548c\u7f16\u7a0b\u8bfe\u7a0b\uff0c\u7ee9\u70b990+ \u2192 IC CS ms

    "},{"location":"Other/zju_ling_cs/#_10","title":"\u7ee9\u70b9","text":""},{"location":"Other/zju_ling_cs/#_11","title":"\u79d1\u7814","text":""},{"location":"Other/zju_ling_cs/#nlp_1","title":"\u5982\u4f55\u9009\u9898\uff1fNLP\u6709\u54ea\u4e9b\u65b9\u5411\u53ef\u505a\uff1f","text":"

    \u53c2\u7167\u8fd9\u4e9b\u9876\u4f1a\u90fd\u6709\u4ec0\u4e48track\uff0c\u4e0b\u9762\u662f\u6700\u8fd1\u4e00\u671f\u6bcf\u4e2atrack\u7684best paper - Best Papers - ACL 2023 (aclweb.org) - Best Paper Awards - emnlp 2022 (balhafni.github.io) - Transactions of the Association for Computational Linguistics (transacl.org) - Announcing the NAACL 2022 Best Paper Awards! - NAACL-HLT 2022

    \u7279\u522b\u5730\uff0c\u60f3\u5230NLP\u91cc\u6bd4\u8f83\u7eaf\u8bed\u8a00\u5b66\u7684\u4e3b\u9898/\u65b9\u6cd5\u4e5f\u6709\u4e00\u4e9b\uff0c\u6709\u5982\u4e0b\u51e0\u4e2a \u4e3a\u4ec0\u4e48\u8981\u8bb2\u8fd9\u4e00\u5757\u56e0\u4e3a\u62c5\u5fc3\u4f60\u5728\u9762\u8bd5\u7684\u65f6\u5019\u4f1a\u9700\u8981\u5411\u8001\u5e08\u8bc1\u660e\u4f60\u7684\u53e6\u4e00\u90e8\u5206\u4e13\u4e1a\u77e5\u8bc6\u4e5f\u662f\u6709\u7528\u7684 \u4e00\u822c\u6b27\u6d32\u7684NLP\u4f1a\u504f\u8bed\u8a00\u5b66\u4e00\u70b9 - \u5b9e\u9a8c\u8bed\u97f3\u548c\u97f3\u7cfb\u5b66 - \u7528\u8bed\u8a00\u5b66\u77e5\u8bc6\u505a\u6570\u636e\u548c\u6570\u636e\u589e\u5f3a - AI\u4e2d\u7684\u4f26\u7406\u9053\u5fb7\u95ee\u9898 - \u7a00\u6709\u8bed\u8a00\u6316\u6398

    "},{"location":"Other/zju_ling_cs/#_12","title":"\u5982\u4f55\u9009\u5bfc\uff1f","text":"

    \u56fd\u5916\u5bfc\u5e08\uff1a\u5e38\u8bfb\u6bcf\u5e74\u7684\u9876\u4f1a\u6709\u610f\u601d\u8bba\u6587\uff0c\u5e76\u53c2\u7167CSRankings: Computer Science Rankings\uff0c\u5173\u6ce8\u5b66\u672f\u5708\u517b\u597d\u53f7\u540e\u5e38\u5237Twitter \u56fd\u5185\u6821\u5185\u5bfc\u5e08\uff1a\u5982\u679c\u6709\u60f3\u8be2\u95ee\u7684\u5bfc\u5e08\u540d\u5355\u53ef\u4ee5\u90ae\u4ef6\u95ee\u6211 \u9009\u5bfc\u6216\u8005\u8054\u7cfbPhD\u7684\u65f6\u5019\u5982\u679c\u63a5\u5230\u7684\u4efb\u52a1\u662f\u4e8c\u4f5c\u4e09\u4f5c\u5f80\u540e\uff0c\u5f88\u53ef\u80fd\u662f\u6253\u767d\u5de5\uff0c\u57fa\u672c\u53ef\u4ee5\u62d2\u7edd\u3002\u9664\u975e\u4f60\u8ba4\u4e3a\u4f60\u627f\u62c5\u7684\u5de5\u4f5c\u8f83\u4e3a\u91cd\u8981\uff0c\u8001\u5e08\u53ef\u4ee5\u7ed9\u4f60\u63a8\u8350\u4fe1\uff0c\u4e8c\u4f5c\u4e09\u4f5c\u7684\u4f5c\u7528\u53ef\u80fd\u6ca1\u6709\u63a8\u8350\u4fe1\u5927\u3002 \u5982\u679c\u7533\u8bf7PhD\uff0c\u63a8\u8350\u4fe1\u7684\u529b\u5ea6\uff1a\u4f60\u4e0e\u63a8\u8350\u4eba\u7684\u4ea7\u51fa\u5f88\u91cd\u8981+\u76ee\u6807PhD\u5bfc\u8ba4\u8bc6\u7684\u4eba > \u4f60\u4e0e\u63a8\u8350\u4eba\u7684\u4ea7\u51fa\u5f88\u91cd\u8981+\u76ee\u6807PhD\u5bfc\u4e0d\u8ba4\u8bc6\u7684\u4eba > \u5176\u5b83

    "},{"location":"Other/zju_ling_cs/#_13","title":"\u7533\u8bf7","text":"

    \u56e0\u4e3a\u4fdd\u7814\u548c\u627e\u5de5\u6211\u786e\u5b9e\u4e0d\u61c2\uff0c\u8fd9\u91cc\u6682\u65f6\u53ea\u5199\u7533\u8bf7\u4e86\u3002\u540e\u7eed\u6709\u8bf7\u5171\u540c\u4f5c\u8005\u6269\u5c55\u5185\u5bb9\u7684\u8ba1\u5212\uff0c\u5982\u613f\u610f\u8d21\u732e\u8bf7\u8054\u7cfb\u6211\u3002

    "},{"location":"Other/zju_ling_cs/#check-point","title":"Check Point","text":"

    \u5927\u4e00\u6691\u5047\u7ed3\u675f\u65f6\uff1a\u4e13\u5fc3\u5b66\u4e13\u4e1a\u8bfe \u5927\u4e8c\u6691\u5047\u7ed3\u675f\u65f6\uff1a\u8fdb\u7ec4\uff0c\u5b66\u4f1apytorch\uff0c\u8bad\u8fc7\u4e00\u4e9b\u5e38\u7528\u7684\u6a21\u578b \u5927\u4e09\u6691\u5047\u7ed3\u675f\u65f6\uff1a\u4ea7\u51fa\u4e00\u4f5c\u6216\u5171\u4e00\u8bba\u6587

    "},{"location":"Other/zju_ling_cs/#_14","title":"\u6211\u8981\u4e0d\u8981\u627e\u4e2d\u4ecb\uff1f","text":"

    \u4e0d\u8981\u3002 \u539f\u56e0\u4e00\uff1aCS\u7684\u5728\u7ebf\u514d\u8d39\u8d44\u6599\u8db3\u591f\u4f7f\u7528 \u539f\u56e0\u4e8c\uff1a\u4e2d\u4ecb\u7684\u4fe1\u606f\u66f4\u65b0\u901f\u5ea6\u8d76\u4e0d\u4e0aCS\u5b66\u79d1\u7684\u53d1\u5c55\u901f\u5ea6

    "},{"location":"Other/zju_ling_cs/#_15","title":"\u6211\u7533\u8bf7\u53ef\u4ee5\u53c2\u8003\u54ea\u4e9b\u8d44\u6599\uff1f","text":"

    \u7533\u8bf7MS - \u5317\u7f8e\u7684CS master Home - Open CS Application - \u9664\u5317\u7f8e\u5916\u7684\u5176\u5b83CS master Global CS (global-cs-application.github.io) - \u4e00\u4ea9\u4e09\u5206\u5730/\u5bc4\u6258\u5bb6\u56ed\u7b49\u8bba\u575b - CC98\u4e0a\u6bcf\u4e00\u5e74CS\u7684\u98de\u8dc3\u624b\u518c

    \u7533\u8bf7PhD - \u6b27\u7f8eNLP\u5708\u5bf9PhD\u7533\u8bf7\u7684\u5efa\u8bae https://github.com/zhijing-jin/nlp-phd-global-equality - \u4e86\u89e3\u5b66\u79d1\u4f18\u52bf\u5b66\u6821\u548c\u5bfc\u5e08 CSRankings: Computer Science Rankings - \u6ce8\u518c\u4e00\u4e2aTwitter\u8d26\u53f7\uff0c\u5f00\u59cb\u5173\u6ce8NLP\u5708\u7684PhD\u548cAP\uff0c\u5404\u79cd\u7533\u8bf7\u673a\u4f1a\u4ed6\u4eec\u90fd\u4f1a\u5c3d\u5feb\u53d1\u5e03\u7684\u3002\u6bd4\u5982\u4f60\u53ef\u4ee5\u5148\u4eceAndrew Ng\u3001Christopher Manning\u3001Geoffrey Hinton\u8fd9\u79cd\u8001\u6559\u6388\u5173\u6ce8\u8d77\uff0c\u7136\u540e\u5173\u6ce8\u4ed6\u4eec\u7684\u5173\u6ce8\u8fd9\u6837\u6765\u641e\u3002 - \u5173\u6ce8\u4e00\u4ea9\u4e09\u5206\u5730/CC98/\u4e00\u4e9b\u5fae\u4fe1\u516c\u4f17\u53f7/\u77e5\u4e4e\u7684\u62db\u751f\u4fe1\u606f

    "},{"location":"Other/zju_ling_cs/#_16","title":"\u6295\u9012\u6691\u7814\u6ce8\u610f\u4e8b\u9879","text":"

    \u6d41\u7a0b\u540c\u7533\u8bf7PhD \u5df2\u7ecf\u719f\u8bc6\u7684\u5bfc\u5e08\u63a8\u8350\u662f\u6700\u5feb\u7684\uff1b\u5426\u5219\u5c31\u81ea\u5df1\u6d77\u6295\uff0c\u6295\u53d1\u5e03\u8fc7\u62db\u751f\u5e7f\u544a\u6216\u4e3b\u9875\u8868\u660e\u6b63\u5728\u62db\u751f\u7684\u8001\u5e08\u662f\u6700\u5feb\u7684\u3002\u6709\u7684\u65f6\u5019\u53ef\u4ee5\u5c1d\u8bd5\u6295\u8ba4\u8bc6\u7684PhD\uff0c\u56e0\u4e3a\u6691\u7814\u671f\u95f4\u5927\u90e8\u5206\u60c5\u51b5\u8fd8\u662f\u8ddf\u7740PhD\u6253\u5de5\u3002 \u5982\u679c\u8001\u5e08\u7ed9\u4f60\u7684\u8d23\u4efb\u6bd4\u8f83\u91cd\uff0c\u4e14\u4f60\u6709\u6bd4\u8f83\u597d\u7684\u5de5\u4f5c\u73af\u5883\uff0c\u6211\u8ba4\u4e3a\u7ebf\u4e0a\u7ebf\u4e0b\u533a\u522b\u4e0d\u5927\u3002 \u60f3\u53bb\u5317\u7f8e\u5c31\u5957\u5317\u7f8e\uff0c\u6211\u89c9\u5f97\u6700\u597d\u4e0d\u8981\u627e\u8df3\u677f\uff0c\u6709\u5317\u7f8e\u7684\u7ebf\u4e0a\u6691\u7814\u4e5f\u5f88\u597d\uff0c\u53ea\u8981\u662f\u4f60\u4e00\u4f5c\uff0c\u65f6\u957f6\u4e2a\u6708\u4ee5\u4e0a\uff0c\u6bcf\u5468\u6c47\u62a5\u8fdb\u5ea6\u3002

    "},{"location":"Other/zju_ling_cs/#_17","title":"\u6295\u9012\u5b9e\u4e60\u6ce8\u610f\u4e8b\u9879","text":"

    \u9700\u8981\u5b9e\u4e60 iff \u4f60\u6253\u7b97\u627e\u5de5or\u8bfb\u5b8c\u7855\u58eb\u627e\u5de5\uff0c\u7533\u8bf7\u5b66\u672f\u7c7bms\u548cPhD\u7684\u8bdd\uff0c\u5b9e\u4e60\u4e0d\u5f3a\u6c42\u3002

    "},{"location":"Other/zju_ling_cs/#-xuan-insrgithubio","title":"- \ud83c\udff3\ufe0f\u200d\ud83c\udf08 \u603b\u89c8 - \u54b8\u9c7c\u6684\u7684\u4ee3\u7801\u7a7a\u95f4 (xuan-insr.github.io) \u627e\u6691\u671f\u5b9e\u4e60\u548c\u79cb\u62db\u7684\u7ecf\u9a8c\u5e16","text":"

    http://www-cc98-org-s.webvpn.zju.edu.cn:8001/topic/4950730

    "},{"location":"Other/zju_ling_cs/#_18","title":"\u5173\u4e8e\u7b14\u8005&\u8054\u7cfb\u7b14\u8005","text":"

    \u7b14\u8005\u4f30\u8ba1\u662f\u4ece\u82f1\u8bed\u4e13\u4e1a\u8f6cNLP\u89c4\u5212\u6700\u4e0d\u987a\u3001\u8fdb\u5ea6\u6700\u66f2\u6298\u7684\u4e00\u4e2a\u3002\u8fd9\u4efd\u6587\u6863\u4e0d\u662f\u4ec0\u4e48\u6210\u529f\u7ecf\u9a8c\u5206\u4eab\uff0c\u6211\u5e76\u4e0d\u6210\u529f\uff0c\u53ea\u662f\u60f3\u628a\u6211\u8e29\u8fc7\u7684\u5751\u544a\u8bc9\u540e\u4eba\uff0c\u5e0c\u671b\u5c11\u6709\u4eba\u91cd\u8e48\u6211\u7684\u8986\u8f99\u3002\u6211\u89c9\u5f97\u6211\u7684\u9ad8\u4e2d\u548c\u672c\u79d1\u8fc7\u5f97\u592a\u574e\u5777\u4e86\uff0c\u771f\u8bda\u5730\u60f3\u5e2e\u52a9\u5b66\u5f1f\u5b66\u59b9\uff0c\u5e0c\u671b\u4f60\u4eec\u4e00\u5207\u987a\u5229\u3002\u8bfb\u8005\u53ef\u4ee5\u4ee5\u6211\u4f5c\u4e3a\u57fa\u51c6\uff0c\u5728\u56db\u5e74\u540e\u4e0d\u80fd\uff08\u5f53\u7136\u5982\u679c\u65e9\u505a\u89c4\u5212\uff0c\u4e00\u76f4\u5728\u52aa\u529b\uff0c\u4e5f\u4e0d\u4f1a\uff09\u6bd4\u6211\u66f4\u5dee\u3002\u6bd5\u7adf\u4e00\u6761\u8def\u8d70\u7684\u4eba\u591a\u4e86\uff0c\u540e\u4eba\u4e00\u5b9a\u662f\u8981\u8d8a\u8d70\u8d8a\u987a\u7684\u3002

    \u5982\u6709\u5efa\u8bae\u6216\u7591\u95ee\u8bf7\u901a\u8fc7\u90ae\u4ef6\u8054\u7cfb\u6211 RuoxiNing@outlook.com\u3002

    "}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 663b2160..e59e9a7f 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,197 +2,207 @@ https://ruoxining.github.io/OBvault/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/libgraphics/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/x86assm/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CA/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CA/chap2/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CA/chap3/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CA/chap5/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CPP/course/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CPP/final_review/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/CPP/templates/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/OS/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/CS/OS/lab/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/DL/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/DL/NLPTheory/explainable_nlp/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/DL/NLPTheory/mwp/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/pol_en_todo/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/pol_zh/ - 2024-02-02 + 2024-02-17 + daily + + + https://ruoxining.github.io/OBvault/Ling/Morphology/ + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Pragmatics/ca_da/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Pragmatics/intro/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Pragmatics/socio/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Pragmatics/theories/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Semantics/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Semantics/ambiguity/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Semantics/definitions/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Semantics/formal_semantics/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Syntax/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Syntax/conv_gen/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Syntax/ud_sud/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Ling/Syntax/uni_gram/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/24fall/ - 2024-02-02 + 2024-02-17 daily - https://ruoxining.github.io/OBvault/Other/apa/ - 2024-02-02 + https://ruoxining.github.io/OBvault/Other/howtocite/ + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/nlp_phd/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/nlp_resources/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/portfolio/ - 2024-02-02 + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/tools/ - 2024-02-02 + 2024-02-17 + daily + + + https://ruoxining.github.io/OBvault/Other/whynote/ + 2024-02-17 daily https://ruoxining.github.io/OBvault/Other/zju_ling_cs/ - 2024-02-02 + 2024-02-17 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 999254a3..83868025 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ