blob: e004004f048be5e61ff1e5b6397b57b53079f319 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Boogie;
using System.Diagnostics;
namespace GPUVerify
{
class EnabledToPredicateVisitor : StandardVisitor
{
public EnabledToPredicateVisitor(Expr currentPredicate)
{
this.currentPredicate = currentPredicate;
}
private Expr currentPredicate;
public override Expr VisitNAryExpr(NAryExpr node)
{
if (node.Fun is FunctionCall)
{
FunctionCall call = node.Fun as FunctionCall;
if (call.Func.Name.Equals("__enabled"))
{
return currentPredicate;
}
}
return base.VisitNAryExpr(node);
}
}
}
|