The goal of this thesis is to provide a framework for several path problems for graphs. From the conceptual part, there are context-free grammars and semirings. Context-free grammars allow us to describe recursive generative processes, such as in grammars for natural languages or in models for the growth of cell complexes. They also capture the structure of certain dynamic programming schemes, as it is used in the CYK algorithm for context-free parsing and of some pseudo-polynomial algorithms for hard problems. The connection of context-free grammars with path problems in graphs allows us to model several language-restrictions for feasible paths and thus generalizes the classic shortest-path problem. On the other hand --- similarly to the algebraic shortest path problem --- context-free grammars can be equipped with semiring values. In chapter 4 of this thesis, we explore the relationship between semiring-valued context-free grammars and path problems. The connection is fruitful since it gives us a conceptual framework for many generalizations of the path problem. For instance it allows us to formulate tentative polynomial-time algorithms for transportation problems which cannot, or only with great difficulty, formulated as conventional shortest-path problems. As one can observe, language-restrictions on paths might cause the shortest feasible paths to grow exponentially. Persistent arrays, represented as balanced binary trees, allow us to deal with this problem and still maintain polynomial-time computability. The ability to represent certain exponentially long arrays in polynomial space gives rise to the question what kind of computations they apply to. Indeed, even determining equality for two of these arrays appears to be difficult. We provide a probabilistic equality test in the third chapter, among other algorithms for persistent arrays. Persistent arrays themselves are briefly introduced in the first chapter of this thesis. There, we also show that zipping two persistent arrays (represented as trees) is generally not possible in time polynomial in its size in memory. The second chapter sets the stage for path problems on graphs. The first section shows how shortest paths in forests can be maintained dynamically. The resulting algorithms are somewhat slower than the best algorithms known in the literature, but easier to implement if persistent arrays are already provided by a programming library. We also introduce the semiring framework for path problems here. Chapter 5. shows some results in formal language theory which are useful for our conceptual framework. In chapter 6. we show how Rytter's formulation of Valiant's subcubic context-free parsing algorithm is connected to semiring parsing and path problems.