aboutsummaryrefslogtreecommitdiff
path: root/src/core/term_bank.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-04-07 03:59:58 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-04-07 03:59:58 +0800
commit5ab3efd522cf0221481684b5bbc9c2ac6bfc9919 (patch)
tree9c521dedd2bc49bdbac642a0640dd048b6d8e4a1 /src/core/term_bank.cc
parentbf4f464cec8b6515d9e5131d43847ef9b2fd21d1 (diff)
downloadratp-5ab3efd522cf0221481684b5bbc9c2ac6bfc9919.tar.gz
ratp-5ab3efd522cf0221481684b5bbc9c2ac6bfc9919.tar.xz
refactor: rename struct members to follow trailing underscore naming convention across core, search, and frontend components
Diffstat (limited to 'src/core/term_bank.cc')
-rw-r--r--src/core/term_bank.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/term_bank.cc b/src/core/term_bank.cc
index 8c8ef29..2e117b3 100644
--- a/src/core/term_bank.cc
+++ b/src/core/term_bank.cc
@@ -18,20 +18,25 @@
#include "atp/core/term_bank.h"
+#include "atp/core/term.h"
#include "atp/core/types.h"
#include <cassert>
+#include <cstddef>
+#include <span>
+#include <utility>
+#include <vector>
namespace atp {
TermId TermBank::makeTerm(SymbolId symbol, std::span<const TermId> args) {
- TermKey key{.symbol = symbol, .args = {args.begin(), args.end()}};
+ TermKey key{.symbol_ = symbol, .args_ = {args.begin(), args.end()}};
auto it = term_to_id_.find(key);
if (it != term_to_id_.end()) {
return it->second;
}
auto new_id = static_cast<TermId>(terms_.size());
- Term new_term{.symbol_id = symbol, .args = {args.begin(), args.end()}};
+ Term new_term{.symbol_id_ = symbol, .args_ = key.args_};
terms_.push_back(std::move(new_term));
term_to_id_.emplace(std::move(key), new_id);
return new_id;
@@ -48,7 +53,7 @@ const Term& TermBank::getTerm(TermId id) const {
bool TermBank::isVariable(TermId id) const {
assert(id < terms_.size() && "TermId out of bounds!");
- return symbols_.isVariable(terms_[id].symbol_id);
+ return symbols_.isVariable(terms_[id].symbol_id_);
}
size_t TermBank::size() const {