repo stringclasses 2
values | file_path stringlengths 18 79 | function_name stringlengths 9 155 | code stringlengths 291 24.8k | input stringlengths 4.62k 29.2k | output stringlengths 3.9k 133k | success int64 -1 1 | line_cov float64 0 100 | branch_cov float64 0 100 |
|---|---|---|---|---|---|---|---|---|
abseil | absl/container/internal/layout.h | absl::container_internal::internal_layout::adl_barrier::Max(size_t) | // --- INCLUDES ---
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <array>
#include <string>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include "absl/base/config.h"
#include "absl/debugging/internal/demangle.h"
#include "absl/meta/type_traits.h"
#in... |
You are a software testing assistant. Your task is to generate a C++ test driver for the function absl::container_internal::internal_layout::adl_barrier::Max(size_t) located in file absl/container/internal/layout.h using concolic testing.
Requirements:
1. Think like a concolic tester:
-Build the function’s Control... | <think>
The user wants a C++ test driver for the function `absl::container_internal::internal_layout::adl_barrier::Max(size_t)`.
**1. Analyze the Function:**
The function signature is:
`constexpr size_t Max(size_t a) { return a; }`
It is located in `absl/container/internal/layout.h` within the namespace `absl::contai... | 1 | 100 | 0 |
abseil | absl/random/poisson_distribution.h | absl::poisson_distribution::param_type::mean() | // --- INCLUDES ---
#include <cassert>
#include <cmath>
#include <cstdint>
#include <istream>
#include <limits>
#include <ostream>
#include "absl/base/config.h"
#include "absl/random/internal/fast_uniform_bits.h"
#include "absl/random/internal/fastmath.h"
#include "absl/random/internal/generate_real.h"
#inclu... |
You are a software testing assistant. Your task is to generate a C++ test driver for the function absl::poisson_distribution::param_type::mean() located in file absl/random/poisson_distribution.h using concolic testing.
Requirements:
1. Think like a concolic tester:
-Build the function’s Control Flow Graph (CFG).
... | <think>
The user wants a C++ test driver for the function `absl::poisson_distribution::param_type::mean()`.
The function is located in `absl/random/poisson_distribution.h`.
The testing methodology specified is "concolic testing", but applied to a very simple getter function.
**1. Analyze the Function:**
Function signa... | 1 | 100 | 0 |
abseil | absl/hash/internal/city.cc | absl::hash_internal::CityHash64WithSeeds(char*,size_t,uint64_t,uint64_t) | // --- INCLUDES ---
#include "absl/hash/internal/city.h"
#include <string.h> // for memcpy and memset
#include <algorithm>
#include "absl/base/config.h"
#include "absl/base/internal/endian.h"
#include "absl/base/internal/unaligned_access.h"
#include "absl/base/optimization.h"
// -------------------------------... |
You are a software testing assistant. Your task is to generate a C++ test driver for the function absl::hash_internal::CityHash64WithSeeds(char*,size_t,uint64_t,uint64_t) located in file absl/hash/internal/city.cc using concolic testing.
Requirements:
1. Think like a concolic tester:
-Build the function’s Control ... | <think>
The user wants a C++ test driver for the function `absl::hash_internal::CityHash64WithSeeds`.
The function is defined in `absl/hash/internal/city.cc`.
The signature is `uint64_t CityHash64WithSeeds(const char *s, size_t len, uint64_t seed0, uint64_t seed1)`.
**Analysis of the Function:**
```cpp
uint64_t CityHa... | 1 | 100 | 0 |
abseil | absl/synchronization/internal/kernel_timeout.cc | absl::synchronization_internal::KernelTimeout::InMillisecondsFromNow() | // --- INCLUDES ---
#include "absl/synchronization/internal/kernel_timeout.h"
#include <sys/types.h>
#include <algorithm>
#include <chrono> // NOLINT(build/c++11)
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <limits>
#include "absl/base/attributes.h"
#include "absl/base/... |
You are a software testing assistant. Your task is to generate a C++ test driver for the function absl::synchronization_internal::KernelTimeout::InMillisecondsFromNow() located in file absl/synchronization/internal/kernel_timeout.cc using concolic testing.
Requirements:
1. Think like a concolic tester:
-Build the ... | <think>
The user wants a C++ test driver for the function `absl::synchronization_internal::KernelTimeout::InMillisecondsFromNow()`.
I need to follow specific requirements:
1. **Concolic Testing Approach**:
* Build CFG.
* Enumerate paths.
* Derive path conditions.
* Solve constraints for inputs.... | 1 | 90.91 | 75 |
abseil | absl/strings/str_cat.cc | absl::StrAppend(std::string*,AlphaNum&,AlphaNum&) | "// --- INCLUDES ---\n#include \"absl/strings/str_cat.h\"\n\n#include <assert.h>\n\n#include <cstdde(...TRUNCATED) | "\nYou are a software testing assistant. Your task is to generate a C++ test driver for the function(...TRUNCATED) | "<think>\nThe user wants a C++ test driver for the function `absl::StrAppend(std::string*, AlphaNum&(...TRUNCATED) | 1 | 100 | 75 |
abseil | absl/log/internal/globals.cc | absl::log_internal::EnableSymbolizeLogStackTrace(bool) | "// --- INCLUDES ---\n#include \"absl/log/internal/globals.h\"\n\n#include <atomic>\n\n#include <cst(...TRUNCATED) | "\nYou are a software testing assistant. Your task is to generate a C++ test driver for the function(...TRUNCATED) | "<think>\nThe user wants a C++ test driver for the function `absl::log_internal::EnableSymbolizeLogS(...TRUNCATED) | 1 | 100 | 0 |
abseil | absl/strings/internal/charconv_bigint.cc | absl::strings_internal::BigUnsigned<max_words>::ReadFloatMantissa(ParsedFloat&,int) | "// --- INCLUDES ---\n#include \"absl/strings/internal/charconv_bigint.h\"\n\n#include <algorithm>\n(...TRUNCATED) | "\nYou are a software testing assistant. Your task is to generate a C++ test driver for the function(...TRUNCATED) | "<think>\nThe user wants a C++ test driver for the function `absl::strings_internal::BigUnsigned<max(...TRUNCATED) | 1 | 100 | 87.5 |
abseil | absl/random/internal/uniform_helper.h | absl::random_internal::uniform_lower_bound(Tag,IntType,IntType) | "// --- INCLUDES ---\n#include <cmath>\n\n#include <limits>\n\n#include <type_traits>\n\n#include \"(...TRUNCATED) | "\nYou are a software testing assistant. Your task is to generate a C++ test driver for the function(...TRUNCATED) | "<think>\nThe user wants a C++ test driver for the function `absl::random_internal::uniform_lower_bo(...TRUNCATED) | 1 | 100 | 100 |
abseil | absl/base/internal/raw_logging.cc | absl::raw_log_internal::AsyncSignalSafeWriteError(char*,size_t) | "// --- INCLUDES ---\n#include \"absl/base/internal/raw_logging.h\"\n\n#include <cstdarg>\n\n#includ(...TRUNCATED) | "\nYou are a software testing assistant. Your task is to generate a C++ test driver for the function(...TRUNCATED) | "<think>\nThe user wants a C++ test driver for the function `absl::raw_log_internal::AsyncSignalSafe(...TRUNCATED) | 1 | 100 | 100 |
abseil | absl/strings/str_split.cc | absl::ByLength::Find(absl::string_view,size_t) | "// --- INCLUDES ---\n#include \"absl/strings/str_split.h\"\n\n#include <algorithm>\n\n#include <cst(...TRUNCATED) | "\nYou are a software testing assistant. Your task is to generate a C++ test driver for the function(...TRUNCATED) | "<think>\nThe user wants a C++ test driver for the function `absl::ByLength::Find(absl::string_view,(...TRUNCATED) | 1 | 100 | 75 |
End of preview. Expand in Data Studio
C++ Concolic Test Driver Generation Dataset
Dataset chứa 300 mẫu dùng để sinh/đánh giá test driver C++ bằng phương pháp concolic testing. Mỗi mẫu gồm mã nguồn hàm đích, prompt yêu cầu sinh test driver, và test driver đầu ra kèm kết quả coverage thực tế.
Thông tin tổng quan
- Số mẫu: 300
- Ngôn ngữ mã nguồn: C++
- Repo nguồn:
abseil(104 mẫu),bullet3(196 mẫu) - Định dạng: JSONL (mỗi dòng là một JSON object)
Các trường dữ liệu
| Trường | Kiểu | Mô tả |
|---|---|---|
repo |
string | Tên repo nguồn (abseil, bullet) |
file_path |
string | Đường dẫn file chứa hàm đích |
function_name |
string | Tên đầy đủ của hàm đích |
code |
string | Mã nguồn hàm đích kèm các #include cần thiết |
input |
string | Prompt yêu cầu sinh test driver theo tư duy concolic |
output |
string | Test driver C++ được sinh ra |
success |
int | 1 = biên dịch/chạy thành công, -1 = thất bại |
line_cov |
float | Tỷ lệ line coverage (%) đạt được |
branch_cov |
float | Tỷ lệ branch coverage (%) đạt được |
Thống kê
success = 1: 268 mẫu (89.3%)success = -1: 32 mẫu (10.7%)line_covtrung bình: 88.89%branch_covtrung bình: 30.05%
Cách tải
from datasets import load_dataset
ds = load_dataset("rd320uetvnu/teacher_hf_public")
print(ds["train"][0])
Hoặc đọc trực tiếp file JSONL bằng bất kỳ thư viện JSON nào.
Ghi chú license
Mã nguồn hàm đích được trích từ repo abseil (Apache-2.0) và bullet3 (zlib). Test driver đầu ra được sinh tự động. Vui lòng tôn trọng license của các repo nguồn khi sử dụng.
- Downloads last month
- 28