CS 394P: Automatic Programming: Lecture Notes
Copyright © 2005 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.
Note: Many of these pages use math symbols such as: &forall &exist .
Microsoft Internet Explorer will not display the math symbols, but
Netscape or
Mozilla will.
1. CS 394P \\
2. Automatic Programming
3. Need for Automatic Programming
4. Strategies for AI
5. Problems with Programming Languages
6. Goals of the Course
7. Companies
8. People in Austin
9. Overview
10. Abstract Syntax Tree
11. Substitution and Pattern Matching
12. Binding Lists
13. Substitution
14. Copying and Substitution Functions
15. Program Transformation
16. Rewriting: Program vs. Pattern Matching
17. Transformation Process
18. Pattern Matching
19. Rules for Pattern Matching
20. Equality vs. Matching
21. Equality vs. Matching
22. Matching and Substitution
23. Dot Matching
24. More Complex Rules
25. Transformation
26. Building on Transformation
27. Pattern Matching
28. TRANS
29. CPR
30. Correctness of Transformations
31. Top-Down Context
32. Side Effects
33. Uses of Transformations
34. Optimization by Transformation
35. Specialization by Transformation
36. Loop Expansion
37. Advantages of Expansion
38. Language Translation by Transformation
39. Example of Language Translation
40. Knuth-Bendix Algorithm
41. Pattern Optimization Examples
42. Examples ...
43. Examples ...
44. Examples ...
45. .
46. .
47. .
48. .
49. Optimization
50. Correctness of Optimization
51. Local and Global Optimization
52. Optimization and Automatic Programming
53. Some Optimization Techniques
54. Program Analysis
55. Basic Block
56. Finding Basic Blocks
57. Relations and Graphs
58. Graph Notations
59. Bit Vector Representations
60. Boolean Matrix Representation of Graph
61. Dominators
62. Intervals
63. Intervals and Derived Graphs
64. Definition and Reference of Variables
65. Data Flow Analysis for a Block
66. Availability of Expressions
67. Data Flow Analysis for an Interval
68. Dual Assumptions
69. Solving Equations for Derived Graph
70. Busy Variables
71. Variable Uses and Register Assignment
72. Register Allocation by Graph Coloring
73. Overview of Global Optimization
74. Global Optimization and Automatic Programming
75. Loop Transformations
76. Strip Mining
77. Induction Variable Transformation
78. Finite Differencing
79. Example: Computing Squares
80. General Case
81. Finite Differencing for Set Operations
82. Memoization
83. Code Expansion
84. Macros
85. Loop Unrolling
86. Loop Unrolling in Lisp
87. Function Inlining
88. Partial Evaluation
89. Interpretation
90. Partial Evaluation
91. Example
92. Simple Partial Evaluator
93. Simple Partial Evaluator...
94. Examples
95. Examples
96. Binding-Time Analysis
97. Futamura Projections
98. Generating Extension
99. Parameterized Programs
100. Representation Independence
101. Improvements of Partial Evaluation
102. Improvements ...
103. Partial Evaluation: Matrix
104. Code Expansion with Partial Evaluation
105. Partial Evaluation: Interpreter
106. Specialization
107. Partial Evaluation in OOP
108. Partial Evaluation in Automatic Programming
109. Object-oriented Programming
110. Type Checking
111. Static Type Checking
112. Dynamic Type Checking
113. Generic Functions
114. Object-oriented Programming
115. Access to Objects
116. Internal Implementation is Hidden
117. Encapsulation with OOP
118. Object-oriented Programming Terminology
119. Terminology ...
120. Message Sending
121. Method Lookup
122. Invoking Evaluation Explicitly
123. APPLY and FUNCALL
124. When to Use EVAL, APPLY, FUNCALL
125. FUNCALL Can Save CONSes
126. LAMBDA Expressions
127. Property List Representation
128. Property Lists
129. CLOS Example: ship
130. A Simple OOP System
131. Defining a Class
132. Class Implementation
133. Instance Implementation
134. Creating an Instance
135. Creation of an Instance
136. Getting and Storing Data
137. Defining Methods
138. Implementing Method Definition
139. Associating Selector and Method
140. Sending Messages
141. Implementing Message Sending
142. Extending the Class System
143. {\tt oops} System
144. Making Instances
145. Slot Values
146. Defining Methods
147. Sending Messages
148. Smalltalk
149. ThingLab
150. ThingLab Examples
151. OOP and Automatic Programming
152. Good Features of OOP
153. Unfortunate Features of OOP
154. Improving OOP Efficiency
155. Why OOP Is Not Enough
156. Top Ten Lies About OOP
157. Aspect-Oriented Programming
158. Aspect Weaving
159. Glisp
160. Data Structure Descriptions
161. Reference to Substructures
162. glispobjects
163. Message List
164. Language Features
165. For Loop
166. Inheritance
167. Operator Overloading
168. Recursive Expansion
169. Writing Generic Procedures
170. Generics and Views
171. Views
173. Views as Isomorphisms
174. Requirements of Views
175. Specifying a View
179. Notes on Pipe Example
180. Making Views
181. Data Structure Views: VIEWAS
184. Mathematical Views: MKV
185. Line Segment
186. Example of Line Segment View
187. Line Segment Data Conversion
188. Advantages of Graphical Correspondences
189. MKV: Incremental Equation Solving
190. Basis Variables and Equations
191. Equation Solving
192. Basis Variable and Equations
193. Variable Dependency Graph
194. Reuse through View
195. Storing Basis Variables
196. Data Translation through Views
197. VIP: Programming by Graphical Connections
198. Calculation of the Mass of the Sun
199. Aircraft Position from Radar Data
200. Aircraft Position Program
201. Aircraft Position Program in C
202. Language Translation
203. Automatic Programming Server
204. Automatic Programming Server
205. APS: Example
206. GPS: Component Programming
207. A Simple Program
208. Program Components
209. Substitution Test
210. Generic Software Components
211. Generic Component: Views
212. Generic Component: Views ...
213. Program Representation
214. Component Specification
215. Inference and Propagation
216. Type Propagation Example
217. Modifying Properties
218. Partial Evaluation
219. Updating a {\tt sum}
220. Generic Iterate-Accumulate
221. C Example
222. Software Reuse
223. Krueger's Survey of Software Reuse
224. Software Reuse
225. Evaluation of Reuse Approaches
226. Abstraction
227. Minimizing Cognitive Distance
228. High-level Languages
229. Design and Code Scavenging
230. Source Code Components
231. Software Schemas
232. Application Generators
233. Very-high-level Languages
234. Transformational Systems
235. Software Architectures
236. Krueger's Truisms of Software Reuse
237. V and Refine
238. Form of Rules
239. Refinements: Logic to Code
240. KIDS
241. KIDS Specifications
242. Example: $n$ Queens
243. Global Search Theory
244. Goguen: Theory
245. `View' as used by Goguen
246. Deductive Composition of Astronomical
247. Difficulty of Programming
248. SNARK Theorem Prover
249. Astronomical Domain
250. Problem Difficulty
251. Where is the shadow of Io on Jupiter?
252. Shadow of Io Theorem
253. Shadow of Io Program
254. Theorem Proving
255. Result of Ordering
256. Set-of-Support
257. Performance
258. Automated Software Synthesis:
259. Degrees of Freedom
260. Example
261. Approach
262. Skeletal Plan Fragment Generation
263. Example
264. Example ...
265. Plan Fragment Elaboration
CS 394P