private void ExtractAffects() { IStatementList assignStatements = Statements.Copy().FilterByType(typeof(Assign)) as IStatementList; foreach (Statement assignStatement in assignStatements) { Assign assignment = assignStatement as Assign; Variable variable = ModifiesTable.GetModifiedBy(assignment).GetVariableByIndex(0); List <IStatementList> paths = NextTable.GetPathsFrom(assignStatement); foreach (IStatementList path in paths) { foreach (Statement nextStatement in path) { if (nextStatement is Assign && UsesTable.IsUses(nextStatement, variable)) { AffectsTable.SetAffects(assignment, nextStatement as Assign); } if (nextStatement != assignStatement && (nextStatement is Assign || nextStatement is Call) && ModifiesTable.IsModifies(nextStatement, variable)) { break; } } } } }