Lightweight Programming Abstractions for Increased Safety and Performance