From fcff324584cbcbee7d6c6cc048d7b2b46c4fa8b4 Mon Sep 17 00:00:00 2001 From: trevor_hansen Date: Tue, 11 Aug 2009 07:02:50 +0000 Subject: [PATCH] Improve type checking for BVZX & BVSX. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@103 e59a4935-1847-0410-ae03-e826735625c1 --- AST/AST.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AST/AST.cpp b/AST/AST.cpp index 7f44c35..509880e 100644 --- a/AST/AST.cpp +++ b/AST/AST.cpp @@ -1365,6 +1365,8 @@ bool BeevMgr::BVTypeCheck(const ASTNode& n) { FatalError("BVTypeCheck: BVSX(t,bvsx_len) : length of 't' must be <= bvsx_len\n", n); } + if ((v.size() != 2)) + FatalError("BVTypeCheck:BVSX must have two arguments. The second is the new width\n", n); break; case BVZX: @@ -1374,6 +1376,9 @@ bool BeevMgr::BVTypeCheck(const ASTNode& n) { FatalError("BVTypeCheck: BVZX(t,bvzx_len) : length of 't' must be <= bvzx_len\n", n); } + if ((v.size() != 2)) + FatalError("BVTypeCheck:BVZX must have two arguments. The second is the new width\n", n); + break; default: -- 2.47.3