1 /********************* */
2 /*! \file uninterpreted_constant.cpp
4 ** Original author: mdeters
5 ** Major contributors: none
6 ** Minor contributors (to current version): none
7 ** This file is part of the CVC4 prototype.
8 ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
9 ** Courant Institute of Mathematical Sciences
10 ** New York University
11 ** See the file COPYING in the top-level source directory for licensing
12 ** information.\endverbatim
14 ** \brief Representation of constants of uninterpreted sorts
16 ** Representation of constants of uninterpreted sorts.
19 #include "util/uninterpreted_constant.h"
28 std::ostream
& operator<<(std::ostream
& out
, const UninterpretedConstant
& uc
) {
33 // replace everything that isn't in [a-zA-Z0-9_] with an _
34 while((i
= t
.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_", i
)) != string::npos
) {
35 t
.replace(i
, 1, 1, '_');
37 return out
<< "uc_" << t
<< '_' << uc
.getIndex();