This document describes a reuse-based optimization framework for Pig Latin queries. The framework identifies common subexpressions across a workload of Pig Latin scripts, selects the most efficient ones to execute based on a cost model, and reuses their results to compute the original script outputs. It analyzes query graphs to merge equivalent subexpressions and finds an optimal plan using a binary integer linear programming solver. The framework codebase contains classes for the optimizer, normalization rules, and decomposition of join operators.