Extract variables of program