This thesis develops resource reasoning with separation logic in the areas of modular program specification, program optimization, and concurrency verification for heap-manipulating programs. In the first part, we investigate the resources that are required for modular and complete program specifications. Since the safety footprints of a program (the resources required for safe execution) do not always yield complete specifications, we first characterize the notion of the relevance footprint. We show that the relevance footprints are the only elements essential for a complete specification, and also identify the conditions for sufficiency. We then introduce a novel semantic model of heaps which establishes the correspondence between safety and relevance footprints, and we identify a general condition that guarantees this correspondence in arbitrary resource models. In the second part, we present labelled separation logic for introducing optimizations such as automatic parallelization in heap manipulating programs. In order to detect dependences between distant statements in a program, we annotate spatial conjuncts in separation logic formulae with the labels of accessing commands, and propagate these labels through program proofs. We also identify the notion of ‘allocation dependences ’ which, in addition to standard stack and heap dependences, are needed to ensure the safety of optimizations. In th
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.