Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
boolector: Warn user if symbol already in use.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpreiner committed Mar 13, 2020
1 parent 754e029 commit 28f266a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/boolector.c
Original file line number Diff line number Diff line change
Expand Up @@ -3639,7 +3639,16 @@ boolector_set_symbol (Btor *btor, BoolectorNode *node, const char *symbol)
BTOR_ABORT_REFS_NOT_POS (exp);
BTOR_ABORT_BTOR_MISMATCH (btor, exp);
symb = mk_unique_symbol (btor, symbol);
btor_node_set_symbol (btor, exp, symb);

if (btor_hashptr_table_get (btor->symbols, symb))
{
BTOR_WARN (
true, "symbol %s already defined, ignoring setting symbol", symbol);
}
else
{
btor_node_set_symbol (btor, exp, symb);
}
btor_mem_freestr (btor->mm, symb);
#ifndef NDEBUG
BTOR_CHKCLONE_NORES (set_symbol, BTOR_CLONED_EXP (exp), symbol);
Expand Down

0 comments on commit 28f266a

Please sign in to comment.