Foundations For Provenance-Aware Systems