Skip to content

Commit c1825f0

Browse files
author
Daniel Kroening
committed
revert df616e4
1 parent d32ab69 commit c1825f0

File tree

6 files changed

+0
-92
lines changed

6 files changed

+0
-92
lines changed

src/util/symbol.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Author: Daniel Kroening, [email protected]
1212

1313
#include "source_location.h"
1414
#include "std_expr.h"
15-
#include "suffix.h"
1615

1716
/// Dump the state of a symbol object to a given output stream.
1817
/// \param out: The stream to output object state to.
@@ -122,25 +121,3 @@ symbol_exprt symbolt::symbol_expr() const
122121
{
123122
return symbol_exprt(name, type);
124123
}
125-
126-
/// Check that the instance object is well formed.
127-
/// \return: true if well-formed; false otherwise.
128-
bool symbolt::is_well_formed() const
129-
{
130-
// Well-formedness criterion number 1 is for a symbol
131-
// to have a non-empty mode (see #1880)
132-
if(mode.empty())
133-
{
134-
return false;
135-
}
136-
137-
// Well-formedness criterion number 2 is for a symbol
138-
// to have it's base name as a suffix to it's more
139-
// general name.
140-
if(!has_suffix(id2string(name), id2string(base_name)))
141-
{
142-
return false;
143-
}
144-
145-
return true;
146-
}

src/util/symbol.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ class symbolt
121121
PRECONDITION(type.id() == ID_code);
122122
value = exprt(ID_compiled);
123123
}
124-
125-
/// Check that a symbol is well formed.
126-
bool is_well_formed() const;
127124
};
128125

129126
std::ostream &operator<<(std::ostream &out, const symbolt &symbol);

src/util/symbol_table.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ void symbol_tablet::validate(const validation_modet vm) const
128128
const auto symbol_key = elem.first;
129129
const auto &symbol = elem.second;
130130

131-
// First of all, ensure symbol well-formedness
132-
DATA_CHECK_WITH_DIAGNOSTICS(
133-
vm, symbol.is_well_formed(), "Symbol is malformed: ", symbol_key);
134-
135131
// Check that symbols[id].name == id
136132
DATA_CHECK_WITH_DIAGNOSTICS(
137133
vm,

unit/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ SRC += analyses/ai/ai.cpp \
6464
util/string_utils/split_string.cpp \
6565
util/string_utils/strip_string.cpp \
6666
util/symbol_table.cpp \
67-
util/symbol.cpp \
6867
util/unicode.cpp \
6968
util/xml_expr.cpp \
7069
# Empty last line

unit/goto-programs/goto_model_function_type_consistency.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ SCENARIO(
2222
code_typet fun_type2({}, type2);
2323

2424
symbolt function_symbol;
25-
function_symbol.mode = "C";
2625
irep_idt function_symbol_name = "foo";
2726
function_symbol.name = function_symbol_name;
2827

unit/util/symbol.cpp

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)