CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For...
Transcript of CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For...
![Page 1: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/1.jpg)
CISC 672 – Advanced Compiler Construction
Timo Kotzing
September 9, 2008
![Page 2: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/2.jpg)
Disclaimer
The following does not describe the cool-language in depth. It isnot designed to be used as a syntax reference, but rather as anintroduction into programming with cool, and also into objectoriented programming in general.
For the purpose of writing your own cool-compiler, please read thecool-manual carefully.
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 3: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/3.jpg)
What is a COOL-Program?
I a cool-program is a list of cool-classes
I classes may be spread over several files
I one of the classes has to be named “Main”
I this class has to contain a method named “main”
I executing a cool-program is equivalent to evaluating this“Main.main()” function
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 4: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/4.jpg)
What is a COOL-Program?
I a cool-program is a list of cool-classes
I classes may be spread over several files
I one of the classes has to be named “Main”
I this class has to contain a method named “main”
I executing a cool-program is equivalent to evaluating this“Main.main()” function
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 5: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/5.jpg)
What is a COOL-Program?
I a cool-program is a list of cool-classes
I classes may be spread over several files
I one of the classes has to be named “Main”
I this class has to contain a method named “main”
I executing a cool-program is equivalent to evaluating this“Main.main()” function
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 6: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/6.jpg)
What is a COOL-Program?
I a cool-program is a list of cool-classes
I classes may be spread over several files
I one of the classes has to be named “Main”
I this class has to contain a method named “main”
I executing a cool-program is equivalent to evaluating this“Main.main()” function
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 7: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/7.jpg)
What is a COOL-Program?
I a cool-program is a list of cool-classes
I classes may be spread over several files
I one of the classes has to be named “Main”
I this class has to contain a method named “main”
I executing a cool-program is equivalent to evaluating this“Main.main()” function
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 8: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/8.jpg)
What is a COOL-Program?
I a cool-program is a list of cool-classes
I classes may be spread over several files
I one of the classes has to be named “Main”
I this class has to contain a method named “main”
I executing a cool-program is equivalent to evaluating this“Main.main()” function
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 9: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/9.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 10: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/10.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 11: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/11.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 12: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/12.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 13: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/13.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 14: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/14.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 15: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/15.jpg)
What is a COOL-Class?
I a cool-class is a list of features
I features are either attributes or methods
I attributes are local variables (with scope of the class)
I methods are global functions, addressed by“< functionName > . < methodName > (...)”
I attributes have to have a type and may be initialized
I methods have a (possibly empty) list of formal parameters, areturn type and a body
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 16: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/16.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 17: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/17.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 18: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/18.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 19: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/19.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 20: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/20.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 21: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/21.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 22: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/22.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 23: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/23.jpg)
What are Types in COOL?
I every class is a type
I the basic types are the classes “Object”, “IO”, “Int”, “String”and “Bool”
I all classes but Object have to be inherited from exactly oneother class (be a child of this class)
I every class that does not specify a class to inherit from isinherited from Object
I the “is child of”-relation has to be a tree, rooted at Object
I basic classes provide several basic functions
I “Int”, “String” and “Bool” may not be inherited from
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 24: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/24.jpg)
What are Types in COOL?
I Int-constants: 5, 3, 221, . . .
I String-constants: ”Hello World!”, ”\t Hi\n”,. . .
I Bool-constants: true, false
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 25: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/25.jpg)
What are Types in COOL?
I Int-constants: 5, 3, 221, . . .
I String-constants: ”Hello World!”, ”\t Hi\n”,. . .
I Bool-constants: true, false
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 26: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/26.jpg)
What are Types in COOL?
I Int-constants: 5, 3, 221, . . .
I String-constants: ”Hello World!”, ”\t Hi\n”,. . .
I Bool-constants: true, false
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 27: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/27.jpg)
What are Types in COOL?
I Int-constants: 5, 3, 221, . . .
I String-constants: ”Hello World!”, ”\t Hi\n”,. . .
I Bool-constants: true, false
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 28: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/28.jpg)
Simple Example
class Main {main() : Int { 0 };
};
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 29: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/29.jpg)
IO-Example
class Main {myIO : IO < − new IO;myInput : Int;
main() : Int { {myIO.out string(’’How many? ’’);myInput < − myIO.in int();while 0 < myInput loop
myIO.out string(’’Hello world!’’)pool;0;
}};};
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 30: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/30.jpg)
Sally
class Silly {f() : Int { 5 };
};
class Sally inherits Silly { };
class Main {x : Int < − (new Sally).f();
main() : Int { x };};
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 31: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/31.jpg)
Inheritance
I all features are inherited
I no attribute may be redefined
I methods may be overridden, if the number and all types ofthe formal parameters match, as well as the return type
I static dispatch possible with< object > @ < type > . < methodName > (. . .)
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 32: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/32.jpg)
Inheritance
I all features are inherited
I no attribute may be redefined
I methods may be overridden, if the number and all types ofthe formal parameters match, as well as the return type
I static dispatch possible with< object > @ < type > . < methodName > (. . .)
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 33: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/33.jpg)
Inheritance
I all features are inherited
I no attribute may be redefined
I methods may be overridden, if the number and all types ofthe formal parameters match, as well as the return type
I static dispatch possible with< object > @ < type > . < methodName > (. . .)
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 34: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/34.jpg)
Inheritance
I all features are inherited
I no attribute may be redefined
I methods may be overridden, if the number and all types ofthe formal parameters match, as well as the return type
I static dispatch possible with< object > @ < type > . < methodName > (. . .)
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 35: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/35.jpg)
Inheritance
I all features are inherited
I no attribute may be redefined
I methods may be overridden, if the number and all types ofthe formal parameters match, as well as the return type
I static dispatch possible with< object > @ < type > . < methodName > (. . .)
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 36: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/36.jpg)
Sally, revised
class Silly { f() : Int { 5 }; };
class Sally inherits Silly {f() : Int { 7 }; };
class Main {mySally : Sally < − new Sally;
main() : Int {mySally.f()
};
alternative() : Int {[email protected]()
};};
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 37: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/37.jpg)
The COOL-Manual
Read the cool-manual on if-then-else, case-statements, let,arithmetic operations and so forth.The cool-manual will be your main reference when working on anyof the phases of your cool-compiler.
Timo Kotzing CISC 672 – Advanced Compiler Construction
![Page 38: CISC 672 -- Advanced Compiler Constructioncavazos/cisc672-fall08/lectures/CoolOverview.pdf · For the purpose of writing your own cool-compiler, please read the cool-manual carefully.](https://reader033.fdocuments.in/reader033/viewer/2022041700/5e411be4f25c515dc9013b97/html5/thumbnails/38.jpg)
The COOL-Manual
Read the cool-manual on if-then-else, case-statements, let,arithmetic operations and so forth.The cool-manual will be your main reference when working on anyof the phases of your cool-compiler.
Timo Kotzing CISC 672 – Advanced Compiler Construction