COP 3402 meeting -*- Outline -*- * the course itself ** Prerequisites ------------------------------------------ PREREQUISITES From the UCF Catalog: "CDA 3103C and COP 3502C each with a grade of "C" (2.0) or better." ------------------------------------------ You need to understand computer organization and data structures (e.g., stacks, hash tables) ** What is systems software? ------------------------------------------ SYSTEMS SOFTWARE def: *systems software*: ----------------------------------------- ... enables running programs on a computer Q: What are examples of systems software? Compilers, interpreters, assemblers, linkers, loaders, OS *** compilers, interpreters, assemblers ------------------------------------------ SOME DEFINITIONS def: A *compiler* def: An *interpreter* def: An *assembler* ------------------------------------------ ... *compiler* translates a (high-level programming) language into a form that can be (more easily) executed by a computer. Q: What does it mean for a programming language to be "high-level"? It allows several abstraction mechanisms, to help programs be as close to the language of the domain as possible, such as subroutines and data types, perhaps allowing for new control mechanisms. ... *interpreter* executes a programming language directly, without translating it into some other language first However, an interpreter may do some translation into an internal format (e.g., a virtual machine language) Q: What are some examples of languages with interpreters? Python, Java (to some extent) Modern languages, like Java, often combine interpreters and compilers, using a "just-in-time compiler" that only compiles programs into machine code as needed, and interprets seldom used code. ... *assembler* translates a low-level language into machine code. Assembly language typically is unstructured. It uses human-readable names for instructions and macros. Typically there is a one-to-one ratio of instructions in assembly language and instructions in the translated machine code ------------------------------------------ SOME HISTORY Computers essential for modern life (e.g., check clearing) Nearly impossible for humans to program in machine code Assembly language called "auto coding" Subroutines and libraries allowed expertise to be codified High-level langauges (FORTRAN, COBOL) (about 1957) needed considerable effort Algol 60, Algol 68 showed difficulty of implementation Various advances made compilers possible: - formal language theory - regular grammars - context-free grammars - syntax-directed translation - symbol tables and static analysis - linkers, loaders ------------------------------------------ "Auto coding" was the term used in the 1950s and 1960s The computer industry couldn't sell computers if people couldn't use them, and most people couldn't program in machine code Assembly language was a first step to support human communication: Symbolic, automated bookkeeping *** linkers ------------------------------------------ LINKERS def: A *linker* def: A tool's work is *static* if ------------------------------------------ ... *linker* combines parts of a program into a single executable file, resolving external names (e.g., for library functions) Q: Why is a linker needed in C? Becuase C programs can use external functions (e.g., libraries) Q: Does a C++ linker do anything else besides what is done in C? Yes, it type checks external names, comparing the type declared in the using module vs. the type of the defining module Q: Does a linker do it's work before running a program? Yes, in C++, but there are also dynamic linkers that bring in library functions during runtime as needed. ... its work is done before running a program, otherwise it is *dynamic* (works during program runs, in general) Q: What is the linker called in Unix? The static linking is done by the C or C++ compiler (gcc or g++) Also "ld" on Unix does linking *** operating system tools ------------------------------------------ OTHER TOOLS RELATED TO OPERATING SYSTEMS def: A *loader* def: A *debugger* def: An *operating system* ------------------------------------------ ... *loader* puts a program in a computer's memory turning relative addresses within a program into (more) absolute addresses Q: What is the loader called in Unix? ld (but that also does linking) ... *debugger* allows the state of a program's execution to be investigated, typically by displaying the computer's state and allowing execution to be traced or stopped. Q: What are some example debuggers? gdb, adb on Unix ... *OS* is a program that manages a computer's resources. It provides abstractions of the various resources (e.g., files and directories), security, and helps use resources efficiently ** course goals *** objectives Q: What are your objectives for this course? Q: How do you want this course to help you in 5 years? (make a list) My objectives for you: ------------------------------------------ COURSE OBJECTIVES - Explain and correctly use the concepts - Implement, as part of a team, - Evaluate, as part of a team, Why? ------------------------------------------ ... - Explain and correctly use the concepts behind software tools, their design, and their role in a computer operating system - Implement, as part of a team, a software tool, such as a compiler - Evaluate, as part of a team, the quality of a software tool's implementation Why these objectives? Understanding systems software is essential for developers. Because: - This software includes the most important tools for running programs, (such as compilers) - Will increase your software engineering skills, (because you will learn to work in teams on a big project) - Techniques are useful in developing other software tools Other tools typically involve some analysis of programs (e.g., lexical analysis and parsing). (IDEs and text editors for programmers are good examples.) *** outcomes My essential learning outcomes: ------------------------------------------ LEARNING OUTCOMES By the end of the course you will be able to: - UseConcepts - Build - Appraise ------------------------------------------ ... - [UseConcepts] Use and explain concepts related to systems software - [Build] Build systems software in a team. - [Appraise] Apprise the quality of a software tool's implementation in a team. Remember to think about who you would like to be on your team of 2 or 3 people! ** plan for the course ------------------------------------------ PLAN FOR THE COURSE Broad outline: Virtual Machines Compilers - Lexical analysis - Syntax analysis - Code generation OS - interupts - processes and threads ------------------------------------------ we first look at machines and then how to support high-level languages and efficient processing on machines ** grading ------------------------------------------ GRADING AND FINAL GRADES + No curve grading + Your final grade is based on: 41% project (homeworks) 23% midterm exam 31% final exam 5% recitations ------------------------------------------ details in grading_policy.shtml web page *** Textbooks ------------------------------------------ TEXTBOOKS Recommended: Systems Software: Essential Concepts, by Euripides Montagne, Cognella, Cognella Academic Publishing, 2021. Compilers: Principles, Techniques, and Tools (2nd edition) by Alfred V. Aho, Monica S. Lam, Jeffrey D. Ullman, and Ravi Sethi, Pearson, 2007. Engineering A Compiler (2nd edition) by Keith D. Cooper and Linda Torczon, ‎Morgan Kaufmann, 2011. Modern Compiler Implementation in Java (2nd edition) by Andrew W. Appel and Jens Palsberg, Cambridge University Press, 2002. ------------------------------------------ Note that our projects wil be done in C, so don't use code in Java! *** cooperation and cheating ------------------------------------------ COOPERATION Can talk with others about homework - but must cite: - people on different teams - other sources CHEATING Exchange of finished answers outside team - without cooperation in solving them - without certification Using ideas of others - without citation Copying answers from the web - without citation ------------------------------------------ See grading policy for details. *** ask for questions/concerns discuss them