tcVarInit :: (ProverK loc m) => Bool -> Bool -> Scope -> Type -> VariableInitialization Identifier loc -> TcM m (VariableInitialization GIdentifier (Typed loc))
tcVarInit False isHavoc scope ty (VariableInitialization l v@(VarName vl n) szs e) = do
    (ty',szs') <- tcTypeSizes l ty szs
    e' <- withExprC ReadWriteExpr $ tcDefaultInitExpr l isHavoc ty' szs' e
    -- add the array size to the type
    -- do not store the size, since it can change dynamically
    vn <- addConst scope (True,False) False n
    let v' = VarName (Typed vl ty) vn
    -- add variable to the environment
    isAnn <- getAnn
    newVariable scope False isAnn v' Nothing -- don't add values to the environment
    return (VariableInitialization (notTyped "tcVarInit" l) v' szs' e')
tcVarInit :: (ProverK loc m) => Bool -> Bool -> Scope -> Type -> VariableInitialization Identifier loc -> TcM m (VariableInitialization GIdentifier (Typed loc))
tcVarInit False isHavoc scope ty (VariableInitialization l v@(VarName vl n) szs e) = do
    (ty',szs') <- tcTypeSizes l ty szs
    e' <- withExprC ReadWriteExpr $ tcDefaultInitExpr l isHavoc ty' szs' e
    -- add the array size to the type
    -- do not store the size, since it can change dynamically
    vn <- addConst scope (True,False) False n
    let v' = VarName (Typed vl ty) vn
    -- add variable to the environment
    isAnn <- getAnn
    newVariable scope False isAnn v' Nothing -- don't add values to the environment
    return (VariableInitialization (notTyped "tcVarInit" l) v' szs' e')
tcVarInit False isHavoc scope ty (VariableInitialization l v@(VarName vl n) szs e) = do
    (ty',szs') <- tcTypeSizes l ty szs
    e' <- withExprC ReadWriteExpr $ tcDefaultInitExpr l isHavoc ty' szs' e
    -- add the array size to the type
    -- do not store the size, since it can change dynamically
    vn <- addConst scope (True,False) False n
    let v' = VarName (Typed vl ty) vn
    -- add variable to the environment
    isAnn <- getAnn
    newVariable scope False isAnn v' Nothing -- don't add values to the environment
    return (VariableInitialization (notTyped "tcVarInit" l) v' szs' e')