标题：编程语言:原理与范型
内容简介
《编程语言:原理与范型(第2版)》以C、Java、Perl和Python编程语言为范型，介绍了编程语言的原理与设计。全书共有18章，第2～11章介绍了关于语言设计原理的内容，主要讲述编程语言的核心原理：语法、名称、类型、语义和函数等。第12～15章介绍了命令式编程、面向对象编程、函数式编程和逻辑式编程等。第16～18章详细介绍了事件处理、并发性和程序正确性。为了提高读者的上机学习能力，《编程语言:原理与范型(第2版)》为这些原理提供了丰富的应用范例。
编辑推荐
《编程语言:原理与范型(第2版)》是由清华大学出版社出版的。
目录
1 Overview1.1 Principles
1.2 Paradigms
1.3 SpecialTopics
1.4 ABriefHistory
1.5 OnLanguageDesign
1.5.1 DesignConstraints
1.5.2 OutomesandGDals
1.6 CompilersandVirtualMachines
1.7 Summary
Exercises
2 Syntax2.1 Grammars
2.1.1 Backus.NaurForm(BNF)Grammars
2.1.2 Derivations
2.1.3 ParseTrees
2.1.4 AssociativityandPrecedence
2.1.5 AmbigUOUSGrammars
2.2 ExtendedBNF
2.3 SyntaxofaSmallLanguage：Clite
2.3.1 LexicalSyntax
2.3.2 ConcreteSyntax
2.4 CompilersandInterpreters
2.5 LinkingSyntaxandSemantics
2.5.1 AbstractSyntax
2.5.2 AbstractSyntaxTretes
2.5.3 AbstractSyntaxofClite
2.6 Summary
Exercises
3 LexicalandSyntacticAnalysis3.1 ChomskyHierarchy
3.2 LexicalAnalysis
3.2.1 RegularExpressions
3.2.2 FiniteStateAutomata
3.2.3 FromDesigntoCode
3.3 SyntacticAnalysis
3.3.1 PreliminaryDefinitions
3.3.2 RecursiveDescentParsin
3.4 Summary
Exercises
4 Names4.1 SyntacticIssues
4.2 Variables
4.3 Scope
4.4 SymbolTable
4.5 ResolvingReferences
4.6 DynamicScoping
4.7 Visibility
4.8 Overloading
4.9 Lifetime
4.1 0Summary
Exercises
5 Types5.1 TypeErrors
5.2 StaticandDynamicTDyping
5.3 BasicTypes
5.4 NonbasicTypes
5.4.1 Eumerations
5.4.2 Pointers
5.4.3 ArraysandLists
5.4.4 Strings
5.4.5 Structures
5.4.6 VariantRecordsandUnions
5.5 RecursiveDataTypes
5.6 FunctionsasTypes
5.7 TypeEquivalence
5.8 Subtypes
5.9 PolymorphismandGenerics
5.1 0Programmer.DefinedTypes
5.1 1Summary
Exercises
6 TypeSystems6.1 TypeSystemforClite
6.2 ImplicitTypeConversion
6.3 FormalizingtheCliteTYpeSystem
6.4 Summary
Exercises
7 Semantics7.1 Motivation
7.2 ExpressionSemantics
7.2.1 Notation
7.2.2 AssociativityandPrecedence
7.2.3 shoftCircuitEvaluation
7.2.4 TheMeaningofanExpression
7.3 ProgramState
7.4 AssignmentSemantics
7.4.1 MultipleAssignment
7.4.2 AssigrnmentStatementsVS.AssignmentExpressions
7.4.3 CopyVS.ReferenceSemantics
7.5 ControlFlowSemantics
7.5.1 Sequence
7.5.2 Conditionals
7.5.3 Loops
7.5.4 GoToControversy
7.6 Input/OutputSemantics
7.6.1 BasicConcepts
7.6.2 RandomAccessFiles
7.6.3 gOErrorHandlingSemantics
7.7 ExceptionHandingSemantics
7.7.1 StrategiesandDesignIssues
7.7.2 ExceptionHandlinginAda,C++，andJava
7.7.3 ExcepKonsandAssertions
7.8 Summary
Exercises
8 SemanticInterpretation8.1 StateTransformationsandPartialFuncfions
8.2 SemanticsofClite
8.2.1 MeaningofaProgram
8.2.2 StatementSemantics
8.2.3 ExpressionSemantics
8.2.4 ExpressionswithSideEffects
8.3 SemanticswithDynamScTyping
8.4 AFormalTreatmentofSemantics
8.4.1 StateandStateTransformation
8.4.2 DenotationafSemanticsofaProgram
8.4.3 DenotationalSemanticsofStatements
8.4.4 DenotationalSemanticsofExpressions
8.4.5 LimitsofFormalSemanticModels
8.5 Summary
Exercises
9 Functions9.1 BasicTerminology
9.2 FunctionCallandReturn
9.3 Parameters
9.4 ParameterPassingMechanisms
9.4.1 Passbyvalue
9.4.2 PassbyReference
9.4.3 PassbyValue.ResultandResult
9.4.4 PassbyName
9.4.5 ParameterPassinginAda
9.5 ActivationRecords
9.6 RecursiveFunctions
9.7 Run-TimeStack
9.8 Summary
Exercises
10 FunctionImplementation10.1 FunctionDeclarationandCallinClite
10.1.1 ConcreteSyntax
10.1.2 AbstractSyntax
10.2 CompletingtheCliteTypeSystem
10.3 SemanticsofFunctionCallandReturn
10.3.1 Non.VoidFunctions
10.3.2 SideEffectsRevisited
10.4 FormalTreatmentofTypesandSemantics
10.4.1 TypeMapsforClite
10.4.2 FormalizingtheTypeRulesforClite
10.4.3 FormalizingtheSemanticsofClite
10.5 Summary
Exercises
11 MemoryManagement11.1 TheHeap
11.2 ImplementationofDynamicArrays
11.2.1 HeapManagementProblems：Garbage
11.3 GarbageCollection
11.3.1 ReferenceCounting
11.3.2 Mark-Sweep
11.3.3 CopyCollection
11.3.4 ComparisonofStrategies
11.4 Summary
Exercises
12 ImperativeProgramming12.1 WhatMakesaLanguageImperative?
12.2 ProceduralAbstraction
12.3 ExpressionsandAssignment
12.4 LibrarySupportforDataStructures
12.5 ImperativeProgrammingandC
12.5.1 GeneralCharacteristics
12.5.2 Example：Grep
12.5.3 Example：Average
12.5.4 Example：SymbolicDifferentiation
12.6 ImperativeProgrammingandADA
12.6.1 GeneralCharacteristics
12.6.2 Example：Average
12.6.3 Example：MatrixMultiplication
12.7 ImperativeProgrammingandPerl
12.7.1 GeneralCharacteristics
12.7.2 Example：Grep
12.7.3 Example：MailingGrades
12.8 Summary
Exercises
13 Obiect.OrientedProgramming13.1 Prelude：AbstractDataTypes
13.2 TheObjectModel
13.2.1 Classes
13.2.2 VisibilityandInformationHiding
13.2.3 Inheritance
13.2.4 MultipleInheritance
13.2.5 Polymorphism
13.2.6 Templates
13.2.7 AbstractClasses
13.2.8 Interfaces
13.2.9 VirtualMethodTable
13.2.1 0Run-TimeTypeIdentification
13.2.1 1Reflection
13.3 Smalltalk
13.3.1 GeneralCharacte-ristics
13.3.2 Example：Polynomials
13.3.3 Example：ComplexNumbers
13.3.4 Example：BankAccount
13.4 Java
13.4.1 Example：SymbolicDifferentiation
13.4.2 Example：Backtracking
13.5 Pvthon
13.5.1 GeneralCharacteristics
13.5.2 Example：Polynomials
13.5.3 Example：Fractions
13.6 Summary
Exercises
14 FunctionalProgramming14.1 FunctionsandtheLambdaCalculus
14.2 Scheme
14.2.1 Expressions
14.2.2 ExpressionEvaluation
14.2.3 Lists
14.2.4 ElementaryValues
14.2.5 ControlFlow
14.2.6 DefiningFunctions
14.2.7 LetExpressions
14.2.8 Example：SemanticsofClite
14.2.9 Example：SymbolicDifferentiafion
14.2.1 0Example：EightQueens
14.3 Haskell
14.3.1 Introduction
14.3.2 Expressions
14.3.3 ListsandListComprehensions
14.3.4 ElementaryTypesandValues
14.3.5 ControlFlow
14.3.6 Definingfunctions
14.3.7 Tuples
14.3.8 Example：SemanticsofClite
14.3.9 Example：SymbolicDifferentiation
14.3.1 0Example：EightQueens
14.4 Summary
Exercises
15 LogicProgramming15.1 LogicandHornClauses
15.1.1 ResolutionandUnification
15.2 LogicProgramminginProlog
15.2.1 PrologProgramElements
15.2.2 PracticalAspectsofProlog
15.3 PrologExamples
15.3.1 SymbolicDifferentiation
15.3.2 SolvingWordPuzzles
15.3.3 NaturalLanguageProcessing
15.3.4 SemanticsofClite
15.3.5 EightQueensProblem
15.4 Summary
Exercises
16 Event.DrivenProgramming16.1 Event-DrivenControl
16.1.1 ModeZ-View-Controller
16.1.2 EventsinJava
16.1.3 JavaGUIApplications
16.2 EventHandling
16.2.1 MouseClicks
16.2.2 MouseMotion
16.2.3 Buttons
16.2.4 Labels,TextAreas,andTextFields
16.2.5 ComboBoxes
16.3 ThreeExamples
16.3.1 ASimpleGUIInterface
16.3.2 DesigningaJavaApplet
16.3.3 Event.DrivenInteractiveGames
16.4 OtherEvent.DrivenApplications
16.4.1 ATMMachine
16.4.2 HomeSecuritySystem
16.5 Summary
Exercises
17 ConcurrentProgramming17.1 ConcurrencyConcepts
17.1.1 HistoryandDefinitions
17.1.2 ThreadControlandCommunication
17.1.3 RacesandDeadlocks
17.2 SynchronizationStrategies
17.2.1 Semaphores
17.2.2 Monitors
……
18 ProgramCorrectnessA DefinitionofClite
B DiscreteMathReview
……