Segregate data in symbolic rewriting

**please review**
have you discussed the mutability issue with Andrei and Yilong?