We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4987df3 commit ddedba8Copy full SHA for ddedba8
src/solvers/smt2_incremental/smt_to_smt2_string.cpp
@@ -13,13 +13,17 @@
13
14
#include <functional>
15
#include <iostream>
16
+#include <regex>
17
#include <sstream>
18
#include <stack>
19
#include <string>
20
21
static std::string escape_identifier(const irep_idt &identifier)
22
{
- return std::string{"|"} + smt2_convt::convert_identifier(identifier) + "|";
23
+ const std::string "ed_identifier = smt2_convt::convert_identifier(identifier);
24
+ if (std::regex_match(quoted_identifier, std::regex("(\\w+)|\\+-/\\*=%?!\\.\\$_~&\\^<>@")))
25
+ return quoted_identifier;
26
+ return std::string{"|"} + quoted_identifier + "|";
27
}
28
29
class smt_index_output_visitort : public smt_index_const_downcast_visitort
0 commit comments