Skip to content

Instantly share code, notes, and snippets.

View wxrdnx's full-sized avatar
🐈
🐱

wxrdnx

🐈
🐱
  • University of Wisconsin
  • Madison, Wisconsin
View GitHub Profile
@wxrdnx
wxrdnx / mutatee.c
Last active September 20, 2025 17:39
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// Initialize matrices A, B, and C
// A and B are filled with random values
// C is initialized to zeros
void mat_init(double *A, double *B, double *C, int N) {
// Deterministic initialization of matrix A and B
for (int i = 0; i < N; i++) {
#include <iostream>
#include <vector>
#include <string>
#include "BPatch.h"
#include "BPatch_addressSpace.h"
#include "BPatch_binaryEdit.h"
#include "BPatch_image.h"
#include "BPatch_function.h"
#include "BPatch_point.h"
#include <iostream>
#include <vector>
#include <string>
#include "BPatch.h"
#include "BPatch_addressSpace.h"
#include "BPatch_binaryEdit.h"
#include "BPatch_image.h"
#include "BPatch_function.h"
#include "BPatch_point.h"
@wxrdnx
wxrdnx / mutatee.cpp
Last active September 14, 2025 17:06
Mutatee that performs matrix multiplication of size 100x100
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// Initialize matrices A, B, and C
// A and B are filled with random values
// C is initialized to zeros
void mat_init(double *A, double *B, double *C, int N) {
// Deterministic initialization of matrix A and B
for (int i = 0; i < N; i++) {
@wxrdnx
wxrdnx / mutator_count_func.cpp
Last active September 14, 2025 19:47
Mutator that count functions
#include <iostream>
#include <vector>
#include <string>
#include "BPatch.h"
#include "BPatch_addressSpace.h"
#include "BPatch_binaryEdit.h"
#include "BPatch_image.h"
#include "BPatch_function.h"
#include "BPatch_point.h"
@wxrdnx
wxrdnx / macro_measure.c
Created September 12, 2025 17:39
macro_measure.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/wait.h>
int main(int argc, char *argv[]) {
if (argc < 2) {
printf("Usage: %s <binary>\n", argv[0]);
return 1;
@wxrdnx
wxrdnx / count_bb_mutator.cpp
Created September 12, 2025 16:30
count_bb_mutator.cpp
#include <iostream>
#include <vector>
#include <string>
#include "BPatch.h"
#include "BPatch_addressSpace.h"
#include "BPatch_binaryEdit.h"
#include "BPatch_image.h"
#include "BPatch_function.h"
#include "BPatch_point.h"
@wxrdnx
wxrdnx / mutatee.cpp
Created September 12, 2025 16:29
mutatee.cpp
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// Initialize matrices A, B, and C
// A and B are filled with random values
// C is initialized to zeros
void mat_init(double *A, double *B, double *C, int N) {
// Deterministic initialization of matrix A and B
for (int i = 0; i < N; i++) {
@wxrdnx
wxrdnx / cvc5_demo_sygus.py
Last active February 26, 2025 02:08
CVC5 demo - SyGuS
#!/usr/bin/env python
import copy
import cvc5
from cvc5 import Kind
def define_fun_to_string(f, params, body):
sort = f.getSort()
if sort.isFunction():
sort = f.getSort().getFunctionCodomainSort()
@wxrdnx
wxrdnx / cvc5_demo_max.py
Last active February 26, 2025 01:59
CVC5 demo - synthesize the max function
#!/usr/bin/env python
import cvc5
from cvc5 import Kind
def define_fun_to_string(f, params, body):
sort = f.getSort()
if sort.isFunction():
sort = f.getSort().getFunctionCodomainSort()
result = "(define-fun " + str(f) + " ("