aboutsummaryrefslogtreecommitdiff
path: root/proofsearch/src/infer/substitution.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
commit598f364de0a809747714294326a0193788e0bdfb (patch)
tree1ab77a340ab0930b41ffc6291d06b12d1b302a88 /proofsearch/src/infer/substitution.cc
parent593a94a3c13aff82b31fd6c61e0ae07b97a2e426 (diff)
downloadrcc-project-598f364de0a809747714294326a0193788e0bdfb.tar.gz
rcc-project-598f364de0a809747714294326a0193788e0bdfb.tar.xz
refactor: rename struct members to follow trailing underscore naming convention across core, search, and frontend components
Diffstat (limited to 'proofsearch/src/infer/substitution.cc')
-rw-r--r--proofsearch/src/infer/substitution.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/proofsearch/src/infer/substitution.cc b/proofsearch/src/infer/substitution.cc
index a7ce617..8710fb0 100644
--- a/proofsearch/src/infer/substitution.cc
+++ b/proofsearch/src/infer/substitution.cc
@@ -22,6 +22,8 @@
#include "atp/core/term_bank.h"
#include "atp/core/types.h"
+#include <vector>
+
namespace atp {
bool Substitution::bind(TermId var, TermId term) {
@@ -66,8 +68,8 @@ TermId Substitution::apply(TermId term, TermBank& bank) const {
// IMPORTANT: Copy symbol_id and args BEFORE recursing.
// Recursive apply() calls may trigger bank.makeTerm() → realloc → dangling ref.
const Term& t = bank.getTerm(term);
- SymbolId sym = t.symbol_id;
- std::vector<TermId> old_args(t.args); // copy!
+ SymbolId const sym = t.symbol_id_;
+ std::vector<TermId> const old_args(t.args_); // copy!
if (old_args.empty()) {
// Constant or 0-arity — no substitution needed
@@ -78,8 +80,8 @@ TermId Substitution::apply(TermId term, TermBank& bank) const {
std::vector<TermId> new_args;
new_args.reserve(old_args.size());
bool changed = false;
- for (TermId arg : old_args) {
- TermId new_arg = apply(arg, bank);
+ for (TermId const arg : old_args) {
+ TermId const new_arg = apply(arg, bank);
new_args.push_back(new_arg);
if (new_arg != arg) {
changed = true;
@@ -105,7 +107,7 @@ bool Substitution::occursIn(TermId var, TermId term, const TermBank& bank) const
}
const Term& t = bank.getTerm(term);
- for (TermId arg : t.args) {
+ for (TermId const arg : t.args_) {
if (occursIn(var, arg, bank)) {
return true;
}