Week 8
Week 8 – Projects, Optimization
Readings & Due Dates
Read:
TODOs:
- Project Merge Update / Milestone 2 Plan - Due 11:59pm Monday, May 23, 2022
- Quiz 7 - Due 11:59pm Monday, May 23, 2022
Lecture Materials
Lecture 15 (Tue 05/17) Handout
Project Milestone 2
Merges and Planning
At this point, you’ve received some feedback on your pull request from your first milestone of code. Now we have two goals:
- Get everything merged and in reasonably similar styles
- Make sure everything works together, including unintended/unpredictable interactions
This will be your focus for Monday, May 23.
You will:
- Respond to feedback and get your pull request to the point where it can be merged (basically to the satisfaction of the course staff as described in the feedback).
- Read the other features’ pull requests for your compiler, and for each of them, either:
- Describe in a few sentences why your feature and that feature don’t really interact much. Give an example of a program that showcases your feature and theirs without interacting, and justify why it’s representative (that is, why there isn’t some other interesting interaction between your features)
- Identify a place where your features overlap and will need more implementation to make them work together. This might be an opportunity for cool new stuff, or something that’s broken.
- Describe it with a representatitve test case/scenario. This could be a Python program that will have an issue and crash the compiler because the two features were combined, or a novel combination of features that need good behavior. It could also be a UI interaction, a reason libraries won’t work well together, etc.
- Describe what changes you think are needed to make these features work together: What should the new expected output be? What new additions to the compiler are needed to make them work together? Does their design need to change a bit, or does yours? How? Treat this like the first
Manage your time – there’s no official “right” or “wrong” answers here, but at least have a group member spend at 10-15 minutes on each one. Put this analysis in a file called
<your-feature>-conflicts.md
. - Summarize the remaining features you want to add to get to what you consider reasonable functionality for your feature would be. These might be left over from the first week, or obvious next steps (like you only supported a data structure with a fixed size, and needed to generalize that). Add this to the end of your
design.md
as a new section, and give test cases/scenarios to describe your goals.
(1) should be completed by finishing work on your current milestone pull request. (2) and (3) should be submitted as new pull requests.
For reference, here are all the features.
- Compiler A: Bignums
- Compiler A: Built-in libraries
- Compiler A: Closures/first class/anonymous functions
- Compiler A: comprehensions
- Compiler A: Destructuring assignment
- Compiler A: Error reporting
- Compiler A: Fancy calling conventions
- Compiler A: for loops/iterators
- Compiler A: Front-end user interface
- Compiler A: Generics and polymorphism
- Compiler A: I/O, files
- Compiler A: Inheritance
- Compiler A: Lists
- Compiler A: Memory management
- Compiler A: Optimization
- Compiler A: Sets and/or tuples and/or dictionaries
Compiler A: Strings
- Compiler B: Bignums
- Compiler B: Built-in libraries/Modules/FFI
- Compiler B: Closures/first class/anonymous functions
- Compiler B: comprehensions
- Compiler B: Destructuring assignment
- Compiler B: Error reporting
- Compiler B: Fancy calling conventions
- Compiler B: for loops/iterators
- Compiler B: Front-end user interface
- Compiler B: Generics and polymorphism
- Compiler B: I/O, files
- Compiler B: Inheritance
- Compiler B: Lists
- Compiler B: Memory management
- Compiler B: Optimization
- Compiler B: Sets and/or tuples and/or dictionaries
- Compiler B: Strings
(Testing group – take the time to come up with combinations you think are likely to break! You don’t have to do all 16 * 16 combinations, but use your judgment to find interesting intersections.)
ChocoPy
If you’re working on ChocoPy, instead answer the following questions and submit your updated code at this new milestone. Put the answers in a README.md
along with your code in the Gradescope submission.
- Which features had interactions that you didn’t expect before you started implementing?
- What feature are you most proud of in your implementation and why?
- What features remain to implement?
- Is there anything you’re stuck on?
- Consider programs that work in Python, but not in ChocoPy, involving strings or lists. Pick one that you think would be a straightforward extension to your compiler – describe how you would implement it. Pick one that you think would be an extremely difficult extension to your compiler – describe why.