Code refactoring in read_exp.
RAM primitives were handled incorrectly in the dependency graph construction.