Final Exam Key Facts

C++ Concepts

Memory Management

Classes, Constructors, and Destructors

Inheritance and Polymorphism

Scheme Concepts

Syntax and Core Ideas

Data Structures and Control Flow

Recursion and Higher-Order Functions

Prolog Concepts

Facts, Rules, and Queries

Unification and Execution

Lists and Recursion

Glossary of Terms

Arity: The number of arguments a function or predicate takes.
Backtracking: An algorithm used by Prolog to find all possible solutions. When a query fails, Prolog goes back to the previous choice and tries a different path.
Dangling Reference: A pointer or reference that points to a memory location that has been deallocated or freed. Using it can cause crashes or undefined behavior.
Encapsulation: The bundling of data (variables) and the methods (functions) that operate on that data into a single unit (a class), and restricting access to some of the object's components.
Heap Memory: A region of memory used for dynamic allocation, where memory is allocated and freed manually by the programmer.
Lambda: In Scheme, an anonymous (unnamed) function.
Memory Leak: A condition where a program allocates memory from the heap but loses the ability to free it, causing the program's memory usage to grow over time.
Polymorphism: A core concept in object-oriented programming that allows objects of different classes to be treated as objects of a common superclass.
Predicate: The name of a fact or rule in Prolog, which defines a relation.
Scope Resolution Operator (::): A C++ operator used to define a member function outside a class or to access static members of a class.
Unification: The pattern-matching process used by Prolog to determine if two terms can be made equal. It is the core mechanism for reasoning.