Combining Data Structures with Nonstably Infinite Theories using Many-Sorted Logic
Résumé
Most computer programs store elements of a given nature into container-based data structures such as lists, arrays, sets, and multisets. To verify the correctness of these programs, one needs to combine a theory modeling the data structure with a theory modeling the elements. This combination can be achieved using the classic Nelson-Oppen method only if both theories are stably infinite. The goal of this report is to relax the stable infiniteness requirement. To achieve this goal, we introduce the notion of polite theories, and we show that natural examples of polite theories include those modeling data structures such as lists, arrays, sets, and multisets. Furthemore, we provide a method that is able to combine a polite theory with any theory of the elements, regardless of whether the latter is stably infinite or not. The results of this report generalize to many-sorted logic those recently obtained by Tinelli and Zarba for combining the so-called shiny theories with nonstably infinite theories in one-sorted logic.