Inferring Accumulative Effects of Higher Order Programs