summaryrefslogtreecommitdiff
path: root/Source/GPUVerify/VariablesOccurringInExpressionVisitor.cs
blob: 9c46db38946d4537f95a31c4a140ffab28093cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Boogie;

namespace GPUVerify
{
    class VariablesOccurringInExpressionVisitor : StandardVisitor
    {
        private HashSet<Variable> variables = new HashSet<Variable>();

        internal IEnumerable<Microsoft.Boogie.Variable> GetVariables()
        {
            return variables;
        }

        public override Variable VisitVariable(Variable node)
        {
            variables.Add(node);
            return base.VisitVariable(node);
        }

    }
}