private void MarkTemporaryVariables()
{
foreach(PrologVariableDictionaryEntry entry in _items)
{
if(entry.LastGoal <= 1 || entry.FirstGoal == entry.LastGoal)
{
entry.IsTemporary = true;
}
if(!entry.IsTemporary && entry.FirstGoal != 0)
{
entry.IsUnsafe = true;
}
if(entry.IsTemporary)
{
_temporaryVariableCount++;
}
}
}