simplification of memory set