《程式語言:原理與范型(第2版)》以C、Java、Perl和Python程式語言為范型,通過套用實例介紹了程式語言的原理與設計。
《程式語言:原理與范型(第2版)》以C、Java、Perl和Python程式語言為范型,介紹了程式語言的原理與設計。全書共有18章,第2~11章介紹了關於語言設計原理的內容,主要講述程式語言的核心原理:語法、名稱、類型、語義和函式等。第12~15章介紹了命令式編程、面向對象編程、函式式編程和邏輯式編程等。第16~18章詳細介紹了事件處理、並發性和程式正確性。
基本介紹
- 書名:程式語言:原理與范型
- 作者:(美國)塔克 努南
- ISBN:9787302198062
- 類別:計算機語言
- 頁數:590 頁
- 定價:59.00元
- 出版社:清華大學出版社
- 出版時間:2009年
- 裝幀:平裝
- 開本:16開
內容簡介,編輯推薦,目錄,Overview,Syntax,LexicalandSyntacticAnalysis,Names,Types,TypeSystems,Semantics,SemanticInterpretation,Functions,FunctionImplementation,MemoryManagement,ImperativeProgramming,Obiect.OrientedProgramming,FunctionalProgramming,LogicProgramming,Event.DrivenProgramming,ConcurrentProgramming,ProgramCorrectness,
內容簡介
《程式語言:原理與范型(第2版)》以C、Java、Perl和Python程式語言為范型,介紹了程式語言的原理與設計。全書共有18章,第2~11章介紹了關於語言設計原理的內容,主要講述程式語言的核心原理:語法、名稱、類型、語義和函式等。第12~15章介紹了命令式編程、面向對象編程、函式式編程和邏輯式編程等。第16~18章詳細介紹了事件處理、並發性和程式正確性。為了提高讀者的上機學習能力,《程式語言:原理與范型(第2版)》為這些原理提供了豐富的套用範例。
編輯推薦
《程式語言:原理與范型(第2版)》是由清華大學出版社出版的。
目錄
Overview
1.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
Syntax
2.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
LexicalandSyntacticAnalysis
3.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
Names
4.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
Types
5.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
TypeSystems
6.1 TypeSystemforClite
6.2 ImplicitTypeConversion
6.3 FormalizingtheCliteTYpeSystem
6.4 Summary
Exercises
Semantics
7.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
SemanticInterpretation
8.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
Functions
9.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
FunctionImplementation
10.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
MemoryManagement
11.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
ImperativeProgramming
12.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
Obiect.OrientedProgramming
13.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
FunctionalProgramming
14.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
LogicProgramming
15.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
Event.DrivenProgramming
16.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
ConcurrentProgramming
17.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
……
ProgramCorrectness
A DefinitionofClite
B DiscreteMathReview
……