Instructor: Prof. Tamer
This repository contains solutions and writeups for programming assignments in the Spring 2025 Programming Languages course at Sungkyunkwan University.
- Objective: Practice formal grammar and parsing fundamentals.
- Grade: 9 / 10
- Key Topics:
- Writing context-free grammars
- Left-recursion elimination
- Computing FIRST/FOLLOW sets
- Derivation trees and ambiguity analysis
- Objective: Build a custom lexer for a restricted C-like language.
- Grade: 92/100
- Key Features:
- Tokenizes identifiers, keywords, literals, and operators
- Handles whitespace and comments
- Input: C-style code (
test.c
) - Output: Token stream with type and position
- Objective: Measure and compare the performance of static, stack, and heap memory allocation in C++.
- Grade: 9/10
- Key Features:
- Uses
chrono
for timing - Tests array operations across different memory types
- Includes a detailed PDF analysis and graph of results
- Uses
- Objective: Reinforce basic programming constructs using Python.
- Grade: 10/10
- Key Features:
q1.py
: Generate & sort 200 random numbers, print them, and plot histogramq2.py
: Recursive vs. closed-form sum of numbers from 1 to nq3.py
: Interactive prime number finder using 6k±1 optimization
- Objective: Build a modular auto-trading simulation in Python.
- Grade: 100/100
- Key Features:
- Simulates market data updates from
market.json
- Users with different strategies (random, momentum, moving average)
- Trades executed automatically in each simulation round
- Strategy logic isolated in
strategies.py
for easy extension
- Simulates market data updates from
- Objective: Model a simple store system using Python OOP and practice Scheme functional programming.
- Grade: 20/20
- Key Features:
- A6A: Python program to simulate a store receipt system with Store, Staff, Customer, Product, and Order classes
- Generates detailed receipts with price, quantity, and total reward points
- Follows OOP principles: encapsulation, inheritance, and abstraction
- A6B: Scheme solutions for list manipulation tasks (e.g., min/max, filtering, counting elements)
- Demonstrates recursive thinking and functional syntax in Scheme
- A6A: Python program to simulate a store receipt system with Store, Staff, Customer, Product, and Order classes