M The University Of Michigan Andrew M. Morgan Andrew M Morgan1 EECS498-006 Lecture 03 Savitch Ch. 3-4, Misc More on Functions Memory, Activation Records,

Slides:



Advertisements
Similar presentations
Lecture Computer Science I - Martin Hardwick Recursion rA recursive function must have at least two parts l A part that solves a simple case of the.
Advertisements

Chapter 4 Constructors and Destructors. Objectives Constructors – introduction and features The zero-argument constructor Parameterized constructors Creating.
M The University Of Michigan Andrew M. Morgan EECS Lecture 01 Savitch Ch. 2 C++ Basics Flow Of Control.
M The University Of Michigan Andrew M. Morgan EECS Lecture 14 Savitch Ch. 9.0 C++ String Data Type C-Strings.
M The University Of Michigan Andrew M. Morgan EECS Lecture 25 Savitch Ch. 15 Polymorphism.
M The University Of Michigan Andrew M. Morgan EECS Lecture 09 Savitch Ch Compiling With Multiple Files Make Utility.
M The University Of Michigan Andrew M. Morgan EECS Lecture 22 Savitch Ch. 16 Intro To Standard Template Library STL Container Classes STL Iterators.
M The University Of Michigan Andrew M. Morgan EECS Lecture 06 Savitch Ch. 5 Arrays Multi-Dimensional Arrays.
M The University Of Michigan Andrew M. Morgan EECS Lecture 24 Savitch Ch. 14 Inheritance.
Savitch N/A Randomness In Programming Simulations
M The University Of Michigan Andrew M. Morgan Andrew M Morgan1 EECS Lecture 05 Savitch Ch Streams Stream States Input/Output.
M The University Of Michigan Andrew M. Morgan EECS Lecture 18 Savitch Ch. 17 Linked Data Structures.
For(int i = 1; i
Pass by Value. COMP104 Pass by Value / Slide 2 Passing Parameters by Value * A function returns a single result (assuming the function is not a void function)
Chapter 6 Advanced Function Features Pass by Value Pass by Reference Const parameters Overloaded functions.
Functions Prototypes, parameter passing, return values, activation frams.
1 CSC241: Object Oriented Programming Lecture No 21.
Chapter 9 Pointers and Dynamic Arrays. Overview 9.1 Pointers 9.2 Dynamic Arrays.
Data Structures (Second Part) Lecture 2 : Pointers Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Templated Functions. Overloading vs Templating  Overloaded functions allow multiple functions with the same name.
EC-241 Object-Oriented Programming
1 Class Vehicle #include #define N 10../.. 2 Class Vehicle class vehicle { public: float speed; char colour[N+1]; char make[N+1];
PASSING PARAMETERS 1. 2 Parameter Passing (by Value) Parameters Formal Parameters – parameters listed in the header of the function Variables used within.
1 5.3 Sub Procedures, Part II Passing by Value Passing by Reference Sub Procedures that Return a Single Value Debugging.
Passing information through Parameters ( our setter methods or mutators) Formal Parameter – parameter in the method. public void SetA(int x){ (int x) is.
AU/MITM/1.6 By Mohammed A. Saleh 1. Arguments passed by reference  Until now, in all the functions we have seen, the arguments passed to the functions.
1 Lecture 18:User-Definded function II(cont.) Introduction to Computer Science Spring 2006.
Passing arguments by value void func (int x) { x = 4; }... int a = 10;... func(a); cout
CS Oct 2006 Chap 6. Functions General form; type Name ( parameters ) { … return value ; }
Multiple-Subscripted Array
Functions Pass by Value Pass by Reference IC 210.
1 Arrays & functions Each element of an array acts just like an ordinary variable: Like any ordinary variable, you can pass a single array element to a.
CSC 107 – Programming For Science. Science Means Solving Problems  Physics – How does an atom work?
CSC 107 – Programming For Science. Today’s Goal  Discuss writing & using functions  How to declare them, use them, & trace them  Could write programs.
Functions Pass by Reference Alina Solovyova-Vincent Department of Computer Science & Engineering University of Nevada, Reno Fall 2005.
Pointers Chapter 9. Getting The Address Of A Variable Each variable in program is stored at a unique address Use address operator & to get address of.
CSC 107 – Programming For Science. Today’s Goal  When lecture over, start understanding pointers  What a pointer is and what it is not  Why pointers.
Functions CIS Feb-06. Summary Slide Using Functions Mathematical Functions Misc. Functions Naming Conventions Writing Functions –Function Prototype.
Object Oriented Programming (OOP) Lecture No. 8. Review ► Class  Concept  Definition ► Data members ► Member Functions ► Access specifier.
Lecture 15: Projects Using Similar Data. What is an Array? An array is a data structure consisting of related data items of the same type. Stored in a.
Lecture 4 Function example. Example1 int max (int a, int b) { int c; if (a > b) c = a; else c = b; return (c); } void main ( ) {int x, y; cin>>x>>y; cout.
Constructors Initializing New Objects #include “fraction.h” int main() { float x; float y = 6.7; float z(7.2); Fraction.
1 FUNCTIONS - I Chapter 5 ANIMATION. 2 3 Demos Demo of a simple value-returning function Demo of a void function Demo of a void function calling a value-
CSci 162 Lecture 6 Martin van Bommel. Functions on Structures Rather than pass a copy of structure to a function, or return a copy back as the function.
Multidimensional Arrays As Parameter void fun ( int matrix [] [10] ) {…} void main ( ) { int mat[5][10]; … fun(mat); } void fun (float *mat_ptr, int num_rows,
Multi-dimensional Array 1 Multi-dimensional array refers to an array with more than one index. It is a logical representation. On physical storage, the.
Lecture 17: 4/4/2003CS148 Spring CS148 Introduction to Programming II Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Computer Programming II Lecture 4. Functions - In C++ we use modules to divide the program into smaller and manageable code. These modules are called.
CSE 251 Dr. Charles B. Owen Programming in C1 Pointers and Reference parameters.
Lecture 10 Oct 7, 02. Pass by value and reference ► Calling a function and passing the value of a variable as an argument is called pass by value. The.
CSC 107 – Programming For Science. Today’s Goal  Write functions that take & return values  How parameters declared and how we call functions  What.
LECTURE 3 PASS BY REFERENCE. METHODS OF PASSING There are 3 primary methods of passing arguments to functions:  pass by value,  pass by reference, 
Standard Version of Starting Out with C++, 4th Edition
Pointers & Functions.
The Run-Time Stack and Reference Parameters
Lec 14 Oct 23, 02.
Function “Inputs and Outputs”
Introduction to Programming
Function Overloading.
CS150 Introduction to Computer Science 1
CS150 Introduction to Computer Science 1
CS148 Introduction to Programming II
CS150 Introduction to Computer Science 1
Pointers & Functions.
Structure (i.e. struct) An structure creates a user defined data type
Class: Special Topics Overloading (methods) Copy Constructors
Unit-1 Introduction to Java
Intro to Programming Week # 8 Functions II Lecture # 13
CS150 Introduction to Computer Science 1
C Parameter Passing.
Presentation transcript:

M The University Of Michigan Andrew M. Morgan Andrew M Morgan1 EECS Lecture 03 Savitch Ch. 3-4, Misc More on Functions Memory, Activation Records, etc.

M M EECS498 EECS498 Andrew M Morgan2 Review: Pass-By-Value A value parameter in a function becomes a copy of the argument that is passed in Changing the value of a value parameter: – Does changes the memory associated with the parameter –Does not change the memory associated with the argument passed in void valFunc(float val) { val = 50; } int main() { int mainVal = 9; valFunc(mainVal); cout << "mainVal: " << mainVal << endl; return (0); } mainVal: 9 This assignment changes the memory associated with this variable (only)! (Main's mainVal is unaffected)

M M EECS498 EECS498 Andrew M Morgan3 Review: Pass-By-Reference A reference parameter in a function "references" the same physical memory location as the argument passed in Changing the value of a reference parameter: –Does not change the memory associated with the parameter – Does change the memory associated with the argument passed in –Therefore – argument's memory must not be constant or literal void refFunc(float &val) { val = 50; } int main() { int mainVal = 9; refFunc(mainVal); cout << "mainVal: " << mainVal << endl; return (0); } mainVal: 50 This assignment changes the memory associated with this variable!

M M EECS498 EECS498 Andrew M Morgan4 Pre-Existing Functions C++ libraries contain many functions that you usually do not have to write algorithms for Many math related functions in include file (sqrt,pow,etc) Example: Pseudo-random number generation –Pseudo-random numbers are always generated in a sequence –The same sequence always results from the same starting value –Modifying the starting value changes the sequence – called a "seed" –Must #include to access these functions –Set seed with function "srand" void srand(unsigned int seedValue); Example: srand(100); //sets the seed to begin pseudo-random #s to be 100 –Generate a pseudo-random number with "rand" int rand(); Returns an integer between 0 and constant "RAND_MAX" (usually 32,767)

M M EECS498 EECS498 Andrew M Morgan5 Pseudo-Random Numbers, Example Program #include //req'd for srand and rand #include //req'd for cout and cin using namespace std; int main() { double avg = 0.0; int i, minX = 30, maxX = 50; int randVal, seed; cout << "Enter seed: "; cin >> seed; srand(seed); for (i = 0; i < 10; i++) { randVal = rand() % (maxX - minX + 1) + minX; cout << randVal << endl; } for (i = 0; i < 10000; i++) { avg += rand() % (maxX - minX + 1) + minX; } avg /= 10000; cout << "Avg of 10000: " << avg << endl; return (0); } srand() is usually called only one time to start a sequence rand() is called each time a pseudo-random number is needed

M M EECS498 EECS498 Andrew M Morgan6 Pseudo-Random Numbers, Example Output [ 34 ] temp -:./a.out Enter seed: Avg of 10000: [ 35 ] temp -:./a.out Enter seed: Avg of 10000: [ 36 ] temp -:./a.out Enter seed: Avg of 10000: Note: Same seed = same sequence = same results

M M EECS498 EECS498 Andrew M Morgan7 Default Parameters To Functions If a function's parameter is usually a known value, the parameter can be given a "default value" –Default parameters must be at the end of the parameter list –Default values specified in function prototype –Argument is not required for default parameters Default value will be used if no argument is provided void print(int a, int b = 4); int main() { print(8, 16); print(7); //print(); //Will not compile! return (0); } void print(int a, int b) { cout << a << " " << b << endl; } Default parameter (default value is 4)

M M EECS498 EECS498 Andrew M Morgan8 Types of Languages Machine Language – Actually stored in memory –Platform dependent –Binary instructions only – Assembly Language – Direct mapping to machine language –Platform dependent –Basic codes, each of which maps to a sequence of binary digits (bits) –ADD R1, IP High-Level Language – Easy to write, similar to English –Platform independent –Each platform needs to be able to convert to machine language –area = PI * square(radius);

M M EECS498 EECS498 Andrew M Morgan9 Creating An Executable With C++ Create C++ program with extension.cpp Pre-processor –"pastes" prototypes and definitions from include files –Controlled via pre-processor directives that begin with "#" –Results in C++ code that has been modified based on directives Compiler –Converts C++ code into assembly and/or machine language –Usually called "object code" with extension.o –Leaves "holes" in place of function calls from other libraries Linker –Fills holes from compiler with locations (addresses) of library functions –Results in complete sequence of machine language Result: Executable program –Can be executed on the platform in which it was compiled and linked –Sometimes, all steps are combined, so individual steps are transparent to user

M M EECS498 EECS498 Andrew M Morgan10 Global and Static Global constants and variables –Declared outside the scope of any individual function –Globals can be accessed from anywhere –Memory is obtained at beginning of program, is freed up when the program is finished – Global variables must not be used in this course!!! Static variables –Declared within a function, using keyword "static" before data type –Memory is obtained at beginning of program, is freed up when the program is finished –Can only be accessed from within the function it is declared –Scope is within the function it is declared, lifetime is the entire program

M M EECS498 EECS498 Andrew M Morgan11 Global and Static, Example //Global variable to count total calls int numFuncCalls; int f1() { //Allocated and initialized once static int f1Calls = 0; numFuncCalls++; f1Calls++; cout << "In f1: totalCalls: " << numFuncCalls << " f1 calls: " << f1Calls << endl; } int f2() { //Allocated and initialized every //time the f2 is called => local to f2 int f2Calls = 0; numFuncCalls++; f2Calls++; cout << "In f2: totalCalls: " << numFuncCalls << " f2 calls: " << f2Calls << endl; } int main() { //Initialization of global var numFuncCalls = 0; f1(); f2(); f1(); f2(); //numFuncCalls can be accessed from //anywhere, since it is global cout << "End of main: " << "totalCalls: " << numFuncCalls << endl; //This will not compile! Scope of //f1Calls is ONLY in f1 function //cout << "f1 Calls: " << f1Calls; return (0); } In f1: totalCalls: 1 f1 calls: 1 In f2: totalCalls: 2 f2 calls: 1 In f1: totalCalls: 3 f1 calls: 2 In f2: totalCalls: 4 f2 calls: 1 End of main: totalCalls: 4 Note: Does not count f2 calls!

M M EECS498 EECS498 Andrew M Morgan12 Use Of Memory Following is a generic diagram of the organization of main memory –Not guaranteed that every platform uses this exact ordering CPU: executes instructions, one at a time memory reserved for operating system compiled and linked C++ program (in binary form) heap: the global and static data for your C++ program; data whose lifetime is the entire program run runtime stack: the local data for the individual functions in your C++ program; lifetime is while function is active reads instructions and values from memorywrites results back to memory Room To Grow MAIN MEMORY

M M EECS498 EECS498 Andrew M Morgan13 Activation Records Every time a function is called, many pieces of information the function requires need to be stored in an "activation record" (AR) As one function calls another, ARs stack up on top of each other When a function ends, the AR on top of the stack is removed –Includes the parameters and local variables Following is one possible version of an AR return value return address dynamic link parameters local variables value returned by function, if any address of 1st instruction in caller after function call address of top of calling function's AR parameters passed into the called function variables declared in the called function as non-static

M M EECS498 EECS498 Andrew M Morgan14 Memory Trace, p.1 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 0 ??? calls heap main's AR mainVar Subset Of Memory red statement represents the next one to be executed

M M EECS498 EECS498 Andrew M Morgan15 Memory Trace, p.2 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 0 ??? 10 ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 heap

M M EECS498 EECS498 Andrew M Morgan16 Memory Trace, p.3 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 0 ??? 10 ??? 10 ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan17 Memory Trace, p.4 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 0 ??? ??? 10 ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan18 Memory Trace, p.5 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 1 ??? ??? 10 ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan19 Memory Trace, p.6 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout ??? 10 ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan20 Memory Trace, p.7 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 1 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 heap

M M EECS498 EECS498 Andrew M Morgan21 Memory Trace, p.8 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 1 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 ??? 60 ??? inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan22 Memory Trace, p.9 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 1 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 ??? ??? inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan23 Memory Trace, p.10 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 2 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 ??? ??? inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan24 Memory Trace, p.11 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 2 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p ??? inFunc's AR locIn val heap

M M EECS498 EECS498 Andrew M Morgan25 Memory Trace, p.12 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 2 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 ??? heap

M M EECS498 EECS498 Andrew M Morgan26 Memory Trace, p.13 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 3 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 ??? heap

M M EECS498 EECS498 Andrew M Morgan27 Memory Trace, p.14 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 3 ??? ??? calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code outFunc's AR locOut p1 110 heap

M M EECS498 EECS498 Andrew M Morgan28 Memory Trace, p.15 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout 3 ??? 110 calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code heap

M M EECS498 EECS498 Andrew M Morgan29 Memory Trace, p.16 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout calls main's AR mainVar Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code heap

M M EECS498 EECS498 Andrew M Morgan30 Memory Trace, p.17 return value return addr dynamic link parameters local variables int calls; //Global var (ack!) int inFunc(int val) { int locIn; locIn = val + 50; calls++; return (locIn); } int outFunc(int p1) { int locOut; locOut = inFunc(p1); locOut = inFunc(locOut); calls++; return (locOut); } int main() { int mainVar; calls = 0; mainVar = outFunc(10); return (0); } AR Layout Subset Of Memory red statement represents the next one to be executed dashed arrows point to conceptual locations in code Program Finished!