diff options
author | MichalMoskal <unknown> | 2011-02-18 01:02:15 +0000 |
---|---|---|
committer | MichalMoskal <unknown> | 2011-02-18 01:02:15 +0000 |
commit | d6221bcb829c5034d062500680652e0d261f3332 (patch) | |
tree | 69a5da7455230c0912bef7df1ebc8bd66b3d7d55 /Source/Provers/SMTLib/TypeDeclCollector.cs | |
parent | ff9f8978724c4e43238bd2a9fe19fed008b61ca6 (diff) |
Handle bitvectors
Diffstat (limited to 'Source/Provers/SMTLib/TypeDeclCollector.cs')
-rw-r--r-- | Source/Provers/SMTLib/TypeDeclCollector.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/Provers/SMTLib/TypeDeclCollector.cs b/Source/Provers/SMTLib/TypeDeclCollector.cs index a4af7f40..327b2f70 100644 --- a/Source/Provers/SMTLib/TypeDeclCollector.cs +++ b/Source/Provers/SMTLib/TypeDeclCollector.cs @@ -110,13 +110,17 @@ void ObjectInvariant() if (op != null && !KnownFunctions.ContainsKey(op.Func)) {
Function f = op.Func;
Contract.Assert(f != null);
- string printedName = Namer.GetQuotedName(f, f.Name);
- Contract.Assert(printedName != null);
-
- Contract.Assert(f.OutParams.Length == 1);
- var argTypes = f.InParams.Cast<Variable>().MapConcat(p => TypeToStringReg(p.TypedIdent.Type), " ");
- string decl = "(declare-fun " + printedName + " (" + argTypes + ") " + TypeToStringReg(f.OutParams[0].TypedIdent.Type) + ")";
- AddDeclaration(decl);
+
+ var builtin = SMTLibExprLineariser.ExtractBuiltin(f);
+ if (builtin == null) {
+ string printedName = Namer.GetQuotedName(f, f.Name);
+ Contract.Assert(printedName != null);
+
+ Contract.Assert(f.OutParams.Length == 1);
+ var argTypes = f.InParams.Cast<Variable>().MapConcat(p => TypeToStringReg(p.TypedIdent.Type), " ");
+ string decl = "(declare-fun " + printedName + " (" + argTypes + ") " + TypeToStringReg(f.OutParams[0].TypedIdent.Type) + ")";
+ AddDeclaration(decl);
+ }
KnownFunctions.Add(f, true);
} else {
var lab = node.Op as VCExprLabelOp;
|