Program logics have proven effective at verifying programs by leveraging modular reasoning. However, the process of building program logics is itself usually not modular: Even though many languages share common features like integers, booleans, heaps, or concurrency, program logics for different languages are usually defined and proven sound independently.
In this paper, we present \emph{Mosaic}, a new framework for building program logics by composition. Mosaic views a programming language as a sum of \emph{fragments}. Each fragment covers a particular feature or aspect of a language, supplying syntax, semantics, program logic, and soundness of said logic. These fragments can be freely combined to obtain a programming language with an accompanying program logic. When realized in a proof assistant, each fragment furthermore comes with a set of tactics that are then automatically available in any language that includes the fragment.
We provide a library of 27 fragments, including fragments for higher-order heaps, concurrency, and atomic blocks. Particularly noteworthy is our fragment for prophecy variables which comes with a reusable, language-generic erasure theorem. To demonstrate the scalability of our approach, we use it to recreate the HeapLang and $\lambda$Rust languages from prior work. We show that our composed versions are usable in practice by porting several large proof examples with minimal changes. All of our development is formalized using Rocq and Iris.