Implemented Formalize(): resolve variable references using data sources.