AsmGrader 0.0.0
|
Namespaces | |
namespace | common |
namespace | detail |
namespace | linux |
namespace | metadata |
Classes | |
struct | always_false |
Very simple type for better semantics when we want static_assert(false) to work inside primary class templates. More... | |
class | App |
class | AsmBuffer |
class | AsmData |
class | AsmFunction |
class | AsmFunction< Ret(Args...)> |
class | AsmSymbol |
class | Assignment |
Declaration for the logic and data encapsulating a class assignment. More... | |
class | AssignmentFileSearcher |
struct | AssignmentResult |
class | AssignmentTestRunner |
Manages test execution and result aggregation for a specific assignment. More... | |
class | ByteArray |
class | ByteVector |
class | CommandLineArgs |
Just a wrapper around argparse for now. More... | |
struct | CompilerInfo |
class | ContextInternalError |
Error for any internal failure conditions of TestContext. More... | |
struct | count_if |
struct | count_if_not |
class | DatabaseReader |
Small CSV reader implementation for student names database Expects the specified file to contain a list of newline-seperated "lastname,firstname" entries, utf-8 encoded. More... | |
struct | DebugFormatter |
class | ElfReader |
Adaptor to (a few) libelf functions. More... | |
class | Expected |
std::variant wrapper for a partial implementation of C++23's expected type More... | |
class | FileSearcher |
struct | FlagsRegister |
struct | FloatingPointRegister |
struct | FunctionTraits |
struct | FunctionTraits< FuncRet(FuncArgs...)> |
class | GlobalRegistrar |
A global singleton registrar. Used with Assignment s for now. More... | |
struct | IntRegister |
General Purpose Register. More... | |
class | MemoryIOBase |
Base class for interacting with a tracee's memory in a variety of ways at a (relatively) high-level Functionally a data pipeline between the tracer and tracee. More... | |
struct | MemoryIOSerde |
Example class implementation: More... | |
struct | MemoryIOSerde< ByteVector > |
struct | MemoryIOSerde< NonTermString< Length > > |
struct | MemoryIOSerde< std::string > |
struct | MemoryIOSerde< T > |
struct | MultiStudentResult |
class | MultiStudentRunner |
class | NonCopyable |
A trivially-movable, but non-copyable type. More... | |
class | NonMovable |
A non-movable and non-copyable type. More... | |
struct | NonTermString |
class | PlainTextSerializer |
class | ProfessorApp |
class | Program |
struct | ProgramOptions |
class | PtraceMemoryIO |
TraceeMemory implemented using ptrace(2) commands. More... | |
struct | RegistersState |
struct | remove_all_pointers |
Removes all levels of pointers on a type. More... | |
struct | remove_all_pointers< T * > |
Removes all levels of pointers on a type. More... | |
struct | RequirementResult |
struct | RunMetadata |
class | RunResult |
class | Serializer |
class | Sink |
class | StaticString |
A fully compile-time capable string type Guaranteed to be null-terminated. More... | |
class | StdoutSink |
class | StudentApp |
struct | StudentInfo |
struct | StudentResult |
class | Subprocess |
struct | Symbol |
Basic definition for a symbol found in an ELF file. More... | |
class | SymbolTable |
A basic symbol table, for simple interaction with a number of symbols loaded from an ELF file. More... | |
struct | SyscallEntry |
struct | SyscallRecord |
Record of a syscall for use with Tracer to keep track of which syscalls a child process invokes. More... | |
class | TestAutoRegistrar |
Helper class that, whem constructed, automatically constructs and registers a test. More... | |
class | TestBase |
Base class primarily for a user-written test. More... | |
class | TestContext |
User-facing API for use within an assignment test case for: Interacting with or querying data for the student's assembled binary Test result collection (requirements, pass/fail cases) Performing any other esoteric test-related action. More... | |
struct | TestResult |
class | TracedSubprocess |
A subprocess managed by a tracer. More... | |
struct | TracedWaitid |
class | Tracer |
A lightweight wrapper of ptrace(2) More... | |
struct | UnexpectedT |
Concepts | |
concept | ChronoDuration |
concept | CompatibleFunctionArgs |
concept | MemoryReadSupported |
concept | MemoryWriteSupported |
concept | MemoryRWSupported |
concept | MemoryIOCompatible |
A trait for types that are compatible in how they are read and written to memory. | |
Typedefs | |
template<typename T > | |
using | Result = Expected<T, ErrorKind> |
template<std::size_t NumBits> | |
using | sized_int_t = detail::sized_int_impl<std::bit_width(NumBits) - 1> |
template<std::size_t NumBits> | |
using | sized_uint_t = detail::sized_uint_impl<std::bit_width(NumBits) - 1> |
template<typename T > | |
using | remove_all_pointers_t = remove_all_pointers<T>::type |
Enumerations | |
enum class | ProcessorKind { Aarch64 , x86_64 } |
enum class | EndiannessKind { Little , Big } |
enum class | PtraceEvent { Stop = PTRACE_EVENT_STOP , Clone = PTRACE_EVENT_CLONE , Exec = PTRACE_EVENT_EXEC , Exit = PTRACE_EVENT_EXIT , Fork = PTRACE_EVENT_FORK , VFork = PTRACE_EVENT_VFORK , VForkDone = PTRACE_EVENT_VFORK_DONE , Seccomp = PTRACE_EVENT_SECCOMP } |
Functions | |
BOOST_DEFINE_ENUM_CLASS (ErrorKind, TimedOut, UnresolvedSymbol, UnexpectedReturn, UnknownError, SyscallFailure, MaxErrorNum) | |
template<typename T > | |
std::string | fmt_or_unknown (T &&value, fmt::fstring< T > fmt="{}") |
template<std::size_t N> | |
StaticString (const char(&input)[N]) -> StaticString< N - 1 > | |
template<StaticString Fmt, std::size_t MaxSz = 10 * 1'024, fmt::formattable... Args> | |
consteval auto | static_format (Args &&... args) |
template<StaticString String> | |
consteval auto | operator""_static () |
void | unreachable () |
std::string | get_err_msg (int err) |
Obtain Linux error code message given by err via libc functions. | |
std::string | get_err_msg () |
Obtain Linux error (i.e., errno ) message via libc functions. | |
void | init_loggers () |
template<typename Func , typename Tuple > | |
constexpr auto | tuple_find_first (Func &&pred, const Tuple &val) |
constexpr bool | operator== (const std::timespec &lhs, const std::timespec &rhs) |
template<std::floating_point Arg> | |
auto | setup_function_param (const Arg &arg) |
template<typename T > | |
void | trace_exception (const T &exception) |
template<typename Func , typename... Args> requires (std::invocable<Func, Args...>) | |
std::optional< std::invoke_result_t< Func, Args... > > | wrap_throwable_fn (Func &&fn, Args &&... args) |
bool | is_color_terminal () noexcept |
bool | in_terminal (FILE *file) noexcept |
Expected< winsize > | terminal_size (FILE *file) noexcept |
__attribute__ ((format(strftime, 2, 0))) inline Expected< std | |
constexpr bool | should_output_requirement (ProgramOptions::VerbosityLevel level, bool passed) |
constexpr bool | should_output_test (ProgramOptions::VerbosityLevel level) |
constexpr bool | should_output_student_summary (ProgramOptions::VerbosityLevel level) |
constexpr bool | should_output_grade_percentage (ProgramOptions::VerbosityLevel level) |
ProgramOptions | parse_args_or_exit (std::span< const char * > args, int exit_code) noexcept |
Variables | |
constexpr auto | ENDIANNESS |
template<typename T > | |
constexpr bool | always_false_v = always_false<T>::value |
template<template< typename > typename Cond, typename... Ts> | |
constexpr std::size_t | count_if_v = count_if<Cond, Ts...>::value |
template<template< typename > typename Cond, typename... Ts> | |
constexpr std::size_t | count_if_not_v = count_if_not<Cond, Ts...>::value |
template<typename IntType > | |
constexpr std::size_t | digits10_max_count = std::numeric_limits<std::decay_t<IntType>>::digits10 + 1 |
This was a little confusing (to me at least) digits10 => maximum number of base-10 digits that can be represented with IntType below is a definition for the inverse of that i.e. => maximmum number of base-10 digits that IntType can represent For both signed and unsigned integer types, the value that produces the maximal amount of base10 digits will never itself be a power of 10. The proof for this is trivial using parity to check when all bits are set [2^(n+1) - 1] and factorization to check 2^n (for the negative complement of signed min). | |
using asmgrader::remove_all_pointers_t = remove_all_pointers<T>::type |
using asmgrader::Result = Expected<T, ErrorKind> |
using asmgrader::sized_int_t = detail::sized_int_impl<std::bit_width(NumBits) - 1> |
using asmgrader::sized_uint_t = detail::sized_uint_impl<std::bit_width(NumBits) - 1> |
|
strong |
|
strong |
|
strong |
asmgrader::__attribute__ | ( | (format(strftime, 2, 0)) | ) |
asmgrader::BOOST_DEFINE_ENUM_CLASS | ( | ErrorKind | , |
TimedOut | , | ||
UnresolvedSymbol | , | ||
UnexpectedReturn | , | ||
UnknownError | , | ||
SyscallFailure | , | ||
MaxErrorNum | ) |
|
inline |
|
inline |
Obtain Linux error (i.e., errno
) message via libc functions.
|
inline |
Obtain Linux error code message given by err
via libc functions.
|
noexcept |
|
inline |
|
noexcept |
|
consteval |
|
constexpr |
|
noexcept |
auto asmgrader::setup_function_param | ( | const Arg & | arg | ) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
consteval |
asmgrader::StaticString | ( | const char(&) | input[N] | ) | -> StaticString< N - 1 > |
|
noexcept |
void asmgrader::trace_exception | ( | const T & | exception | ) |
|
constexpr |
|
inline |
std::optional< std::invoke_result_t< Func, Args... > > asmgrader::wrap_throwable_fn | ( | Func && | fn, |
Args &&... | args ) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
This was a little confusing (to me at least) digits10
=> maximum number of base-10 digits that can be represented with IntType below is a definition for the inverse of that i.e. => maximmum number of base-10 digits that IntType can represent For both signed and unsigned integer types, the value that produces the maximal amount of base10 digits will never itself be a power of 10. The proof for this is trivial using parity to check when all bits are set [2^(n+1) - 1] and factorization to check 2^n (for the negative complement of signed min).
Using the property above, we know that the maximum maximum number of base-10 digits that IntType can represent is digits10
+ 1
|
constexpr |