MCA Agenda: rPeANUt (III), PeANUt Assignments 1 & 2 Assignment

MCA Agenda: rPeANUt (III), PeANUt
Assignment 1 Image Gallery
● 10:05 fielding of your questions from week 7 & 8’s RL’s (answer if can be done
quickly)
● 10:08 handout papers for Quiz 6/7
● 10:10 answer Quiz 6/7 (note: you must put your name and number on both sides!)
1. sierpinski gasket (2300)
1. transposed circle (6300)
3. graded pattern (6300)
4. pacman (6300)
● 10:20 collect Quiz 6/7
● 10:23 go through answers for Quiz 6/7
● 10:25 answering of earlier fielded questions
● 10:30 Assignment 1: overall feedback
● 10:35 Assignment 2: introduction
● 10:40 in-class activity
5. sine graph (2300, not shown).
Note: in all cases, genImage.c code was compact.
2015 ◭◭ ◭ • ◮ ◮◮ ×
COMP2300 MCA: rPeANUt (III), PeANUt
1
Assignments 1 & 2
2015 ◭◭ ◭ • ◮ ◮◮ ×
3
In-class Activity: Translate the following code into PeANUt
★ ❞❡❢✐♥❡ ◆ ✽
✐♥t ✐ ✱ ❆ ❬ ◆ ❪ ✱ s✉♠ ❂ ✵❀
❢♦r ✭ ✐ ❂ ✵❀ ✐ < ◆ ❀ ✐ ✰✰✮ {
s✉♠ ❂ s✉♠ ✰ ❆ ❬ ✐ ❪❀
● Assignment 1
}
■ overall class results: histogram
◆ common issues
◆ scores for transpose2 tests (/7)
3.5 4.0 4.5 5.0 5.5 6.0
15
9
2
6
3 14
Bonus tests passed: 1:18 2:42
COMP2300 MCA: rPeANUt (III), PeANUt
Some generic PeANUt instructions:
6.5
20
① ✿ ❜❧♦❝❦
② ✿ ❜❧♦❝❦
❱❂ −✶
❧♦❛❞
❧♦❛❞
❛❞❞
❛❞❞
❛❞❞
st♦r❡
❝♠♣
❜❧❡
7.0
0
■ corner case: detection of overflow of malloc size (230 ≤ n < 231)
■ interesting images
● Assignment 2:
■ go over what’s involved
■ ‘short macros’ and other rPeANUt issues
❥✉♠♣
✶
✹
❀
❀
❀
① ❀
∗② ❀
★✹ ❀
① ❀
∗② ❀
① ❀
★✵ ❀
❧❛❜ ❀
❀
❧❛❜ ❀
✐♥t ① ❀
✐♥t ② ❬✹❪
★ ❞❡❢✐♥❡ ❱ −✶
❆❈ ❂ ♠❡♠ ❬ ① ❪
❆❈ ❂ ♠❡♠ ❬ ② ✰ ❳❘ ❪
❆❈ ❂ ❆❈ ✰ ✹
❆❈ ❂ ❆❈ ✰ ♠❡♠ ❬ ① ❪
❆❈ ❂ ❆❈ ✰ ♠❡♠ ❬ ② ✰ ❳❘ ❪
♠❡♠ ❬ ① ❪ ❂ ❆❈
❝♦♠♣❛r❡ ❆❈ ✇✐t❤ ✵
❜r❛♥❝❤ t♦ ❧❛❜❡❧ ❵ ❧❛❜ ✬ ✐❢ <❂
❛❧s♦ ✿ ❜❣t ✭ > ✮✱ ❜❡q ✭❂✮ ✱ ❜♥❡ ✭✦❂✮
❜r❛♥❝❤ t♦ ❧❛❜❡❧ ❧❛❜
How is this different from the rPeANUt solution?
COMP2300 MCA: rPeANUt (III), PeANUt
2015 ◭◭ ◭ • ◮ ◮◮ ×
2
COMP2300 MCA: rPeANUt (III), PeANUt
2015 ◭◭ ◭ • ◮ ◮◮ ×
4