CS 307: Lecture Notes


Copyright © 2000 by Gordon S. Novak Jr.

Permission is granted for individuals to make copies of these notes for personal use, or for instructors to make copies for classroom use.

Index

19. What is a Computer?

20. What is Computation?

21. What is Programming?

22. What is a Programming Language?

23. What is Computer Science?

24. Algorithms

25. Theory

26. Computer Systems

27. Computer Networks

28. Computer Architecture

29. Computer Languages

30. Artificial Intelligence

31. Software Engineering

32. Numerical Analysis

33. History of Lisp

34. Advantages of Lisp

35. Lisp Interaction

36. Binary Numbers

37. Combinations

38. Names

39. Identifiers

40. Style: Mnemonic Identifiers

41. Data Type

42. Integer and Rational Data Types

43. Real Data Type

44. Inexact Numbers

45. Evaluation

46. IF Statement

47. Special Forms

48. Predicates

49. Logical Operator: and

50. Logical Operators

51. Condition Testing

52. Examples of cond

53. Recursion

54. Execution of Functions

55. Recursive Execution

56. Recursive Function Execution

57. Recursive Execution ...

58. Recursive Execution ...

59. Bindings are Stacked

60. Style: Bomb-proof Code

61. Style: Comments

62. Executing Multiple Statements

63. Use of begin

64. Recursion in Lisp

65. Designing Recursive Functions

66. Design Pattern for Recursive Functions

67. Auxiliary Function for Recursion

68. Recursion with Auxiliary Function

69. Design Pattern for Auxiliary Function

70. Tail Recursion

71. Tail Recursion Trace

72. Recursion: Stopping Criterion

73. The let Construct

74. Example of let

75. Always Use let

76. The let* Construct

77. let* vs. let

78. Lexical Scoping

79. Global Variables

80. Changing Values: set!

81. Iteration

82. dotimes

83. Recursion vs. Iteration

84. Performance

85. Fibonacci Timing

86. while

87. Simple Loops using while

88. Loops using while

89. do Construct

90. Simple Loops using do

91. sqrt using do

92. The case Expression

93. Symbols

94. Quotation

95. Constructing Lists

96. Extracting Parts of Lists

97. Combinations of car and cdr

98. Constructing List Structure

99. Internal Representation of List Structure

100. Drawing Box Diagrams of List Structure

101. Diagrams of List Structure

102. List Manipulation Functions

103. Predicates

104. Rules for using Equality Predicates

105. Stepping Down a List

106. Design Pattern: Recursion on List

107. Example: Last Pair in a List

108. Design Pattern: Tail Recursion on List

109. More Examples

110. Iterative Implementations of length

111. Building Lists Incrementally

112. Implementation of append

113. Peano Revisited

114. Implementation of reverse

115. Membership Testing

116. Implementation of member

117. Association Lists

118. Implementation of assoc

119. Bombproof Code

120. Declarative Representation

121. Other List Functions

122. dolist Macro

123. Sets

124. Set Notation and Operations

125. Sets in Lisp

126. Tail-Recursive intersection

127. Union of Sets

128. Set Difference

129. subset?

130. subset

131. every

132. some

133. Binary Tree Recursion

134. Design Pattern: Binary Tree Recursion

135. Design Pattern: Nested Tree Recursion

136. Nested Tree Recursion: fringe

137. Substitution

138. More Efficient subst

139. sublis does Multiple Substitutions

140. More Efficient sublis

141. Using sublis to Write Code

144. Pattern Matching

145. Pattern Matching

146. Rules for Pattern Matching

147. Equality vs. Matching

148. Variable Test

149. Recognition by Matching

150. Transformation by Patterns

151. Example Transformation

152. Uses of Pattern Matching

153. Remaining Issues in Pattern Matching

154. Requesting Evaluation

155. Apply

156. Mapping: map and foreach

157. Lambda Functions

158. Vectors

159. Vector Functions

160. Access to Vectors

161. Other Vector Functions

162. Characters

163. Character Functions

164. Character Manipulation

165. Strings

166. String Functions

167. Access to Strings

168. String Comparison

169. String Manipulation

170. String Manipulation ...

171. substring

172. Example: Caesar Cipher

173. Use of Caesar Cipher

174. Destructive Operations on Lists

175. nconc

176. Use of nconc

177. nconc can be Dangerous

178. nreverse

179. Use of nreverse

180. Object-Oriented Programming

181. Terminology

182. How OOP Works

183. Conventions

184. class

185. Implementation of OOP

186. send

187. Input / Output

188. I/O Ports

189. Streams

190. Other Programming Languages

191. Variable Types

192. Variable Declarations

193. Constant Declarations

194. Expressions

195. Function Calls

196. Array References

197. begin Statement

198. if Statement

199. Iteration Statement

200. while - do Statement

201. case Statement

202. Enumeration Types

203. Subrange

204. Records

205. Pointers

206. Access to Fields of Records

207. Creating Records

208. Program Structure

209. The graph1 Example

210. graph1 in Pascal

211. graph1 in C++

212. graph1 in Java

213. The factorial Example

214. Parameter Passing

215. Macros

216. Example Macro

217. Uses of Macros

218. Quasiquote

219. Variable Argument Lists

220. Top-down Design

221. Lisp Written in Lisp

222. Evaluation

223. apply

224. Environment and Variable Evaluation

225. Evaluation of let Special Form

226. Evaluation of Special Forms

227. Example of Evaluation

228. Implementation of cons

229. Garbage Collection

230. Mark-And-Sweep Garbage Collection

231. Mark-And-Sweep ...

232. Copying Garbage Collection

233. Reference Counting

234. Reference Counting ...

235. The Bottom Line: cons Is Expensive

236. The Lisp Reader

237. Lisp Reader Implementation

238. Testing Lisp Reader

239. Examples Using Lisp Reader

240. Lisp Data Type Coding

241. Lisp Compilation

242. Greenspun's Tenth Rule of Programming

CS 307