AIB 2012-12: Symbolic Evaluation Graphs and Term Rewriting --- A General Methodology for Analyzing Logic Programs