A General Framework for Multi-Theory Logic Languages