CIS 4650 Study Guide - Final Guide: Backtracking, Assembly Language, Symbol Table
Document Summary
A compiler has 3 main function, it is a translator. Validator, checks the syntax and grammar of code. Validate the written code, translate it into machine readable code and optimize the program as much as possible. Complexity - increasing more complex with support from oop. Retarget-ability - source language can be used on multiple machine architectures. Imperative languages: sequential and explicit execution (c and pascal) Functional languages: function calling other functions (lisp) Logical languages: rules in no speci c order executed with the built in backtracking mechanism (prolog) Formulate the code in facts and rules. Object-oriented languages: typically extended from imperative languages (c++, 3 di erent ways to implement languages: compilation. Slow translation from source to machine code. Fast execution (and one compilation for many executions) Because you have full access to all machine level information its easier to optimize the machine code. Additional e ort in porting source code: interpretation (lisp, prolog, python)