🗒️ Explore my blog

Annotated Parse Tree

always start from the first rule bring 2 color pens for dependency graph start from the lowest leaf for the graph (Depth First Search) if there no value yet go to a diff leaf kind of brute force as long as it makes sense with the final result E1 is the child of E Execute the parent rule first then the child if no dependency graph is asked no need to draw arrows, just the values Example Kenny Jingga Responsi 2024 Screenshot 2024-12-30 at 11.54.40 AM.png Pasted image 20241230121837.png

Three Address Statement

Example Kenny Jingga Quiz Screenshot 2024-12-30 at 12.32.32 PM.png 1. mov C, , T1 (initializing array X) 1. mul i, 8, T2 (declare the index with size of double) 1. mov T1\[T2\], , T3 (X[i]) 1. param T3 (declare as paramater) 1. add p, 1, T4 (p+1) 1. param T4 (declare as paramater) 1. mul q, 2, T5 (q*2) 1. sub T5, 8, T6 (...-8) 1. param T6 (declare as paramater) 1. call f, 3, T7 (call function f with 3 parameters and store into T7) 1. div T7, 2, T8 (.../2) 1. mul 5, T8, T9 (5*...) 1. mov T9, ,

Code Generator

similar to Intermediate Code Generator Expressed as: Opr Arg1, Store/result No arg2 Use # for numbers If there is a while or if, add jmpf right away only do while uses jmpt only jmpf always come first ex: a = a \* a mov a, R0 mul a, R0 mov R0, a Intermediate Code Generator Operators Example Kenny Jingga Responsi 2024 (for) Screenshot 2024-12-28 at 2.36.55 PM.png 1. mov #0, a (int a = 0) 1. mov #0 i (i = 0) 1. move i, R0 (prep for operation, beginning of for loop) [R0 = i = 0] 1. l

Intermediate Code Generator

Expressed as quadruples: Opr Arg1, Arg2, Store/result If there is a while or if, add jmpf right away only do while uses jmpt only jmpf always come first Intermediate Code Generator Operators Example Alvina Aulia Intermediate Code Generator (while) x := 1; y := x + 10; while (x Final Exam](../compilation-techniques.md#final-exam) References

TAC, Triples, Quadriples

The other ways to express Intermediate Code Generator Example Alvina Aulia TAC Quadruples Triples Pasted image 20241227182123.jpg Status: #idea Tags: compilation-techniques > Final Exam References

Adult attachment dynamics

The emotional bonds adults form with their partners are shaped by the same attachment needs observed in children, influencing behavior, self-perception, and relationship quality. Examples: * Adults, like children, seek attachment to feel secure and supported, as demonstrated by Bowlby’s studies of World War II widows. * Securely attached individuals are better at giving and receiving support, forgiving partners, and maintaining a positive self-image even when acknowledging their flaws. * When