Skip to content

Commit f9a799b

Browse files
committed
Apply clang-format patch
1 parent a3770f3 commit f9a799b

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/smvlang/smv_typecheck.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,15 +1713,15 @@ void smv_typecheckt::convert_define(const irep_idt &identifier)
17131713
symbol.type=d.value.type();
17141714
}
17151715

1716-
class symbol_collectort:public const_expr_visitort
1716+
class symbol_collectort : public const_expr_visitort
17171717
{
17181718
public:
17191719
virtual void operator()(const exprt &expr)
17201720
{
1721-
if(expr.id()==ID_symbol)
1721+
if(expr.id() == ID_symbol)
17221722
{
1723-
const symbol_exprt &symbol_expr=to_symbol_expr(expr);
1724-
const irep_idt id=symbol_expr.get_identifier();
1723+
const symbol_exprt &symbol_expr = to_symbol_expr(expr);
1724+
const irep_idt id = symbol_expr.get_identifier();
17251725
symbols.insert(id);
17261726
}
17271727
}
@@ -1749,63 +1749,63 @@ void smv_typecheckt::convert_defines(exprt::operandst &invar)
17491749
std::map<node_indext, irep_idt> index_node_id;
17501750
grapht<graph_nodet<empty_edget>> definition_graph;
17511751

1752-
for(const auto &p : define_map) {
1752+
for(const auto &p : define_map)
1753+
{
17531754
// for each defined symbol, collect all symbols it depends on
17541755
symbol_collectort visitor;
17551756
p.second.value.visit(visitor);
1756-
if(id_node_index.find(p.first)==id_node_index.end())
1757+
if(id_node_index.find(p.first) == id_node_index.end())
17571758
{
1758-
id_node_index[p.first]=definition_graph.add_node();
1759-
index_node_id[id_node_index[p.first]]=p.first;
1759+
id_node_index[p.first] = definition_graph.add_node();
1760+
index_node_id[id_node_index[p.first]] = p.first;
17601761
}
1761-
node_indext t=id_node_index[p.first];
1762+
node_indext t = id_node_index[p.first];
17621763

17631764
// for each node t add (t, dep) for each definition dep it depends on
17641765
for(const auto &id : visitor.symbols)
17651766
{
1766-
if(id_node_index.find(id)==id_node_index.end())
1767+
if(id_node_index.find(id) == id_node_index.end())
17671768
{
1768-
id_node_index[id]=definition_graph.add_node();
1769-
index_node_id[id_node_index[id]]=id;
1769+
id_node_index[id] = definition_graph.add_node();
1770+
index_node_id[id_node_index[id]] = id;
17701771
}
1771-
node_indext s=id_node_index[id];
1772+
node_indext s = id_node_index[id];
17721773
definition_graph.add_edge(s, t);
17731774
}
17741775
}
17751776

17761777
// sort the graph topologically to reduce call depth of `convert_define` and
17771778
// `typecheck`
1778-
std::list<node_indext> top_order=definition_graph.topsort();
1779+
std::list<node_indext> top_order = definition_graph.topsort();
17791780
if(top_order.empty())
17801781
{
17811782
// in case no topological order exists, fall back on starting with any
17821783
// defined symbol
17831784
warning() << "definiton graph is not a DAG";
1784-
for(define_mapt::iterator it=define_map.begin();
1785-
it!=define_map.end();
1785+
for(define_mapt::iterator it = define_map.begin(); it != define_map.end();
17861786
it++)
17871787
{
17881788
convert_define(it->first);
17891789

17901790
// generate constraint
1791-
equal_exprt equality{symbol_exprt{it->first, it->second.value.type()},
1792-
it->second.value};
1791+
equal_exprt equality{
1792+
symbol_exprt{it->first, it->second.value.type()}, it->second.value};
17931793
invar.push_back(equality);
17941794
}
17951795
}
17961796
else
17971797
{
17981798
for(const auto &idx : top_order)
17991799
{
1800-
const irep_idt &id=index_node_id[idx];
1800+
const irep_idt &id = index_node_id[idx];
18011801
// skip independent defines
1802-
if(define_map.find(id)==define_map.end())
1802+
if(define_map.find(id) == define_map.end())
18031803
continue;
18041804
convert_define(id);
18051805

18061806
// generate constraint
1807-
equal_exprt equality{symbol_exprt{id, define_map[id].value.type()},
1808-
define_map[id].value};
1807+
equal_exprt equality{
1808+
symbol_exprt{id, define_map[id].value.type()}, define_map[id].value};
18091809
invar.push_back(equality);
18101810
}
18111811
}

0 commit comments

Comments
 (0)