Skip to content

Commit 9d7e964

Browse files
committed
Clean up comments.
1 parent af9d846 commit 9d7e964

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

genmc-sys/src_cpp/MiriInterface.cpp

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,15 @@ auto MiriGenMCShim::createHandle(const GenmcParams &config, bool estimation_mode
6060
// Miri needs all threads to be replayed, even fully completed ones.
6161
conf->replayCompletedThreads = true;
6262

63-
// TODO GENMC: make sure this doesn't affect any tests, and maybe make it changeable from
64-
// Miri:
63+
// FIXME(genmc): make sure this doesn't affect any tests, and maybe make it changeable from Miri:
6564
constexpr unsigned int DEFAULT_WARN_ON_GRAPH_SIZE = 16 * 1024;
6665
conf->warnOnGraphSize = DEFAULT_WARN_ON_GRAPH_SIZE;
6766

6867
// We only support the RC11 memory model for Rust.
6968
conf->model = ModelType::RC11;
7069

71-
conf->randomScheduleSeed =
72-
"42"; // TODO GENMC: only for random exploration/scheduling mode in GenMC
70+
// FIXME(genmc): expose this setting to Miri
71+
conf->randomScheduleSeed = "42";
7372
conf->printRandomScheduleSeed = config.print_random_schedule_seed;
7473
if (config.quiet) {
7574
// logLevel = VerbosityLevel::Quiet;
@@ -82,19 +81,19 @@ auto MiriGenMCShim::createHandle(const GenmcParams &config, bool estimation_mode
8281
logLevel = VerbosityLevel::Tip;
8382
}
8483

85-
// TODO GENMC (EXTRA): check if we can enable IPR:
84+
// FIXME(genmc): check if we can enable IPR:
8685
conf->ipr = false;
87-
// TODO GENMC (EXTRA): check if we can enable BAM:
86+
// FIXME(genmc): check if we can enable BAM:
8887
conf->disableBAM = true;
89-
// TODO GENMC (EXTRA): check if we can do instruction caching (probably not)
88+
// FIXME(genmc): check if we can do instruction caching (probably not)
9089
conf->instructionCaching = false;
9190

92-
// TODO GENMC (EXTRA): check if we can enable Symmetry Reduction:
91+
// FIXME(genmc): implement symmetry reduction.
9392
ERROR_ON(config.do_symmetry_reduction,
9493
"Symmetry reduction is currently unsupported in GenMC mode.");
9594
conf->symmetryReduction = config.do_symmetry_reduction;
9695

97-
// TODO GENMC: Should there be a way to change this option from Miri?
96+
// FIXME(genmc): expose this setting to Miri (useful for testing Miri-GenMC).
9897
conf->schedulePolicy = SchedulePolicy::WF;
9998

10099
conf->estimate = estimation_mode;
@@ -236,7 +235,7 @@ void MiriGenMCShim::handleUserBlock(ThreadId thread_id)
236235

237236
auto loc = SAddr(address);
238237
auto aSize = ASize(size);
239-
auto type = AType::Unsigned; // TODO GENMC: get correct type from Miri
238+
auto type = AType::Unsigned; // FIXME(genmc): get correct type from Miri(?)
240239

241240
auto newLab = std::make_unique<ReadLabel>(pos, ord, loc, aSize, type);
242241

@@ -339,9 +338,9 @@ void MiriGenMCShim::handleUserBlock(ThreadId thread_id)
339338

340339
auto pos = incPos(thread_id);
341340

342-
auto loc = SAddr(address); // TODO GENMC: called addr for write, loc for read?
341+
auto loc = SAddr(address);
343342
auto aSize = ASize(size);
344-
auto type = AType::Unsigned; // TODO GENMC: get from Miri
343+
auto type = AType::Unsigned; // FIXME(genmc): get correct type from Miri(?)
345344

346345
// TODO GENMC: u128 support
347346
auto val = value.toSVal();
@@ -388,14 +387,12 @@ auto MiriGenMCShim::handleMalloc(ThreadId thread_id, uint64_t size, uint64_t ali
388387
{
389388
auto pos = incPos(thread_id);
390389

391-
auto sd = StorageDuration::SD_Heap; // TODO GENMC: get from Miri
392-
auto stype = StorageType::ST_Durable; // TODO GENMC
393-
auto spc = AddressSpace::AS_User; // TODO GENMC
394-
395-
auto deps = EventDeps(); // TODO GENMC: without this, constructor is ambiguous
390+
// FIXME(genmc): get correct values from Miri
391+
auto sd = StorageDuration::SD_Heap;
392+
auto stype = StorageType::ST_Durable;
393+
auto spc = AddressSpace::AS_User;
396394

397-
// TODO GENMC (types): size_t vs unsigned int
398-
auto aLab = std::make_unique<MallocLabel>(pos, size, alignment, sd, stype, spc, deps);
395+
auto aLab = std::make_unique<MallocLabel>(pos, size, alignment, sd, stype, spc, EventDeps());
399396

400397
SAddr retVal = GenMCDriver::handleMalloc(std::move(aLab));
401398

0 commit comments

Comments
 (0)